taler-typescript-core

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

commit 8fce8dd5601bb88608884d2ce1e14f422e810ef1
parent 06cabfb01f8a70f2480485e51b2a79d178af9c3a
Author: Florian Dold <florian@dold.me>
Date:   Tue,  2 Apr 2024 19:08:42 +0200

wallet-core: fix buggy creation of denom-loss transactions

Diffstat:
Mpackages/taler-harness/src/integrationtests/test-payment-expired.ts | 11++++++-----
Mpackages/taler-wallet-core/src/exchanges.ts | 5++++-
2 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/packages/taler-harness/src/integrationtests/test-payment-expired.ts b/packages/taler-harness/src/integrationtests/test-payment-expired.ts @@ -117,15 +117,16 @@ export async function runPaymentExpiredTest(t: GlobalTestState) { }); await walletClient.call(WalletApiOperation.TestingWaitTransactionsFinal, {}); - const bal = await walletClient.call(WalletApiOperation.GetBalances, {}); - console.log(bal); - - t.assertAmountEquals(bal.balances[0].available, "TESTKUDOS:18.93"); - const txns = await walletClient.call(WalletApiOperation.GetTransactions, { + sort: "stable-ascending", includeRefreshes: true, }); console.log(j2s(txns)); + + const bal = await walletClient.call(WalletApiOperation.GetBalances, {}); + console.log(j2s(bal)); + + t.assertAmountEquals(bal.balances[0].available, "TESTKUDOS:18.93"); } runPaymentExpiredTest.suites = ["wallet"]; diff --git a/packages/taler-wallet-core/src/exchanges.ts b/packages/taler-wallet-core/src/exchanges.ts @@ -1721,7 +1721,10 @@ async function handleDenomLoss( continue; } const n = coinAv.freshCoinCount; - const denom = await tx.denominations.get(coinAv.denomPubHash); + const denom = await tx.denominations.get([ + coinAv.exchangeBaseUrl, + coinAv.denomPubHash, + ]); const timestampExpireDeposit = !denom ? undefined : timestampAbsoluteFromDb(denom.stampExpireDeposit);