aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/src/cta/Withdraw/index.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/Withdraw/index.ts
parent6ddb2de84245ae3914c92b2b2eb7399e7f04500e (diff)
downloadwallet-core-59d235e8d29159bc8caccf8bee6a2bca8b0b90dc.tar.xz
redirect after success #7357
Diffstat (limited to 'packages/taler-wallet-webextension/src/cta/Withdraw/index.ts')
-rw-r--r--packages/taler-wallet-webextension/src/cta/Withdraw/index.ts12
1 files changed, 3 insertions, 9 deletions
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<void>;
+ onSuccess: (txid: string) => Promise<void>;
}
export interface PropsFromParams {
amount: string;
cancel: () => Promise<void>;
+ onSuccess: (txid: string) => Promise<void>;
}
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<State> = {
"loading-uri": LoadingUriView,
"loading-exchange": LoadingExchangeView,
"loading-info": LoadingInfoView,
- completed: CompletedView,
success: SuccessView,
};