aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/src/cta/InvoiceCreate/state.ts
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2022-08-31 11:46:39 -0300
committerSebastian <sebasjm@gmail.com>2022-08-31 11:46:39 -0300
commite759684fd0658b4a3ba241744424ceda11bd500b (patch)
tree31e3e8998aada76bf49df1dd9988021fb67bb856 /packages/taler-wallet-webextension/src/cta/InvoiceCreate/state.ts
parentd84424202dca22fff22cb1d304286f627642187b (diff)
downloadwallet-core-e759684fd0658b4a3ba241744424ceda11bd500b.tar.xz
invoice and transfer details
Diffstat (limited to 'packages/taler-wallet-webextension/src/cta/InvoiceCreate/state.ts')
-rw-r--r--packages/taler-wallet-webextension/src/cta/InvoiceCreate/state.ts9
1 files changed, 7 insertions, 2 deletions
diff --git a/packages/taler-wallet-webextension/src/cta/InvoiceCreate/state.ts b/packages/taler-wallet-webextension/src/cta/InvoiceCreate/state.ts
index dd9220480..f6a0847b2 100644
--- a/packages/taler-wallet-webextension/src/cta/InvoiceCreate/state.ts
+++ b/packages/taler-wallet-webextension/src/cta/InvoiceCreate/state.ts
@@ -22,7 +22,7 @@ import * as wxApi from "../../wxApi.js";
import { Props, State } from "./index.js";
export function useComponentState(
- { amount: amountStr }: Props,
+ { amount: amountStr, onClose }: Props,
api: typeof wxApi,
): State {
const amount = Amounts.parseOrThrow(amountStr)
@@ -53,7 +53,9 @@ export function useComponentState(
status: "show-qr",
talerUri,
error: undefined,
- close: () => { null },
+ cancel: {
+ onClick: onClose
+ }
// chosenAmount: amount,
// toBeReceived: amount,
}
@@ -105,6 +107,9 @@ export function useComponentState(
setTalerUri(uri)
}
},
+ cancel: {
+ onClick: onClose
+ },
chosenAmount: amount,
toBeReceived: amount,
error: undefined,