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/TransferCreate/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/TransferCreate/state.ts')
-rw-r--r-- | packages/taler-wallet-webextension/src/cta/TransferCreate/state.ts | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/packages/taler-wallet-webextension/src/cta/TransferCreate/state.ts b/packages/taler-wallet-webextension/src/cta/TransferCreate/state.ts index cee41b708..f11526c0e 100644 --- a/packages/taler-wallet-webextension/src/cta/TransferCreate/state.ts +++ b/packages/taler-wallet-webextension/src/cta/TransferCreate/state.ts @@ -32,12 +32,17 @@ export function useComponentState( if (talerUri) { return { - status: "show-qr", + status: "created", talerUri, error: undefined, cancel: { onClick: onClose, }, + copyToClipboard: { + onClick: async () => { + navigator.clipboard.writeText(talerUri); + } + }, } } @@ -71,13 +76,7 @@ export function useComponentState( value: subject, onInput: async (e) => setSubject(e) }, - copyToClipboard: { - onClick: async () => { - const uri = await accept(); - navigator.clipboard.writeText(uri || ""); - } - }, - showQr: { + create: { onClick: async () => { const uri = await accept(); setTalerUri(uri) |