taler-typescript-core

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

commit b12966591fba77ebd76d5eeccd608dac379df890
parent 400877b95413821e703914b630f1e67431fedf2e
Author: Florian Dold <dold@taler.net>
Date:   Wed, 22 Jul 2026 00:30:16 +0200

wallet: record a new currency on a known bank account

The guard admitted exactly the case that needed no work and skipped the
one that did, so a currency already on the account was stored twice and a
currency missing from it was never added.

Diffstat:
Mpackages/taler-wallet-core/src/withdraw.ts | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/packages/taler-wallet-core/src/withdraw.ts b/packages/taler-wallet-core/src/withdraw.ts @@ -3706,7 +3706,7 @@ async function storeKnownBankAccount( const existingAccount = await tx.getBankAccountByPaytoUri(senderWire); if (existingAccount) { // Add currency for existing known bank account if necessary - if (existingAccount.currencies?.includes(instructedCurrency)) { + if (!existingAccount.currencies?.includes(instructedCurrency)) { existingAccount.currencies = [ instructedCurrency, ...(existingAccount.currencies ?? []),