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/Withdraw/index.ts | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'packages/taler-wallet-webextension/src/cta/Withdraw/index.ts') diff --git a/packages/taler-wallet-webextension/src/cta/Withdraw/index.ts b/packages/taler-wallet-webextension/src/cta/Withdraw/index.ts index d777489ab..2d9aaf828 100644 --- a/packages/taler-wallet-webextension/src/cta/Withdraw/index.ts +++ b/packages/taler-wallet-webextension/src/cta/Withdraw/index.ts @@ -26,7 +26,6 @@ import { useComponentStateFromURI, } from "./state.js"; import { - CompletedView, LoadingExchangeView, LoadingInfoView, LoadingUriView, @@ -36,11 +35,13 @@ import { export interface PropsFromURI { talerWithdrawUri: string | undefined; cancel: () => Promise; + onSuccess: (txid: string) => Promise; } export interface PropsFromParams { amount: string; cancel: () => Promise; + onSuccess: (txid: string) => Promise; } export type State = @@ -48,8 +49,7 @@ export type State = | State.LoadingUriError | State.LoadingExchangeError | State.LoadingInfoError - | State.Success - | State.Completed; + | State.Success; export namespace State { export interface Loading { @@ -69,11 +69,6 @@ export namespace State { error: HookError; } - export type Completed = { - status: "completed"; - error: undefined; - }; - export type Success = { status: "success"; error: undefined; @@ -100,7 +95,6 @@ const viewMapping: StateViewMap = { "loading-uri": LoadingUriView, "loading-exchange": LoadingExchangeView, "loading-info": LoadingInfoView, - completed: CompletedView, success: SuccessView, }; -- cgit v1.2.3