diff --git a/packages/testing/__tests__/account.test.ts b/packages/testing/__tests__/account.test.ts index c8aaf147aa..766793cd7b 100644 --- a/packages/testing/__tests__/account.test.ts +++ b/packages/testing/__tests__/account.test.ts @@ -40,7 +40,6 @@ describe('accountToAccount', () => { const to = await container.call('getnewaddress') await accountToAccount(container, symbol, 6, { from, to }) - await container.generate(1) const accounts = await container.call('listaccounts') const account = accounts.find((acc: any) => acc.amount === `6.00000000@${symbol}`) @@ -65,7 +64,6 @@ describe('sendTokensToAddress', () => { const address = await container.call('getnewaddress') await sendTokensToAddress(container, address, 11, 'TTA') - await container.generate(1) const account = await container.call('getaccount', [address]) expect(account).toStrictEqual(['11.00000000@TTA']) }) diff --git a/packages/testing/src/account.ts b/packages/testing/src/account.ts index bc0ffa33f8..4505b644b2 100644 --- a/packages/testing/src/account.ts +++ b/packages/testing/src/account.ts @@ -63,7 +63,9 @@ export async function sendTokensToAddress ( amount: number, symbol: string ): Promise { - return await container.call('sendtokenstoaddress', [{}, { [address]: [`${amount}@${symbol}`] }]) + const txid = await container.call('sendtokenstoaddress', [{}, { [address]: [`${amount}@${symbol}`] }]) + await container.generate(1) + return txid } export interface UtxosToAccountOptions {