import { AmountJson, Amounts, parsePaytoUri, PaytoUri, } from "@gnu-taler/taler-util"; import { Fragment, h, VNode } from "preact"; import { useEffect, useState } from "preact/hooks"; import { QR } from "../components/QR"; import { ButtonDestructive, ButtonPrimary, WalletBox, WarningBox, } from "../components/styled"; export interface Props { reservePub: string; payto: string; exchangeBaseUrl: string; amount: AmountJson; onBack: () => void; } interface BankDetailsProps { payto: PaytoUri; exchangeBaseUrl: string; subject: string; amount: string; } function Row({ name, value, literal, }: { name: string; value: string; literal?: boolean; }): VNode { const [copied, setCopied] = useState(false); function copyText(): void { navigator.clipboard.writeText(value); setCopied(true); } useEffect(() => { setTimeout(() => { setCopied(false); }, 1000); }, [copied]); return (
{value}
Please wire {Amounts.stringify(amount)} to:
Alternative, you can also scan this QR code or open{" "} this link if you have a banking app installed that supports RFC 8905