From 778bcae0785290d4169cb2819251225162bc8dca Mon Sep 17 00:00:00 2001 From: Daniel Shiposha Date: Thu, 13 Apr 2023 19:59:17 +0000 Subject: [PATCH] fix: xcm error event log --- --- 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); --- 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); -- gitstuff