difftreelog
fix xcm tests ts errors
in: master
3 files changed
tests/src/xcm/xcmOpal.test.tsdiffbeforeafterboth--- a/tests/src/xcm/xcmOpal.test.ts
+++ b/tests/src/xcm/xcmOpal.test.ts
@@ -21,7 +21,7 @@
import {ApiOptions} from '@polkadot/api/types';
import {IKeyringPair} from '@polkadot/types/types';
import usingApi, {submitTransactionAsync} from './../substrate/substrate-api';
-import {bigIntToDecimals, getGenericResult, paraSiblingSovereignAccount} from './../util/helpers';
+import {bigIntToDecimals, describe_xcm, getGenericResult, paraSiblingSovereignAccount} from './../util/helpers';
import waitNewBlocks from './../substrate/wait-new-blocks';
import {normalizeAccountId} from './../util/helpers';
import getBalance from './../substrate/get-balance';
@@ -50,7 +50,7 @@
// 10,000.00 (ten thousands) USDT
const ASSET_AMOUNT = 1_000_000_000_000_000_000_000n;
-describe('Integration test: Exchanging USDT with Westmint', () => {
+describe_xcm('[XCM] Integration test: Exchanging USDT with Westmint', () => {
let alice: IKeyringPair;
let bob: IKeyringPair;
@@ -345,19 +345,21 @@
},
};
- const currencies = [[
- {
- ForeignAssetId: 0,
- },
- //10_000_000_000_000_000n,
- TRANSFER_AMOUNT,
- ],
- [
- {
- NativeAssetId: 'Parent',
- },
- 400_000_000_000_000n,
- ]];
+ const currencies: [any, bigint][] = [
+ [
+ {
+ ForeignAssetId: 0,
+ },
+ //10_000_000_000_000_000n,
+ TRANSFER_AMOUNT,
+ ],
+ [
+ {
+ NativeAssetId: 'Parent',
+ },
+ 400_000_000_000_000n,
+ ],
+ ];
const feeItem = 1;
const destWeight = 500000000000;
@@ -499,13 +501,14 @@
},
};
- const currencies = [
+ const currencies: any = [
[
{
NativeAssetId: 'Parent',
},
50_000_000_000_000_000n,
- ]];
+ ],
+ ];
const feeItem = 0;
const destWeight = 500000000000;
tests/src/xcm/xcmQuartz.test.tsdiffbeforeafterboth61 return parachainApiOptions(RELAY_PORT);61 return parachainApiOptions(RELAY_PORT);62}62}636364describe_xcm('Integration test: Exchanging tokens with Karura', () => {64describe_xcm('[XCM] Integration test: Exchanging tokens with Karura', () => {65 let alice: IKeyringPair;65 let alice: IKeyringPair;66 let randomAccount: IKeyringPair;66 let randomAccount: IKeyringPair;67 67 246246247 const destWeight = 50000000;247 const destWeight = 50000000;248 248 249 const tx = api.tx.xTokens.transfer(id, TRANSFER_AMOUNT, destination, destWeight);249 const tx = api.tx.xTokens.transfer(id as any, TRANSFER_AMOUNT, destination, destWeight);250 const events = await submitTransactionAsync(randomAccount, tx);250 const events = await submitTransactionAsync(randomAccount, tx);251 const result = getGenericResult(events);251 const result = getGenericResult(events);252 expect(result.success).to.be.true;252 expect(result.success).to.be.true;290});290});291291292// These tests are relevant only when the foreign asset pallet is disabled292// These tests are relevant only when the foreign asset pallet is disabled293describe('Integration test: Quartz rejects non-native tokens', () => {293describe_xcm('[XCM] Integration test: Quartz rejects non-native tokens', () => {294 let alice: IKeyringPair;294 let alice: IKeyringPair;295295296 before(async () => {296 before(async () => {405405406 const destWeight = 50000000;406 const destWeight = 50000000;407407408 const tx = api.tx.xTokens.transfer(id, 100_000_000_000, destination, destWeight);408 const tx = api.tx.xTokens.transfer(id as any, 100_000_000_000, destination, destWeight);409 const events = await submitTransactionAsync(alice, tx);409 const events = await submitTransactionAsync(alice, tx);410 const result = getGenericResult(events);410 const result = getGenericResult(events);411 expect(result.success).to.be.true;411 expect(result.success).to.be.true;431 });431 });432});432});433433434describe_xcm('Integration test: Exchanging QTZ with Moonriver', () => {434describe_xcm('[XCM] Integration test: Exchanging QTZ with Moonriver', () => {435435436 // Quartz constants436 // Quartz constants437 let quartzAlice: IKeyringPair;437 let quartzAlice: IKeyringPair;tests/src/xcm/xcmUnique.test.tsdiffbeforeafterboth--- a/tests/src/xcm/xcmUnique.test.ts
+++ b/tests/src/xcm/xcmUnique.test.ts
@@ -61,7 +61,7 @@
return parachainApiOptions(RELAY_PORT);
}
-describe_xcm('Integration test: Exchanging tokens with Acala', () => {
+describe_xcm('[XCM] Integration test: Exchanging tokens with Acala', () => {
let alice: IKeyringPair;
let randomAccount: IKeyringPair;
@@ -246,7 +246,7 @@
const destWeight = 50000000;
- const tx = api.tx.xTokens.transfer(id, TRANSFER_AMOUNT, destination, destWeight);
+ const tx = api.tx.xTokens.transfer(id as any, TRANSFER_AMOUNT, destination, destWeight);
const events = await submitTransactionAsync(randomAccount, tx);
const result = getGenericResult(events);
expect(result.success).to.be.true;
@@ -290,7 +290,7 @@
});
// These tests are relevant only when the foreign asset pallet is disabled
-describe('Integration test: Unique rejects non-native tokens', () => {
+describe_xcm('[XCM] Integration test: Unique rejects non-native tokens', () => {
let alice: IKeyringPair;
before(async () => {
@@ -405,7 +405,7 @@
const destWeight = 50000000;
- const tx = api.tx.xTokens.transfer(id, 100_000_000_000, destination, destWeight);
+ const tx = api.tx.xTokens.transfer(id as any, 100_000_000_000, destination, destWeight);
const events = await submitTransactionAsync(alice, tx);
const result = getGenericResult(events);
expect(result.success).to.be.true;
@@ -431,7 +431,7 @@
});
});
-describe_xcm('Integration test: Exchanging UNQ with Moonbeam', () => {
+describe_xcm('[XCM] Integration test: Exchanging UNQ with Moonbeam', () => {
// Unique constants
let uniqueAlice: IKeyringPair;