aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/src/cta/InvoicePay/state.ts
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2022-09-16 16:03:58 -0300
committerSebastian <sebasjm@gmail.com>2022-09-16 16:03:58 -0300
commit59d235e8d29159bc8caccf8bee6a2bca8b0b90dc (patch)
tree551261c860b1989dc0b1a05ddcfd53d20e561626 /packages/taler-wallet-webextension/src/cta/InvoicePay/state.ts
parent6ddb2de84245ae3914c92b2b2eb7399e7f04500e (diff)
downloadwallet-core-59d235e8d29159bc8caccf8bee6a2bca8b0b90dc.tar.xz
redirect after success #7357
Diffstat (limited to 'packages/taler-wallet-webextension/src/cta/InvoicePay/state.ts')
-rw-r--r--packages/taler-wallet-webextension/src/cta/InvoicePay/state.ts4
1 files changed, 2 insertions, 2 deletions
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);