summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/src/cta/Withdraw/index.ts
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2024-01-15 17:34:19 -0300
committerSebastian <sebasjm@gmail.com>2024-01-15 17:36:48 -0300
commit2e2cf4049a771c82fcc520686de3ace7603baa05 (patch)
tree620ab22d4fc0f621d0a574c8f98d1c49f1d67804 /packages/taler-wallet-webextension/src/cta/Withdraw/index.ts
parentef0bb60f23c0c755814f648b8d71a29a843e066c (diff)
downloadwallet-core-2e2cf4049a771c82fcc520686de3ace7603baa05.tar.gz
wallet-core-2e2cf4049a771c82fcc520686de3ace7603baa05.tar.bz2
wallet-core-2e2cf4049a771c82fcc520686de3ace7603baa05.zip
fixes #8083
Diffstat (limited to 'packages/taler-wallet-webextension/src/cta/Withdraw/index.ts')
-rw-r--r--packages/taler-wallet-webextension/src/cta/Withdraw/index.ts10
1 files changed, 9 insertions, 1 deletions
diff --git a/packages/taler-wallet-webextension/src/cta/Withdraw/index.ts b/packages/taler-wallet-webextension/src/cta/Withdraw/index.ts
index 04713f3c4..1f8745a5d 100644
--- a/packages/taler-wallet-webextension/src/cta/Withdraw/index.ts
+++ b/packages/taler-wallet-webextension/src/cta/Withdraw/index.ts
@@ -38,7 +38,7 @@ import { ErrorAlertView } from "../../components/CurrentAlerts.js";
import { ErrorAlert } from "../../context/alert.js";
import { ExchangeSelectionPage } from "../../wallet/ExchangeSelection/index.js";
import { NoExchangesView } from "../../wallet/ExchangeSelection/views.js";
-import { SelectAmountView, SuccessView } from "./views.js";
+import { FinalStateOperation, SelectAmountView, SuccessView } from "./views.js";
export interface PropsFromURI {
talerWithdrawUri: string | undefined;
@@ -60,6 +60,7 @@ export type State =
| SelectExchangeState.NoExchangeFound
| SelectExchangeState.Selecting
| State.SelectAmount
+ | State.AlreadyCompleted
| State.Success;
export namespace State {
@@ -80,6 +81,12 @@ export namespace State {
amount: AmountFieldHandler;
currency: string;
}
+ export interface AlreadyCompleted {
+ status: "already-completed";
+ operationState: "confirmed" | "aborted" | "selected";
+ confirmTransferUrl?: string,
+ error: undefined;
+ }
export type Success = {
status: "success";
@@ -116,6 +123,7 @@ const viewMapping: StateViewMap<State> = {
"no-exchange-found": NoExchangesView,
"selecting-exchange": ExchangeSelectionPage,
success: SuccessView,
+ "already-completed": FinalStateOperation,
};
export const WithdrawPageFromURI = compose(