diff --git a/src/index.test.ts b/src/index.test.ts index 7a3c1bf..eeffcdc 100644 --- a/src/index.test.ts +++ b/src/index.test.ts @@ -44,9 +44,7 @@ const registryTests = () => { expect(quantity).toBe('10000'); }); - test('Get transaction info.', async () => { - const bondAmount = '100000'; - + test('Send batch txs.', async () => { const accounts = await createAccounts(10); for (let i = 0; i < 10; i++) { @@ -55,11 +53,16 @@ const registryTests = () => { await registry.sendCoins({ denom: DENOM, amount, destinationAddress: accounts[i].address }, fromAccount, fee); } - const bondPromises = accounts.map((account) => - registry.createBond({ denom: DENOM, amount: bondAmount }, account.getPrivateKey(), fee) - ); - await Promise.all(bondPromises); + await Promise.all(accounts.map((account) => + registry.createBond({ denom: DENOM, amount: '100000' }, account.getPrivateKey(), fee) + )); + + const laconicClient = await registry.getLaconicClient(accounts[0]); + const bondTx = await laconicClient.searchTx('message.action="/cerc.bond.v1.MsgCreateBond"'); + + const expectedBlockHeight = bondTx[0].height; + expect(bondTx.every(tx => tx.height === expectedBlockHeight)).toBe(true); }); const createAccounts = async (numAccounts: number): Promise => {