import { AmountJson, Amounts, parsePaytoUri, Translate, } from "@gnu-taler/taler-util"; import { Fragment, h, VNode } from "preact"; import { BankDetailsByPaytoType } from "../components/BankDetailsByPaytoType"; import { QR } from "../components/QR"; import { ButtonDestructive, WarningBox } from "../components/styled"; import { amountToString } from "../utils/index"; export interface Props { reservePub: string; payto: string; exchangeBaseUrl: string; amount: AmountJson; onCancel: () => void; } export function ReserveCreated({ reservePub, payto, onCancel, exchangeBaseUrl, amount, }: Props): VNode { const paytoURI = parsePaytoUri(payto); // const url = new URL(paytoURI?.targetPath); if (!paytoURI) { return (