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
--- a/tests/src/xcm/xcmQuartz.test.ts
+++ b/tests/src/xcm/xcmQuartz.test.ts
@@ -695,7 +695,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);
@@ -787,7 +787,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);
@@ -812,7 +812,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);
@@ -901,7 +901,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;
   };
 
@@ -1219,7 +1219,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);
@@ -1319,7 +1319,7 @@
 
     expect(
       xcmpQueueFailEvent!.isUntrustedReserveLocation,
-      'The XCM error should be \'isUntrustedReserveLocation\'',
+      `The XCM error should be 'isUntrustedReserveLocation', got '${xcmpQueueFailEvent!.toHuman()}'`,
     ).to.be.true;
 
     let accountBalance = await helper.balance.getSubstrate(targetAccount.address);
@@ -1348,7 +1348,7 @@
 
     expect(
       xcmpQueueFailEvent!.isUntrustedReserveLocation,
-      'The XCM error should be \'isUntrustedReserveLocation\'',
+      `The XCM error should be 'isUntrustedReserveLocation', got '${xcmpQueueFailEvent!.toHuman()}'`,
     ).to.be.true;
 
     accountBalance = await helper.balance.getSubstrate(targetAccount.address);
@@ -1620,7 +1620,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);
@@ -1712,7 +1712,7 @@
 
     expect(
       xcmpQueueFailEvent!.isUntrustedReserveLocation,
-      'The XCM error should be \'isUntrustedReserveLocation\'',
+      `The XCM error should be 'isUntrustedReserveLocation', got '${xcmpQueueFailEvent!.toHuman()}'`,
     ).to.be.true;
 
     let accountBalance = await helper.balance.getSubstrate(targetAccount.address);
@@ -1737,7 +1737,7 @@
 
     expect(
       xcmpQueueFailEvent!.isUntrustedReserveLocation,
-      'The XCM error should be \'isUntrustedReserveLocation\'',
+      `The XCM error should be 'isUntrustedReserveLocation', got '${xcmpQueueFailEvent!.toHuman()}'`,
     ).to.be.true;
 
     accountBalance = await helper.balance.getSubstrate(targetAccount.address);
modifiedtests/src/xcm/xcmUnique.test.tsdiffbeforeafterboth
697697
698 expect(698 expect(
699 xcmpQueueFailEvent!.isFailedToTransactAsset,699 xcmpQueueFailEvent!.isFailedToTransactAsset,
700 'The XCM error should be \'FailedToTransactAsset\'',700 `The XCM error should be 'FailedToTransactAsset', got '${xcmpQueueFailEvent!.toHuman()}'`,
701 ).to.be.true;701 ).to.be.true;
702702
703 targetAccountBalance = await helper.balance.getSubstrate(targetAccount.address);703 targetAccountBalance = await helper.balance.getSubstrate(targetAccount.address);
789789
790 expect(790 expect(
791 xcmpQueueFailEvent!.isUntrustedReserveLocation,791 xcmpQueueFailEvent!.isUntrustedReserveLocation,
792 'The XCM error should be \'isUntrustedReserveLocation\'',792 `The XCM error should be 'UntrustedReserveLocation', got '${xcmpQueueFailEvent!.toHuman()}'`,
793 ).to.be.true;793 ).to.be.true;
794794
795 let accountBalance = await helper.balance.getSubstrate(targetAccount.address);795 let accountBalance = await helper.balance.getSubstrate(targetAccount.address);
814814
815 expect(815 expect(
816 xcmpQueueFailEvent!.isUntrustedReserveLocation,816 xcmpQueueFailEvent!.isUntrustedReserveLocation,
817 'The XCM error should be \'isUntrustedReserveLocation\'',817 `The XCM error should be 'UntrustedReserveLocation', got '${xcmpQueueFailEvent!.toHuman()}'`,
818 ).to.be.true;818 ).to.be.true;
819819
820 accountBalance = await helper.balance.getSubstrate(targetAccount.address);820 accountBalance = await helper.balance.getSubstrate(targetAccount.address);
903903
904 expect(904 expect(
905 xcmpQueueFailEvent!.isFailedToTransactAsset,905 xcmpQueueFailEvent!.isFailedToTransactAsset,
906 `[reject ${network} tokens] The XCM error should be 'FailedToTransactAsset'`,906 `[reject ${network} tokens] The XCM error should be 'FailedToTransactAsset', got '${xcmpQueueFailEvent!.toHuman()}'`,
907 ).to.be.true;907 ).to.be.true;
908 };908 };
909909
12221222
1223 expect(1223 expect(
1224 xcmpQueueFailEvent!.isFailedToTransactAsset,1224 xcmpQueueFailEvent!.isFailedToTransactAsset,
1225 'The XCM error should be \'FailedToTransactAsset\'',1225 `The XCM error should be 'FailedToTransactAsset', got '${xcmpQueueFailEvent!.toHuman()}'`,
1226 ).to.be.true;1226 ).to.be.true;
12271227
1228 targetAccountBalance = await helper.balance.getSubstrate(targetAccount.address);1228 targetAccountBalance = await helper.balance.getSubstrate(targetAccount.address);
13221322
1323 expect(1323 expect(
1324 xcmpQueueFailEvent!.isUntrustedReserveLocation,1324 xcmpQueueFailEvent!.isUntrustedReserveLocation,
1325 'The XCM error should be \'isUntrustedReserveLocation\'',1325 `The XCM error should be 'UntrustedReserveLocation', got '${xcmpQueueFailEvent!.toHuman()}'`,
1326 ).to.be.true;1326 ).to.be.true;
13271327
1328 let accountBalance = await helper.balance.getSubstrate(targetAccount.address);1328 let accountBalance = await helper.balance.getSubstrate(targetAccount.address);
13511351
1352 expect(1352 expect(
1353 xcmpQueueFailEvent!.isUntrustedReserveLocation,1353 xcmpQueueFailEvent!.isUntrustedReserveLocation,
1354 'The XCM error should be \'isUntrustedReserveLocation\'',1354 `The XCM error should be 'UntrustedReserveLocation', got '${xcmpQueueFailEvent!.toHuman()}'`,
1355 ).to.be.true;1355 ).to.be.true;
13561356
1357 accountBalance = await helper.balance.getSubstrate(targetAccount.address);1357 accountBalance = await helper.balance.getSubstrate(targetAccount.address);
16221622
1623 expect(1623 expect(
1624 xcmpQueueFailEvent!.isFailedToTransactAsset,1624 xcmpQueueFailEvent!.isFailedToTransactAsset,
1625 'The XCM error should be \'FailedToTransactAsset\'',1625 `The XCM error should be 'FailedToTransactAsset', got '${xcmpQueueFailEvent!.toHuman()}'`,
1626 ).to.be.true;1626 ).to.be.true;
16271627
1628 targetAccountBalance = await helper.balance.getSubstrate(targetAccount.address);1628 targetAccountBalance = await helper.balance.getSubstrate(targetAccount.address);
17141714
1715 expect(1715 expect(
1716 xcmpQueueFailEvent!.isUntrustedReserveLocation,1716 xcmpQueueFailEvent!.isUntrustedReserveLocation,
1717 'The XCM error should be \'isUntrustedReserveLocation\'',1717 `The XCM error should be 'UntrustedReserveLocation', got '${xcmpQueueFailEvent!.toHuman()}'`,
1718 ).to.be.true;1718 ).to.be.true;
17191719
1720 let accountBalance = await helper.balance.getSubstrate(targetAccount.address);1720 let accountBalance = await helper.balance.getSubstrate(targetAccount.address);
17391739
1740 expect(1740 expect(
1741 xcmpQueueFailEvent!.isUntrustedReserveLocation,1741 xcmpQueueFailEvent!.isUntrustedReserveLocation,
1742 'The XCM error should be \'isUntrustedReserveLocation\'',1742 `The XCM error should be 'UntrustedReserveLocation', got '${xcmpQueueFailEvent!.toHuman()}'`,
1743 ).to.be.true;1743 ).to.be.true;
17441744
1745 accountBalance = await helper.balance.getSubstrate(targetAccount.address);1745 accountBalance = await helper.balance.getSubstrate(targetAccount.address);