@@ -20,7 +20,8 @@ const relayAssetsApiV1016000 = new AssetTransferApi(adjustedMockRelayApiV1016000
2020 registryType : 'NPM' ,
2121} ) ;
2222const systemAssetsApi = new AssetTransferApi ( adjustedMockSystemApi , 'statemine' , 2 , { registryType : 'NPM' } ) ;
23- const systemAssetsApiV1016000 = new AssetTransferApi ( adjustedMockSystemApiV1016000 , 'westmint' , 2 , {
23+ const xcmVersion = 2 ;
24+ const systemAssetsApiV1016000 = new AssetTransferApi ( adjustedMockSystemApiV1016000 , 'westmint' , xcmVersion , {
2425 registryType : 'NPM' ,
2526} ) ;
2627
@@ -44,7 +45,7 @@ describe('AssetTransferApi Integration Tests', () => {
4445 format : 'call' ,
4546 method : 'assets::transfer' ,
4647 tx : '0x3208040078b39b0b6dd87cb68009eb570511d21c229bdb5e94129ae570e9b79442ba26659101' ,
47- xcmVersion : null ,
48+ xcmVersion,
4849 } ) ;
4950 } ) ;
5051 it ( 'Should construct a `assets::transferKeepAlive` call on a system parachain' , async ( ) => {
@@ -65,7 +66,7 @@ describe('AssetTransferApi Integration Tests', () => {
6566 format : 'call' ,
6667 method : 'assets::transferKeepAlive' ,
6768 tx : '0x3209040078b39b0b6dd87cb68009eb570511d21c229bdb5e94129ae570e9b79442ba26659101' ,
68- xcmVersion : null ,
69+ xcmVersion,
6970 } ) ;
7071 } ) ;
7172 it ( 'Should construct an `assets::transferAll` call on a system parachain' , async ( ) => {
@@ -86,7 +87,7 @@ describe('AssetTransferApi Integration Tests', () => {
8687 format : 'call' ,
8788 method : 'assets::transferAll' ,
8889 tx : '0x3220040078b39b0b6dd87cb68009eb570511d21c229bdb5e94129ae570e9b79442ba266500' ,
89- xcmVersion : null ,
90+ xcmVersion,
9091 } ) ;
9192 } ) ;
9293 it ( 'Should construct a `balances::transfer` call on a system parachain' , async ( ) => {
@@ -106,7 +107,7 @@ describe('AssetTransferApi Integration Tests', () => {
106107 format : 'call' ,
107108 method : 'balances::transfer' ,
108109 tx : '0x0a000078b39b0b6dd87cb68009eb570511d21c229bdb5e94129ae570e9b79442ba26659101' ,
109- xcmVersion : null ,
110+ xcmVersion,
110111 } ) ;
111112 } ) ;
112113 it ( 'Should construct a `balances::transferKeepAlive` call on a system parachain' , async ( ) => {
@@ -127,7 +128,7 @@ describe('AssetTransferApi Integration Tests', () => {
127128 format : 'call' ,
128129 method : 'balances::transferKeepAlive' ,
129130 tx : '0x0a030078b39b0b6dd87cb68009eb570511d21c229bdb5e94129ae570e9b79442ba26659101' ,
130- xcmVersion : null ,
131+ xcmVersion,
131132 } ) ;
132133 } ) ;
133134 it ( 'Should construct a `balances::transferAll` call on a system parachain' , async ( ) => {
@@ -149,7 +150,7 @@ describe('AssetTransferApi Integration Tests', () => {
149150 format : 'call' ,
150151 method : 'balances::transferAll' ,
151152 tx : '0x0a040078b39b0b6dd87cb68009eb570511d21c229bdb5e94129ae570e9b79442ba266501' ,
152- xcmVersion : null ,
153+ xcmVersion,
153154 } ) ;
154155 } ) ;
155156 it ( 'Should construct a `balances::transferAll` call on a relay chain' , async ( ) => {
@@ -170,7 +171,7 @@ describe('AssetTransferApi Integration Tests', () => {
170171 format : 'call' ,
171172 method : 'balances::transferAll' ,
172173 tx : '0x04040078b39b0b6dd87cb68009eb570511d21c229bdb5e94129ae570e9b79442ba266500' ,
173- xcmVersion : null ,
174+ xcmVersion,
174175 } ) ;
175176 } ) ;
176177 it ( 'Should construct a `balances::transferKeepAlive` call on a relay chain' , async ( ) => {
@@ -191,7 +192,7 @@ describe('AssetTransferApi Integration Tests', () => {
191192 format : 'call' ,
192193 method : 'balances::transferKeepAlive' ,
193194 tx : '0x04030078b39b0b6dd87cb68009eb570511d21c229bdb5e94129ae570e9b79442ba26659101' ,
194- xcmVersion : null ,
195+ xcmVersion,
195196 } ) ;
196197 } ) ;
197198 it ( 'Should construct a `foreignAssets::transfer` call on a system parachain' , async ( ) => {
@@ -211,7 +212,7 @@ describe('AssetTransferApi Integration Tests', () => {
211212 format : 'call' ,
212213 method : 'foreignAssets::transfer' ,
213214 tx : '0x3508010200352105000078b39b0b6dd87cb68009eb570511d21c229bdb5e94129ae570e9b79442ba26659101' ,
214- xcmVersion : null ,
215+ xcmVersion,
215216 } ) ;
216217 } ) ;
217218 it ( 'Should construct a `foreignAssets::transferKeepAlive` call on a system parachain' , async ( ) => {
@@ -232,17 +233,18 @@ describe('AssetTransferApi Integration Tests', () => {
232233 format : 'call' ,
233234 method : 'foreignAssets::transferKeepAlive' ,
234235 tx : '0x3509010200352105000078b39b0b6dd87cb68009eb570511d21c229bdb5e94129ae570e9b79442ba26659101' ,
235- xcmVersion : null ,
236+ xcmVersion,
236237 } ) ;
237238 } ) ;
238239 it ( 'Should construct a `foreignAssets::transferAll` call on a system parachain' , async ( ) => {
240+ const xcmVersion = 3 ;
239241 const res = await systemAssetsApiV1016000 . createTransferTransaction (
240242 '1000' ,
241243 '5EnxxUmEbw8DkENKiYuZ1DwQuMoB2UWEQJZZXrTsxoz7SpgG' ,
242244 [ '{"parents":"2","interior":{"X1":{"GlobalConsensus":"Polkadot"}}}' ] ,
243245 [ '100' ] ,
244246 {
245- xcmVersion : 3 ,
247+ xcmVersion,
246248 transferAll : true ,
247249 format : 'call' ,
248250 } ,
@@ -254,7 +256,7 @@ describe('AssetTransferApi Integration Tests', () => {
254256 format : 'call' ,
255257 method : 'foreignAssets::transferAll' ,
256258 tx : '0x3520020109020078b39b0b6dd87cb68009eb570511d21c229bdb5e94129ae570e9b79442ba266500' ,
257- xcmVersion : null ,
259+ xcmVersion,
258260 } ) ;
259261 } ) ;
260262 it ( 'Should construct a `poolAssets::transfer` call on a system parachain' , async ( ) => {
@@ -274,7 +276,7 @@ describe('AssetTransferApi Integration Tests', () => {
274276 direction : 'local' ,
275277 format : 'call' ,
276278 method : 'poolAssets::transfer' ,
277- xcmVersion : null ,
279+ xcmVersion,
278280 tx : '0x3708000000000078b39b0b6dd87cb68009eb570511d21c229bdb5e94129ae570e9b79442ba26659101' ,
279281 } ) ;
280282 } ) ;
@@ -296,7 +298,7 @@ describe('AssetTransferApi Integration Tests', () => {
296298 direction : 'local' ,
297299 format : 'call' ,
298300 method : 'poolAssets::transferKeepAlive' ,
299- xcmVersion : null ,
301+ xcmVersion,
300302 tx : '0x3709000000000078b39b0b6dd87cb68009eb570511d21c229bdb5e94129ae570e9b79442ba26659101' ,
301303 } ) ;
302304 } ) ;
@@ -319,7 +321,7 @@ describe('AssetTransferApi Integration Tests', () => {
319321 direction : 'local' ,
320322 format : 'call' ,
321323 method : 'poolAssets::transferAll' ,
322- xcmVersion : null ,
324+ xcmVersion,
323325 tx : '0x3720000000000078b39b0b6dd87cb68009eb570511d21c229bdb5e94129ae570e9b79442ba266501' ,
324326 } ) ;
325327 } ) ;
0 commit comments