diff options
author | Florian Dold <florian@dold.me> | 2024-04-02 19:08:42 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2024-04-02 19:08:42 +0200 |
commit | 8fce8dd5601bb88608884d2ce1e14f422e810ef1 (patch) | |
tree | a6b58b430d69cbfb95d70b8ecf76f183e78c4e31 /packages | |
parent | 06cabfb01f8a70f2480485e51b2a79d178af9c3a (diff) |
wallet-core: fix buggy creation of denom-loss transactions
Diffstat (limited to 'packages')
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-payment-expired.ts | 11 | ||||
-rw-r--r-- | packages/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 index 176fc74f7..a837b18fa 100644 --- 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 index 0fbe7297c..fa2876e30 100644 --- 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); |