aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/src/cta/Tip/state.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-wallet-webextension/src/cta/Tip/state.ts')
-rw-r--r--packages/taler-wallet-webextension/src/cta/Tip/state.ts7
1 files changed, 5 insertions, 2 deletions
diff --git a/packages/taler-wallet-webextension/src/cta/Tip/state.ts b/packages/taler-wallet-webextension/src/cta/Tip/state.ts
index 333337e78..a3adafe53 100644
--- a/packages/taler-wallet-webextension/src/cta/Tip/state.ts
+++ b/packages/taler-wallet-webextension/src/cta/Tip/state.ts
@@ -21,7 +21,7 @@ import * as wxApi from "../../wxApi.js";
import { Props, State } from "./index.js";
export function useComponentState(
- { talerTipUri, onCancel }: Props,
+ { talerTipUri, onCancel, onSuccess }: Props,
api: typeof wxApi,
): State {
const [tipIgnored, setTipIgnored] = useState(false);
@@ -48,8 +48,11 @@ export function useComponentState(
const { tip } = tipInfo.response;
const doAccept = async (): Promise<void> => {
- await api.acceptTip({ walletTipId: tip.walletTipId });
+ const res = await api.acceptTip({ walletTipId: tip.walletTipId });
+
+ //FIX: this may not be seen since we are moving to the success also
tipInfo.retry();
+ onSuccess(res.transactionId)
};
const baseInfo = {