diff options
author | Florian Dold <florian@dold.me> | 2024-02-20 02:19:41 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2024-02-20 02:19:41 +0100 |
commit | df6f50028339c033982b94662e8ab465383095b3 (patch) | |
tree | f2963e5bee0dbe9552b0978ab59f7d384be5f64a /packages/taler-harness/src | |
parent | 578bd4b1ed12049800556460359cb55a1e8545a2 (diff) | |
download | wallet-core-df6f50028339c033982b94662e8ab465383095b3.tar.xz |
wallet-core: count deposits towards pendingOutgoing
Diffstat (limited to 'packages/taler-harness/src')
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-deposit.ts | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/packages/taler-harness/src/integrationtests/test-deposit.ts b/packages/taler-harness/src/integrationtests/test-deposit.ts index 4339e75db..fa5750d0c 100644 --- a/packages/taler-harness/src/integrationtests/test-deposit.ts +++ b/packages/taler-harness/src/integrationtests/test-deposit.ts @@ -22,6 +22,7 @@ import { NotificationType, TransactionMajorState, TransactionMinorState, + j2s, } from "@gnu-taler/taler-util"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { GlobalTestState, generateRandomPayto } from "../harness/harness.js"; @@ -29,7 +30,6 @@ import { createSimpleTestkudosEnvironmentV2, withdrawViaBankV2, } from "../harness/helpers.js"; -import { defaultCoinConfig } from "../harness/denomStructures.js"; /** * Run test for basic, bank-integrated withdrawal and payment. @@ -84,6 +84,10 @@ export async function runDepositTest(t: GlobalTestState) { t.assertDeepEqual(depositGroupResult.transactionId, depositTxId); + const balDuring = await walletClient.call(WalletApiOperation.GetBalances, {}); + console.log(`balances during deposit: ${j2s(balDuring)}`); + t.assertAmountEquals(balDuring.balances[0].pendingOutgoing, "TESTKUDOS:10"); + await depositTrack; await exchange.runAggregatorOnceWithTimetravel({ @@ -103,6 +107,10 @@ export async function runDepositTest(t: GlobalTestState) { // The raw amount is what ends up on the bank account, which includes // deposit and wire fees. t.assertDeepEqual(transactions.transactions[1].amountRaw, "TESTKUDOS:9.79"); + + const balAfter = await walletClient.call(WalletApiOperation.GetBalances, {}); + console.log(`balances after deposit: ${j2s(balAfter)}`); + t.assertAmountEquals(balAfter.balances[0].pendingOutgoing, "TESTKUDOS:0"); } runDepositTest.suites = ["wallet"]; |