difftreelog
fix quartz xcm test
in: master
1 file changed
tests/src/xcm/xcmQuartz.test.tsdiffbeforeafterboth376 balanceBobAfter = await helper.balance.getSubstrate(bob.address); 376 balanceBobAfter = await helper.balance.getSubstrate(bob.address); 377 balanceBobRelayTokenAfter = await helper.tokens.accounts(bob.address, {NativeAssetId: 'Parent'});377 balanceBobRelayTokenAfter = await helper.tokens.accounts(bob.address, {NativeAssetId: 'Parent'});378378379 const wndFee = balanceBobRelayTokenAfter - TRANSFER_AMOUNT_RELAY - balanceBobRelayTokenBefore;379 const wndFeeOnQuartz = balanceBobRelayTokenAfter - TRANSFER_AMOUNT_RELAY - balanceBobRelayTokenBefore;380 expect(wndFee > 0).to.be.true('westend fees should be greater than 0');381 console.log(380 console.log(382 '[Relay (Westend) -> Quartz] transaction fees: %s QTZ',381 '[Relay (Westend) -> Quartz] transaction fees: %s QTZ',383 helper.util.bigIntToDecimals(balanceBobAfter - balanceBobBefore),382 helper.util.bigIntToDecimals(balanceBobAfter - balanceBobBefore),384 );383 );385 console.log(384 console.log(386 '[Relay (Westend) -> Quartz] transaction fees: %s WND',385 '[Relay (Westend) -> Quartz] transaction fees: %s WND',387 helper.util.bigIntToDecimals(wndFee, STATEMINE_DECIMALS),386 helper.util.bigIntToDecimals(wndFeeOnQuartz, STATEMINE_DECIMALS),388 );387 );388 expect(wndFeeOnQuartz == 0n, 'No incoming WND fees should be taken').to.be.true;389 expect(balanceBobBefore == balanceBobAfter).to.be.true;389 expect(balanceBobBefore == balanceBobAfter, 'No incoming QTZ fees should be taken').to.be.true;390 expect(balanceBobRelayTokenBefore < balanceBobRelayTokenAfter).to.be.true;390 expect(balanceBobRelayTokenBefore < balanceBobRelayTokenAfter).to.be.true;391 });391 });392392522 balanceQuartzTokenMiddle = await helper.balance.getSubstrate(randomAccount.address);522 balanceQuartzTokenMiddle = await helper.balance.getSubstrate(randomAccount.address);523523524 const qtzFees = balanceQuartzTokenInit - balanceQuartzTokenMiddle - TRANSFER_AMOUNT;524 const qtzFees = balanceQuartzTokenInit - balanceQuartzTokenMiddle - TRANSFER_AMOUNT;525 expect(qtzFees > 0n).to.be.true('qtz Fees should be greater than 0');525 expect(qtzFees > 0n, 'Negative fees QTZ, looks like nothing was transferred').to.be.true;526 console.log('[Quartz -> Karura] transaction fees on Quartz: %s QTZ', helper.util.bigIntToDecimals(qtzFees));526 console.log('[Quartz -> Karura] transaction fees on Quartz: %s QTZ', helper.util.bigIntToDecimals(qtzFees));527527528 await usingKaruraPlaygrounds(karuraUrl, async (helper) => {528 await usingKaruraPlaygrounds(karuraUrl, async (helper) => {579 );579 );580 console.log('[Karura -> Quartz] outcome %s QTZ', helper.util.bigIntToDecimals(qtzOutcomeTransfer));580 console.log('[Karura -> Quartz] outcome %s QTZ', helper.util.bigIntToDecimals(qtzOutcomeTransfer));581581582 expect(karFees > 0).to.be.true;582 expect(karFees > 0, 'Negative fees KAR, looks like nothing was transferred').to.be.true;583 expect(qtzOutcomeTransfer == TRANSFER_AMOUNT).to.be.true;583 expect(qtzOutcomeTransfer == TRANSFER_AMOUNT).to.be.true;584 });584 });585585833833834 const transactionFees = balanceQuartzTokenInit - balanceQuartzTokenMiddle - TRANSFER_AMOUNT;834 const transactionFees = balanceQuartzTokenInit - balanceQuartzTokenMiddle - TRANSFER_AMOUNT;835 console.log('[Quartz -> Moonriver] transaction fees on Quartz: %s QTZ', helper.util.bigIntToDecimals(transactionFees));835 console.log('[Quartz -> Moonriver] transaction fees on Quartz: %s QTZ', helper.util.bigIntToDecimals(transactionFees));836 expect(transactionFees > 0).to.be.true;836 expect(transactionFees > 0, 'Negative fees QTZ, looks like nothing was transferred').to.be.true;837837838 await usingMoonriverPlaygrounds(moonriverUrl, async (helper) => {838 await usingMoonriverPlaygrounds(moonriverUrl, async (helper) => {839 await helper.wait.newBlocks(3);839 await helper.wait.newBlocks(3);886886887 const movrFees = balanceMovrTokenMiddle - balanceMovrTokenFinal;887 const movrFees = balanceMovrTokenMiddle - balanceMovrTokenFinal;888 console.log('[Moonriver -> Quartz] transaction fees on Moonriver: %s MOVR', helper.util.bigIntToDecimals(movrFees));888 console.log('[Moonriver -> Quartz] transaction fees on Moonriver: %s MOVR', helper.util.bigIntToDecimals(movrFees));889 expect(movrFees > 0).to.be.true;889 expect(movrFees > 0, 'Negative fees MOVR, looks like nothing was transferred').to.be.true;890890891 const qtzRandomAccountAsset = await helper.assets.account(assetId, randomAccountMoonriver.address);891 const qtzRandomAccountAsset = await helper.assets.account(assetId, randomAccountMoonriver.address);892892