diff options
author | Sebastian <sebasjm@gmail.com> | 2022-09-01 10:03:23 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2022-09-01 10:03:23 -0300 |
commit | d6a172c4a00b615dce31630bf65e6d62b30f608e (patch) | |
tree | c8c714b01e0cf9a34f229a63a7e2ca6bb336ad0c /packages/taler-wallet-webextension/src/cta/InvoiceCreate/state.ts | |
parent | 91d5d55edc36bde8ac860fd56b0fd2dcb93b150a (diff) | |
download | wallet-core-d6a172c4a00b615dce31630bf65e6d62b30f608e.tar.xz |
add invoice|transfer created view
Diffstat (limited to 'packages/taler-wallet-webextension/src/cta/InvoiceCreate/state.ts')
-rw-r--r-- | packages/taler-wallet-webextension/src/cta/InvoiceCreate/state.ts | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/packages/taler-wallet-webextension/src/cta/InvoiceCreate/state.ts b/packages/taler-wallet-webextension/src/cta/InvoiceCreate/state.ts index f6a0847b2..804d216eb 100644 --- a/packages/taler-wallet-webextension/src/cta/InvoiceCreate/state.ts +++ b/packages/taler-wallet-webextension/src/cta/InvoiceCreate/state.ts @@ -50,14 +50,17 @@ export function useComponentState( if (talerUri) { return { - status: "show-qr", + status: "created", talerUri, error: undefined, cancel: { onClick: onClose - } - // chosenAmount: amount, - // toBeReceived: amount, + }, + copyToClipboard: { + onClick: async () => { + navigator.clipboard.writeText(talerUri); + } + }, } } @@ -95,13 +98,7 @@ export function useComponentState( }, invalid: !subject || Amounts.isZero(amount), exchangeUrl: selected.exchangeBaseUrl, - copyToClipboard: { - onClick: async () => { - const uri = await accept(); - navigator.clipboard.writeText(uri || ""); - } - }, - showQr: { + create: { onClick: async () => { const uri = await accept(); setTalerUri(uri) |