diff options
Diffstat (limited to 'packages/taler-wallet-webextension/src/cta')
4 files changed, 9 insertions, 9 deletions
diff --git a/packages/taler-wallet-webextension/src/cta/InvoiceCreate/index.ts b/packages/taler-wallet-webextension/src/cta/InvoiceCreate/index.ts index f39ab6794..b8aaed3f2 100644 --- a/packages/taler-wallet-webextension/src/cta/InvoiceCreate/index.ts +++ b/packages/taler-wallet-webextension/src/cta/InvoiceCreate/index.ts @@ -37,7 +37,7 @@ export type State = | State.LoadingUriError | State.Ready | SelectExchangeState.Selecting - | SelectExchangeState.NoExchange; + | SelectExchangeState.NoExchangeFound; export namespace State { export interface Loading { @@ -70,7 +70,7 @@ export namespace State { const viewMapping: StateViewMap<State> = { loading: Loading, error: ErrorAlertView, - "no-exchange": NoExchangesView, + "no-exchange-found": NoExchangesView, "selecting-exchange": ExchangeSelectionPage, ready: ReadyView, }; diff --git a/packages/taler-wallet-webextension/src/cta/Withdraw/index.ts b/packages/taler-wallet-webextension/src/cta/Withdraw/index.ts index 7dfc7c141..45c37ba5c 100644 --- a/packages/taler-wallet-webextension/src/cta/Withdraw/index.ts +++ b/packages/taler-wallet-webextension/src/cta/Withdraw/index.ts @@ -46,7 +46,7 @@ export interface PropsFromParams { export type State = | State.Loading | State.LoadingUriError - | SelectExchangeState.NoExchange + | SelectExchangeState.NoExchangeFound | SelectExchangeState.Selecting | State.Success; @@ -84,7 +84,7 @@ export namespace State { const viewMapping: StateViewMap<State> = { loading: Loading, error: ErrorAlertView, - "no-exchange": NoExchangesView, + "no-exchange-found": NoExchangesView, "selecting-exchange": ExchangeSelectionPage, success: SuccessView, }; diff --git a/packages/taler-wallet-webextension/src/cta/Withdraw/state.ts b/packages/taler-wallet-webextension/src/cta/Withdraw/state.ts index 9522c2bfb..4de026190 100644 --- a/packages/taler-wallet-webextension/src/cta/Withdraw/state.ts +++ b/packages/taler-wallet-webextension/src/cta/Withdraw/state.ts @@ -118,12 +118,12 @@ export function useComponentStateFromURI({ talerWithdrawUri, }, ); - const { amount, defaultExchangeBaseUrl } = uriInfo; + const { amount, defaultExchangeBaseUrl, possibleExchanges } = uriInfo; return { talerWithdrawUri, amount: Amounts.parseOrThrow(amount), thisExchange: defaultExchangeBaseUrl, - exchanges: uriInfo.possibleExchanges, + exchanges: possibleExchanges, }; }); @@ -191,12 +191,12 @@ function exchangeSelectionState( talerWithdrawUri: string | undefined, chosenAmount: AmountJson, exchangeList: ExchangeListItem[], - defaultExchange: string | undefined, + exchangeSuggestedByTheBank: string | undefined, ): RecursiveState<State> { const api = useBackendContext(); const selectedExchange = useSelectedExchange({ currency: chosenAmount.currency, - defaultExchange, + defaultExchange: exchangeSuggestedByTheBank, list: exchangeList, }); diff --git a/packages/taler-wallet-webextension/src/cta/Withdraw/test.ts b/packages/taler-wallet-webextension/src/cta/Withdraw/test.ts index 5a6200844..d90fc72ac 100644 --- a/packages/taler-wallet-webextension/src/cta/Withdraw/test.ts +++ b/packages/taler-wallet-webextension/src/cta/Withdraw/test.ts @@ -122,7 +122,7 @@ describe("Withdraw CTA states", () => { expect(status).equals("loading"); }, ({ status, error }) => { - expect(status).equals("no-exchange"); + expect(status).equals("no-exchange-found"); expect(error).undefined; }, ], |