Skip to content

Commit

Permalink
fix send tokens to address should generate (#255)
Browse files Browse the repository at this point in the history
  • Loading branch information
fuxingloh authored May 19, 2021
1 parent cfbed46 commit 54b3e09
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 0 additions & 2 deletions packages/testing/__tests__/account.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`)
Expand All @@ -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'])
})
Expand Down
4 changes: 3 additions & 1 deletion packages/testing/src/account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ export async function sendTokensToAddress (
amount: number,
symbol: string
): Promise<string> {
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 {
Expand Down

0 comments on commit 54b3e09

Please sign in to comment.