difftreelog
fix remove deprecated helpers from opal xcm test
in: master
1 file changed
tests/src/xcm/xcmOpal.test.tsdiffbeforeafterboth15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.161617import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';18import {bigIntToDecimals, paraSiblingSovereignAccount} from './../deprecated-helpers/helpers';19import {itSub, expect, describeXcm, usingPlaygrounds, usingWestmintPlaygrounds, usingRelayPlaygrounds} from '../util/playgrounds';18import {itSub, expect, describeXcm, usingPlaygrounds, usingWestmintPlaygrounds, usingRelayPlaygrounds} from '../util/playgrounds';201921const STATEMINE_CHAIN = 1000;20const STATEMINE_CHAIN = 1000;75 await helper.assets.mint(alice, ASSET_ID, alice.address, ASSET_AMOUNT);74 await helper.assets.mint(alice, ASSET_ID, alice.address, ASSET_AMOUNT);767577 // funding parachain sovereing account (Parachain: 2095)76 // funding parachain sovereing account (Parachain: 2095)78 const parachainSovereingAccount = await paraSiblingSovereignAccount(UNIQUE_CHAIN);77 const parachainSovereingAccount = helper.address.paraSiblingSovereignAccount(UNIQUE_CHAIN);79 await helper.balance.transferToSubstrate(bob, parachainSovereingAccount, fundingAmount);78 await helper.balance.transferToSubstrate(bob, parachainSovereingAccount, fundingAmount);80 });79 });8180215 // common good parachain take commission in it native token214 // common good parachain take commission in it native token216 console.log(215 console.log(217 'Opal to Westmint transaction fees on Westmint: %s WND',216 'Opal to Westmint transaction fees on Westmint: %s WND',218 bigIntToDecimals(balanceStmnBefore - balanceStmnAfter, WESTMINT_DECIMALS),217 helper.util.bigIntToDecimals(balanceStmnBefore - balanceStmnAfter, WESTMINT_DECIMALS),219 );218 );220 expect(balanceStmnBefore > balanceStmnAfter).to.be.true;219 expect(balanceStmnBefore > balanceStmnAfter).to.be.true;221220234 expect(free == TRANSFER_AMOUNT).to.be.true;233 expect(free == TRANSFER_AMOUNT).to.be.true;235 console.log(234 console.log(236 'Opal to Westmint transaction fees on Opal: %s USDT',235 'Opal to Westmint transaction fees on Opal: %s USDT',237 bigIntToDecimals(TRANSFER_AMOUNT - free),236 helper.util.bigIntToDecimals(TRANSFER_AMOUNT - free),238 );237 );239 // ... and parachain native token238 // ... and parachain native token240 expect(balanceOpalAfter == balanceOpalBefore).to.be.true;239 expect(balanceOpalAfter == balanceOpalBefore).to.be.true;241 console.log(240 console.log(242 'Opal to Westmint transaction fees on Opal: %s WND',241 'Opal to Westmint transaction fees on Opal: %s WND',243 bigIntToDecimals(balanceOpalAfter - balanceOpalBefore, WESTMINT_DECIMALS),242 helper.util.bigIntToDecimals(balanceOpalAfter - balanceOpalBefore, WESTMINT_DECIMALS),244 ); 243 ); 245 });244 });246245355 const wndFee = balanceBobRelayTokenAfter - TRANSFER_AMOUNT_RELAY - balanceBobRelayTokenBefore; 354 const wndFee = balanceBobRelayTokenAfter - TRANSFER_AMOUNT_RELAY - balanceBobRelayTokenBefore; 356 console.log(355 console.log(357 'Relay (Westend) to Opal transaction fees: %s OPL',356 'Relay (Westend) to Opal transaction fees: %s OPL',358 bigIntToDecimals(balanceBobAfter - balanceBobBefore),357 helper.util.bigIntToDecimals(balanceBobAfter - balanceBobBefore),359 );358 );360 console.log(359 console.log(361 'Relay (Westend) to Opal transaction fees: %s WND',360 'Relay (Westend) to Opal transaction fees: %s WND',362 bigIntToDecimals(wndFee, WESTMINT_DECIMALS),361 helper.util.bigIntToDecimals(wndFee, WESTMINT_DECIMALS),363 );362 );364 expect(balanceBobBefore == balanceBobAfter).to.be.true;363 expect(balanceBobBefore == balanceBobAfter).to.be.true;365 expect(balanceBobRelayTokenBefore < balanceBobRelayTokenAfter).to.be.true;364 expect(balanceBobRelayTokenBefore < balanceBobRelayTokenAfter).to.be.true;