taler-typescript-core

Wallet core logic and WebUIs for various components
Log | Files | Refs | Submodules | README | LICENSE

commit 83e164e2304b2149aa861067833dfef871068437
parent 21a196769897d1092966103a05e99a1ab9a16c11
Author: Sebastian <sebasjm@gmail.com>
Date:   Thu, 29 May 2025 12:29:39 -0300

fix #9536

Diffstat:
Mpackages/taler-wallet-webextension/src/cta/InvoiceCreate/state.ts | 2+-
Mpackages/taler-wallet-webextension/src/wallet/ExchangeSelection/stories.tsx | 6+++++-
Mpackages/taler-wallet-webextension/src/wallet/ExchangeSelection/views.tsx | 4++--
3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/packages/taler-wallet-webextension/src/cta/InvoiceCreate/state.ts b/packages/taler-wallet-webextension/src/cta/InvoiceCreate/state.ts @@ -78,7 +78,7 @@ export function useComponentState({ const amountStr = Amounts.stringify(amount) const selectedExchange = useSelectedExchange({ - currency: scope.currency, + scope, defaultExchange: undefined, list: exchangeList, }); diff --git a/packages/taler-wallet-webextension/src/wallet/ExchangeSelection/stories.tsx b/packages/taler-wallet-webextension/src/wallet/ExchangeSelection/stories.tsx @@ -21,13 +21,17 @@ import * as tests from "@gnu-taler/web-util/testing"; import { ComparingView, ReadyView, NoExchangesView } from "./views.js"; +import { ScopeType } from "@gnu-taler/taler-util"; export default { title: "select exchange", }; export const NoExchangeFound = tests.createExample(NoExchangesView, { - currency: "USD", + scope: { + currency: "USD", + type: ScopeType.Global, + }, defaultExchange: "https://exchange.taler.ar", }); diff --git a/packages/taler-wallet-webextension/src/wallet/ExchangeSelection/views.tsx b/packages/taler-wallet-webextension/src/wallet/ExchangeSelection/views.tsx @@ -144,7 +144,7 @@ export function TosContentView({ export function NoExchangesView({ defaultExchange, - currency, + scope, }: SelectExchangeState.NoExchangeFound): VNode { const { i18n } = useTranslationContext(); return ( @@ -153,7 +153,7 @@ export function NoExchangesView({ <AlertView alert={{ type: "error", - message: i18n.str`There is no exchange available for currency ${currency}`, + message: i18n.str`There is no exchange available for currency ${scope.currency}`, description: i18n.str`You can add more exchanges from the settings.`, cause: undefined, context: undefined,