From 270ef03e47095a182832b1ed092aae0b442b21c5 Mon Sep 17 00:00:00 2001 From: aikchun Date: Thu, 10 Jun 2021 14:17:30 +0800 Subject: [PATCH] Added a test to check for the balance after sending out some amount. --- .../__tests__/category/wallet/getBalances.test.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/packages/jellyfish-api-core/__tests__/category/wallet/getBalances.test.ts b/packages/jellyfish-api-core/__tests__/category/wallet/getBalances.test.ts index 67ed028369..a068f47ce5 100644 --- a/packages/jellyfish-api-core/__tests__/category/wallet/getBalances.test.ts +++ b/packages/jellyfish-api-core/__tests__/category/wallet/getBalances.test.ts @@ -40,20 +40,17 @@ describe('getBalances on masternode', () => { expect(typeof balances.watchonly).toStrictEqual('undefined') }) - it('should show balances after transfer', async () => { + it('should show balances after sending the amount out', async () => { const balance = await client.wallet.getBalances() - const address = await client.wallet.getNewAddress() + const address = 'bcrt1q2tke5fa7wx26m684d7yuyt85rvjl36u6q8l6e2' await client.wallet.sendToAddress(address, 10000) await container.generate(1) const newBalance = await client.wallet.getBalances() - console.log('balance.mine.trusted', balance.mine.trusted.toNumber()) - console.log('newBalance.mine.trusted', balance.mine.trusted.toNumber()) - - expect(newBalance.mine.trusted.toNumber() - balance.mine.trusted.toNumber()).toBeGreaterThan(10000) + expect(balance.mine.trusted.toNumber() - newBalance.mine.trusted.toNumber()).toBeGreaterThan(10000) }) })