difftreelog
wait 3 blocks to confirm xcm transfer
in: master
1 file changed
tests/src/xcmTransfer.test.tsdiffbeforeafterboth23const KARURA_CHAIN = 2000;23const KARURA_CHAIN = 2000;24const KARURA_PORT = '9946';24const KARURA_PORT = '9946';252526describe('Integration test: Exchanging QTZ/OPL with Karura', () => {26describe('Integration test: Exchanging OPL with Karura', () => {27 let alice: IKeyringPair;27 let alice: IKeyringPair;28 28 29 before(async () => {29 before(async () => {124124125 await usingApi(async (api) => {125 await usingApi(async (api) => {126 // todo do something about instant sealing, where there might not be any new blocks126 // todo do something about instant sealing, where there might not be any new blocks127 await waitNewBlocks(api, 1);127 await waitNewBlocks(api, 3);128 const {free} = (await api.query.tokens.accounts(alice.addressRaw, {ForeignAsset: 0})).toJSON() as any;128 const {free} = (await api.query.tokens.accounts(alice.addressRaw, {ForeignAsset: 0})).toJSON() as any;129 expect(free > balanceOnKaruraBefore).to.be.true;129 expect(free > balanceOnKaruraBefore).to.be.true;130 }, {provider: new WsProvider('ws://127.0.0.1:' + KARURA_PORT)});130 }, {provider: new WsProvider('ws://127.0.0.1:' + KARURA_PORT)});170170171 await usingApi(async (api) => {171 await usingApi(async (api) => {172 // todo do something about instant sealing, where there might not be any new blocks172 // todo do something about instant sealing, where there might not be any new blocks173 await waitNewBlocks(api, 1);173 await waitNewBlocks(api, 3);174 const [balanceAfter] = await getBalance(api, [alicesPublicKey]);174 const [balanceAfter] = await getBalance(api, [alicesPublicKey]);175 expect(balanceAfter > balanceBefore).to.be.true;175 expect(balanceAfter > balanceBefore).to.be.true;176 });176 });