From 59d235e8d29159bc8caccf8bee6a2bca8b0b90dc Mon Sep 17 00:00:00 2001 From: Sebastian Date: Fri, 16 Sep 2022 16:03:58 -0300 Subject: redirect after success #7357 --- packages/taler-wallet-webextension/src/cta/InvoicePay/state.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'packages/taler-wallet-webextension/src/cta/InvoicePay/state.ts') diff --git a/packages/taler-wallet-webextension/src/cta/InvoicePay/state.ts b/packages/taler-wallet-webextension/src/cta/InvoicePay/state.ts index e69bb4627..c88e80602 100644 --- a/packages/taler-wallet-webextension/src/cta/InvoicePay/state.ts +++ b/packages/taler-wallet-webextension/src/cta/InvoicePay/state.ts @@ -30,7 +30,7 @@ import * as wxApi from "../../wxApi.js"; import { Props, State } from "./index.js"; export function useComponentState( - { talerPayPullUri, onClose, goToWalletManualWithdraw }: Props, + { talerPayPullUri, onClose, goToWalletManualWithdraw, onSuccess }: Props, api: typeof wxApi, ): State { const hook = useAsyncAsHook(async () => { @@ -149,7 +149,7 @@ export function useComponentState( const resp = await api.acceptPeerPullPayment({ peerPullPaymentIncomingId, }); - await onClose(); + onSuccess(resp.transactionId); } catch (e) { if (e instanceof TalerError) { setOperationError(e.errorDetail); -- cgit v1.2.3