git.delta.rocks / unique-network / refs/commits / 778bcae07852

difftreelog

fix xcm error event log

Daniel Shiposha2023-04-13parent: #22a4d53.patch.diff
in: master

2 files changed

modifiedtests/src/xcm/xcmQuartz.test.tsdiffbeforeafterboth
695695
696 expect(696 expect(
697 xcmpQueueFailEvent!.isFailedToTransactAsset,697 xcmpQueueFailEvent!.isFailedToTransactAsset,
698 'The XCM error should be \'FailedToTransactAsset\'',698 `The XCM error should be 'FailedToTransactAsset', got '${xcmpQueueFailEvent!.toHuman()}'`,
699 ).to.be.true;699 ).to.be.true;
700700
701 targetAccountBalance = await helper.balance.getSubstrate(targetAccount.address);701 targetAccountBalance = await helper.balance.getSubstrate(targetAccount.address);
787787
788 expect(788 expect(
789 xcmpQueueFailEvent!.isUntrustedReserveLocation,789 xcmpQueueFailEvent!.isUntrustedReserveLocation,
790 'The XCM error should be \'isUntrustedReserveLocation\'',790 `The XCM error should be 'UntrustedReserveLocation', got '${xcmpQueueFailEvent!.toHuman()}'`,
791 ).to.be.true;791 ).to.be.true;
792792
793 let accountBalance = await helper.balance.getSubstrate(targetAccount.address);793 let accountBalance = await helper.balance.getSubstrate(targetAccount.address);
812812
813 expect(813 expect(
814 xcmpQueueFailEvent!.isUntrustedReserveLocation,814 xcmpQueueFailEvent!.isUntrustedReserveLocation,
815 'The XCM error should be \'isUntrustedReserveLocation\'',815 `The XCM error should be 'UntrustedReserveLocation', got '${xcmpQueueFailEvent!.toHuman()}'`,
816 ).to.be.true;816 ).to.be.true;
817817
818 accountBalance = await helper.balance.getSubstrate(targetAccount.address);818 accountBalance = await helper.balance.getSubstrate(targetAccount.address);
901901
902 expect(902 expect(
903 xcmpQueueFailEvent!.isFailedToTransactAsset,903 xcmpQueueFailEvent!.isFailedToTransactAsset,
904 `[reject ${network} tokens] The XCM error should be 'FailedToTransactAsset'`,904 `[reject ${network} tokens] The XCM error should be 'FailedToTransactAsset', got '${xcmpQueueFailEvent!.toHuman()}'`,
905 ).to.be.true;905 ).to.be.true;
906 };906 };
907907
12191219
1220 expect(1220 expect(
1221 xcmpQueueFailEvent!.isFailedToTransactAsset,1221 xcmpQueueFailEvent!.isFailedToTransactAsset,
1222 'The XCM error should be \'FailedToTransactAsset\'',1222 `The XCM error should be 'FailedToTransactAsset', got '${xcmpQueueFailEvent!.toHuman()}'`,
1223 ).to.be.true;1223 ).to.be.true;
12241224
1225 targetAccountBalance = await helper.balance.getSubstrate(targetAccount.address);1225 targetAccountBalance = await helper.balance.getSubstrate(targetAccount.address);
13191319
1320 expect(1320 expect(
1321 xcmpQueueFailEvent!.isUntrustedReserveLocation,1321 xcmpQueueFailEvent!.isUntrustedReserveLocation,
1322 'The XCM error should be \'isUntrustedReserveLocation\'',1322 `The XCM error should be 'isUntrustedReserveLocation', got '${xcmpQueueFailEvent!.toHuman()}'`,
1323 ).to.be.true;1323 ).to.be.true;
13241324
1325 let accountBalance = await helper.balance.getSubstrate(targetAccount.address);1325 let accountBalance = await helper.balance.getSubstrate(targetAccount.address);
13481348
1349 expect(1349 expect(
1350 xcmpQueueFailEvent!.isUntrustedReserveLocation,1350 xcmpQueueFailEvent!.isUntrustedReserveLocation,
1351 'The XCM error should be \'isUntrustedReserveLocation\'',1351 `The XCM error should be 'isUntrustedReserveLocation', got '${xcmpQueueFailEvent!.toHuman()}'`,
1352 ).to.be.true;1352 ).to.be.true;
13531353
1354 accountBalance = await helper.balance.getSubstrate(targetAccount.address);1354 accountBalance = await helper.balance.getSubstrate(targetAccount.address);
16201620
1621 expect(1621 expect(
1622 xcmpQueueFailEvent!.isFailedToTransactAsset,1622 xcmpQueueFailEvent!.isFailedToTransactAsset,
1623 'The XCM error should be \'FailedToTransactAsset\'',1623 `The XCM error should be 'FailedToTransactAsset', got '${xcmpQueueFailEvent!.toHuman()}'`,
1624 ).to.be.true;1624 ).to.be.true;
16251625
1626 targetAccountBalance = await helper.balance.getSubstrate(targetAccount.address);1626 targetAccountBalance = await helper.balance.getSubstrate(targetAccount.address);
17121712
1713 expect(1713 expect(
1714 xcmpQueueFailEvent!.isUntrustedReserveLocation,1714 xcmpQueueFailEvent!.isUntrustedReserveLocation,
1715 'The XCM error should be \'isUntrustedReserveLocation\'',1715 `The XCM error should be 'isUntrustedReserveLocation', got '${xcmpQueueFailEvent!.toHuman()}'`,
1716 ).to.be.true;1716 ).to.be.true;
17171717
1718 let accountBalance = await helper.balance.getSubstrate(targetAccount.address);1718 let accountBalance = await helper.balance.getSubstrate(targetAccount.address);
17371737
1738 expect(1738 expect(
1739 xcmpQueueFailEvent!.isUntrustedReserveLocation,1739 xcmpQueueFailEvent!.isUntrustedReserveLocation,
1740 'The XCM error should be \'isUntrustedReserveLocation\'',1740 `The XCM error should be 'isUntrustedReserveLocation', got '${xcmpQueueFailEvent!.toHuman()}'`,
1741 ).to.be.true;1741 ).to.be.true;
17421742
1743 accountBalance = await helper.balance.getSubstrate(targetAccount.address);1743 accountBalance = await helper.balance.getSubstrate(targetAccount.address);
modifiedtests/src/xcm/xcmUnique.test.tsdiffbeforeafterboth
--- a/tests/src/xcm/xcmUnique.test.ts
+++ b/tests/src/xcm/xcmUnique.test.ts
@@ -697,7 +697,7 @@
 
     expect(
       xcmpQueueFailEvent!.isFailedToTransactAsset,
-      'The XCM error should be \'FailedToTransactAsset\'',
+      `The XCM error should be 'FailedToTransactAsset', got '${xcmpQueueFailEvent!.toHuman()}'`,
     ).to.be.true;
 
     targetAccountBalance = await helper.balance.getSubstrate(targetAccount.address);
@@ -789,7 +789,7 @@
 
     expect(
       xcmpQueueFailEvent!.isUntrustedReserveLocation,
-      'The XCM error should be \'isUntrustedReserveLocation\'',
+      `The XCM error should be 'UntrustedReserveLocation', got '${xcmpQueueFailEvent!.toHuman()}'`,
     ).to.be.true;
 
     let accountBalance = await helper.balance.getSubstrate(targetAccount.address);
@@ -814,7 +814,7 @@
 
     expect(
       xcmpQueueFailEvent!.isUntrustedReserveLocation,
-      'The XCM error should be \'isUntrustedReserveLocation\'',
+      `The XCM error should be 'UntrustedReserveLocation', got '${xcmpQueueFailEvent!.toHuman()}'`,
     ).to.be.true;
 
     accountBalance = await helper.balance.getSubstrate(targetAccount.address);
@@ -903,7 +903,7 @@
 
     expect(
       xcmpQueueFailEvent!.isFailedToTransactAsset,
-      `[reject ${network} tokens] The XCM error should be 'FailedToTransactAsset'`,
+      `[reject ${network} tokens] The XCM error should be 'FailedToTransactAsset', got '${xcmpQueueFailEvent!.toHuman()}'`,
     ).to.be.true;
   };
 
@@ -1222,7 +1222,7 @@
 
     expect(
       xcmpQueueFailEvent!.isFailedToTransactAsset,
-      'The XCM error should be \'FailedToTransactAsset\'',
+      `The XCM error should be 'FailedToTransactAsset', got '${xcmpQueueFailEvent!.toHuman()}'`,
     ).to.be.true;
 
     targetAccountBalance = await helper.balance.getSubstrate(targetAccount.address);
@@ -1322,7 +1322,7 @@
 
     expect(
       xcmpQueueFailEvent!.isUntrustedReserveLocation,
-      'The XCM error should be \'isUntrustedReserveLocation\'',
+      `The XCM error should be 'UntrustedReserveLocation', got '${xcmpQueueFailEvent!.toHuman()}'`,
     ).to.be.true;
 
     let accountBalance = await helper.balance.getSubstrate(targetAccount.address);
@@ -1351,7 +1351,7 @@
 
     expect(
       xcmpQueueFailEvent!.isUntrustedReserveLocation,
-      'The XCM error should be \'isUntrustedReserveLocation\'',
+      `The XCM error should be 'UntrustedReserveLocation', got '${xcmpQueueFailEvent!.toHuman()}'`,
     ).to.be.true;
 
     accountBalance = await helper.balance.getSubstrate(targetAccount.address);
@@ -1622,7 +1622,7 @@
 
     expect(
       xcmpQueueFailEvent!.isFailedToTransactAsset,
-      'The XCM error should be \'FailedToTransactAsset\'',
+      `The XCM error should be 'FailedToTransactAsset', got '${xcmpQueueFailEvent!.toHuman()}'`,
     ).to.be.true;
 
     targetAccountBalance = await helper.balance.getSubstrate(targetAccount.address);
@@ -1714,7 +1714,7 @@
 
     expect(
       xcmpQueueFailEvent!.isUntrustedReserveLocation,
-      'The XCM error should be \'isUntrustedReserveLocation\'',
+      `The XCM error should be 'UntrustedReserveLocation', got '${xcmpQueueFailEvent!.toHuman()}'`,
     ).to.be.true;
 
     let accountBalance = await helper.balance.getSubstrate(targetAccount.address);
@@ -1739,7 +1739,7 @@
 
     expect(
       xcmpQueueFailEvent!.isUntrustedReserveLocation,
-      'The XCM error should be \'isUntrustedReserveLocation\'',
+      `The XCM error should be 'UntrustedReserveLocation', got '${xcmpQueueFailEvent!.toHuman()}'`,
     ).to.be.true;
 
     accountBalance = await helper.balance.getSubstrate(targetAccount.address);