From d4f8612460c4b826a41421f849c5aabffd81ab14 Mon Sep 17 00:00:00 2001 From: Daniel Shiposha Date: Tue, 11 Oct 2022 12:05:04 +0000 Subject: [PATCH] fix: remove deprecated helpers from opal xcm test --- --- a/tests/src/xcm/xcmOpal.test.ts +++ b/tests/src/xcm/xcmOpal.test.ts @@ -15,7 +15,6 @@ // along with Unique Network. If not, see . import {IKeyringPair} from '@polkadot/types/types'; -import {bigIntToDecimals, paraSiblingSovereignAccount} from './../deprecated-helpers/helpers'; import {itSub, expect, describeXcm, usingPlaygrounds, usingWestmintPlaygrounds, usingRelayPlaygrounds} from '../util/playgrounds'; const STATEMINE_CHAIN = 1000; @@ -75,7 +74,7 @@ await helper.assets.mint(alice, ASSET_ID, alice.address, ASSET_AMOUNT); // funding parachain sovereing account (Parachain: 2095) - const parachainSovereingAccount = await paraSiblingSovereignAccount(UNIQUE_CHAIN); + const parachainSovereingAccount = helper.address.paraSiblingSovereignAccount(UNIQUE_CHAIN); await helper.balance.transferToSubstrate(bob, parachainSovereingAccount, fundingAmount); }); @@ -215,7 +214,7 @@ // common good parachain take commission in it native token console.log( 'Opal to Westmint transaction fees on Westmint: %s WND', - bigIntToDecimals(balanceStmnBefore - balanceStmnAfter, WESTMINT_DECIMALS), + helper.util.bigIntToDecimals(balanceStmnBefore - balanceStmnAfter, WESTMINT_DECIMALS), ); expect(balanceStmnBefore > balanceStmnAfter).to.be.true; @@ -234,13 +233,13 @@ expect(free == TRANSFER_AMOUNT).to.be.true; console.log( 'Opal to Westmint transaction fees on Opal: %s USDT', - bigIntToDecimals(TRANSFER_AMOUNT - free), + helper.util.bigIntToDecimals(TRANSFER_AMOUNT - free), ); // ... and parachain native token expect(balanceOpalAfter == balanceOpalBefore).to.be.true; console.log( 'Opal to Westmint transaction fees on Opal: %s WND', - bigIntToDecimals(balanceOpalAfter - balanceOpalBefore, WESTMINT_DECIMALS), + helper.util.bigIntToDecimals(balanceOpalAfter - balanceOpalBefore, WESTMINT_DECIMALS), ); }); @@ -355,11 +354,11 @@ const wndFee = balanceBobRelayTokenAfter - TRANSFER_AMOUNT_RELAY - balanceBobRelayTokenBefore; console.log( 'Relay (Westend) to Opal transaction fees: %s OPL', - bigIntToDecimals(balanceBobAfter - balanceBobBefore), + helper.util.bigIntToDecimals(balanceBobAfter - balanceBobBefore), ); console.log( 'Relay (Westend) to Opal transaction fees: %s WND', - bigIntToDecimals(wndFee, WESTMINT_DECIMALS), + helper.util.bigIntToDecimals(wndFee, WESTMINT_DECIMALS), ); expect(balanceBobBefore == balanceBobAfter).to.be.true; expect(balanceBobRelayTokenBefore < balanceBobRelayTokenAfter).to.be.true; -- gitstuff