git.delta.rocks / unique-network / refs/commits / 21098dd868e8

difftreelog

Merge pull request #860 from UniqueNetwork/fix/remove-v1-from-xcm-tests

Yaroslav Bolyukin2023-01-26parents: #4b31b6e #e432f3e.patch.diff
in: master
Fix/remove v1 from xcm tests

4 files changed

modifiedtests/src/benchmarks/mintFee/benchmark.tsdiffbeforeafterboth
--- a/tests/src/benchmarks/mintFee/benchmark.ts
+++ b/tests/src/benchmarks/mintFee/benchmark.ts
@@ -100,7 +100,7 @@
 
     const ethSigner = await helper.eth.createAccountWithBalance(donor, 100n);
     const ethReceiver = await helper.eth.createAccountWithBalance(donor, 5n);
-   
+
     let susbtrateCollection: UniqueNFTCollection | null;
     const createCollectionSubstrateFee = convertToTokens(
       await helper.arrange.calculcateFee({Substrate: donor.address}, async () => {
modifiedtests/src/burnItem.test.tsdiffbeforeafterboth
15// 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/>.
1616
17import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';
18import {expect, itSub, Pallets, usingPlaygrounds} from './util';18import {expect, itSub, usingPlaygrounds} from './util';
1919
2020
21describe('integration test: ext. burnItem():', () => {21describe('integration test: ext. burnItem():', () => {
22 let donor: IKeyringPair;22 let donor: IKeyringPair;
23 let alice: IKeyringPair;23 let alice: IKeyringPair;
24 let bob: IKeyringPair;
2524
26 before(async () => {25 before(async () => {
27 await usingPlaygrounds(async (helper, privateKey) => {26 await usingPlaygrounds(async (helper, privateKey) => {
28 donor = await privateKey({filename: __filename});27 donor = await privateKey({filename: __filename});
29 [alice, bob] = await helper.arrange.createAccounts([100n, 100n], donor);28 [alice] = await helper.arrange.createAccounts([100n], donor);
30 });29 });
31 });30 });
3231
modifiedtests/src/xcm/xcmQuartz.test.tsdiffbeforeafterboth
--- a/tests/src/xcm/xcmQuartz.test.ts
+++ b/tests/src/xcm/xcmQuartz.test.ts
@@ -463,13 +463,13 @@
 
     await usingKaruraPlaygrounds(karuraUrl, async (helper) => {
       const destination = {
-        V0: {
-          X2: [
-            'Parent',
-            {
+        V1: {
+          parents: 1,
+          interior: {
+            X1: {
               Parachain: QUARTZ_CHAIN,
             },
-          ],
+          },
         },
       };
 
@@ -494,22 +494,25 @@
 
   itSub('Should connect and send QTZ to Karura', async ({helper}) => {
     const destination = {
-      V0: {
-        X2: [
-          'Parent',
-          {
+      V1: {
+        parents: 1,
+        interior: {
+          X1: {
             Parachain: KARURA_CHAIN,
           },
-        ],
+        },
       },
     };
 
     const beneficiary = {
-      V0: {
-        X1: {
-          AccountId32: {
-            network: 'Any',
-            id: randomAccount.addressRaw,
+      V1: {
+        parents: 0,
+        interior: {
+          X1: {
+            AccountId32: {
+              network: 'Any',
+              id: randomAccount.addressRaw,
+            },
           },
         },
       },
modifiedtests/src/xcm/xcmUnique.test.tsdiffbeforeafterboth
--- a/tests/src/xcm/xcmUnique.test.ts
+++ b/tests/src/xcm/xcmUnique.test.ts
@@ -463,13 +463,13 @@
 
     await usingAcalaPlaygrounds(acalaUrl, async (helper) => {
       const destination = {
-        V0: {
-          X2: [
-            'Parent',
-            {
+        V1: {
+          parents: 1,
+          interior: {
+            X1: {
               Parachain: UNIQUE_CHAIN,
             },
-          ],
+          },
         },
       };
 
@@ -495,22 +495,25 @@
   itSub('Should connect and send UNQ to Acala', async ({helper}) => {
 
     const destination = {
-      V0: {
-        X2: [
-          'Parent',
-          {
+      V1: {
+        parents: 1,
+        interior: {
+          X1: {
             Parachain: ACALA_CHAIN,
           },
-        ],
+        },
       },
     };
 
     const beneficiary = {
-      V0: {
-        X1: {
-          AccountId32: {
-            network: 'Any',
-            id: randomAccount.addressRaw,
+      V1: {
+        parents: 0,
+        interior: {
+          X1: {
+            AccountId32: {
+              network: 'Any',
+              id: randomAccount.addressRaw,
+            },
           },
         },
       },