aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/src/cta/InvoiceCreate/state.ts
diff options
context:
space:
mode:
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,