diff options
Diffstat (limited to 'packages/taler-wallet-webextension/src/cta/Withdraw/index.ts')
-rw-r--r-- | packages/taler-wallet-webextension/src/cta/Withdraw/index.ts | 10 |
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( |