@@ -30,7 +30,7 @@ describe('Dot Batch Transaction Builder', () => {
3030 describe ( 'build batch transaction' , function ( ) {
3131 const sender = accounts . account1 ;
3232 const referenceBlock = '0x462ab5246361febb9294ffa41dd099edddec30a205ea15fbd247abb0ddbabd51' ;
33- const genesisHash = '0xe143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e ' ;
33+ const genesisHash = '0x67f9723393ef76214df0118c34bbbd3dbebc8ed46a10973a8c969d48fe7598c9 ' ;
3434
3535 beforeEach ( ( ) => {
3636 const config = buildTestConfig ( ) ;
@@ -67,7 +67,7 @@ describe('Dot Batch Transaction Builder', () => {
6767 should . deepEqual ( txJson . nonce , 0 ) ;
6868 should . deepEqual ( txJson . tip , 0 ) ;
6969 should . deepEqual ( txJson . transactionVersion , txVersion ) ;
70- should . deepEqual ( txJson . chainName , 'Westend' ) ;
70+ should . deepEqual ( txJson . chainName , 'Westend Asset Hub ' ) ;
7171 should . deepEqual ( txJson . eraPeriod , 64 ) ;
7272
7373 const txHex = tx . toBroadcastFormat ( ) ;
@@ -104,7 +104,7 @@ describe('Dot Batch Transaction Builder', () => {
104104 should . deepEqual ( txJson . nonce , 0 ) ;
105105 should . deepEqual ( txJson . tip , 0 ) ;
106106 should . deepEqual ( txJson . transactionVersion , txVersion ) ;
107- should . deepEqual ( txJson . chainName , 'Westend' ) ;
107+ should . deepEqual ( txJson . chainName , 'Westend Asset Hub ' ) ;
108108 should . deepEqual ( txJson . eraPeriod , 64 ) ;
109109
110110 const txHex = tx . toBroadcastFormat ( ) ;
@@ -140,7 +140,7 @@ describe('Dot Batch Transaction Builder', () => {
140140 should . deepEqual ( txJson . nonce , 0 ) ;
141141 should . deepEqual ( txJson . tip , 0 ) ;
142142 should . deepEqual ( txJson . transactionVersion , txVersion ) ;
143- should . deepEqual ( txJson . chainName , 'Westend' ) ;
143+ should . deepEqual ( txJson . chainName , 'Westend Asset Hub ' ) ;
144144 should . deepEqual ( txJson . eraPeriod , 64 ) ;
145145
146146 const txHex = tx . toBroadcastFormat ( ) ;
@@ -177,45 +177,14 @@ describe('Dot Batch Transaction Builder', () => {
177177 should . deepEqual ( txJson . nonce , 0 ) ;
178178 should . deepEqual ( txJson . tip , 0 ) ;
179179 should . deepEqual ( txJson . transactionVersion , txVersion ) ;
180- should . deepEqual ( txJson . chainName , 'Westend' ) ;
180+ should . deepEqual ( txJson . chainName , 'Westend Asset Hub ' ) ;
181181 should . deepEqual ( txJson . eraPeriod , 64 ) ;
182182
183183 const txHex = tx . toBroadcastFormat ( ) ;
184184 should . deepEqual ( rawTx . unstake . batchAll . signed , txHex ) ;
185185 } ) ;
186186
187187 describe ( 'from raw' , ( ) => {
188- it ( 'should build a batch from a raw signed tx' , async ( ) => {
189- builder . from ( rawTx . batch . threeAddPureProxies . signed ) ;
190- builder . validity ( { firstValid : 9266787 , maxDuration : 64 } ) . referenceBlock ( referenceBlock ) ;
191- const tx = await builder . build ( ) ;
192- const txJson = tx . toJson ( ) ;
193- // test the call items
194- should . deepEqual ( txJson . sender , sender . address ) ;
195- should . deepEqual ( txJson . batchCalls . length , 3 ) ;
196- should . deepEqual ( txJson . batchCalls [ 0 ] . args ?. proxy_type , ProxyType . ANY ) ;
197- should . deepEqual ( txJson . batchCalls [ 0 ] . args ?. delay , 0 ) ;
198- should . deepEqual ( txJson . batchCalls [ 0 ] . args ?. index , 0 ) ;
199- should . deepEqual ( txJson . batchCalls [ 1 ] . args ?. proxy_type , ProxyType . ANY ) ;
200- should . deepEqual ( txJson . batchCalls [ 1 ] . args ?. delay , 0 ) ;
201- should . deepEqual ( txJson . batchCalls [ 1 ] . args ?. index , 1 ) ;
202- should . deepEqual ( txJson . batchCalls [ 2 ] . args ?. proxy_type , ProxyType . ANY ) ;
203- should . deepEqual ( txJson . batchCalls [ 2 ] . args ?. delay , 0 ) ;
204- should . deepEqual ( txJson . batchCalls [ 2 ] . args ?. index , 2 ) ;
205- should . deepEqual ( txJson . blockNumber , 9266787 ) ;
206- should . deepEqual ( txJson . referenceBlock , referenceBlock ) ;
207- should . deepEqual ( txJson . genesisHash , genesisHash ) ;
208- should . deepEqual ( txJson . specVersion , specVersion ) ;
209- should . deepEqual ( txJson . nonce , 0 ) ;
210- should . deepEqual ( txJson . tip , 0 ) ;
211- should . deepEqual ( txJson . transactionVersion , txVersion ) ;
212- should . deepEqual ( txJson . chainName , 'Westend' ) ;
213- should . deepEqual ( txJson . eraPeriod , 64 ) ;
214-
215- const txHex = tx . toBroadcastFormat ( ) ;
216- should . deepEqual ( rawTx . batch . threeAddPureProxies . signed , txHex ) ;
217- } ) ;
218-
219188 it ( 'should build a batch all from a raw signed tx' , async ( ) => {
220189 builder . from ( rawTx . batchAll . twoAddPureProxies . signed ) ;
221190 builder . validity ( { firstValid : 9279281 , maxDuration : 64 } ) . referenceBlock ( referenceBlock ) ;
@@ -237,7 +206,7 @@ describe('Dot Batch Transaction Builder', () => {
237206 should . deepEqual ( txJson . nonce , 0 ) ;
238207 should . deepEqual ( txJson . tip , 0 ) ;
239208 should . deepEqual ( txJson . transactionVersion , txVersion ) ;
240- should . deepEqual ( txJson . chainName , 'Westend' ) ;
209+ should . deepEqual ( txJson . chainName , 'Westend Asset Hub ' ) ;
241210 should . deepEqual ( txJson . eraPeriod , 64 ) ;
242211
243212 const txHex = tx . toBroadcastFormat ( ) ;
@@ -267,7 +236,7 @@ describe('Dot Batch Transaction Builder', () => {
267236 should . deepEqual ( txJson . nonce , 0 ) ;
268237 should . deepEqual ( txJson . tip , 0 ) ;
269238 should . deepEqual ( txJson . transactionVersion , txVersion ) ;
270- should . deepEqual ( txJson . chainName , 'Westend' ) ;
239+ should . deepEqual ( txJson . chainName , 'Westend Asset Hub ' ) ;
271240 should . deepEqual ( txJson . eraPeriod , 64 ) ;
272241
273242 const txHex = tx . toBroadcastFormat ( ) ;
@@ -299,7 +268,7 @@ describe('Dot Batch Transaction Builder', () => {
299268 should . deepEqual ( txJson . nonce , 0 ) ;
300269 should . deepEqual ( txJson . tip , 0 ) ;
301270 should . deepEqual ( txJson . transactionVersion , txVersion ) ;
302- should . deepEqual ( txJson . chainName , 'Westend' ) ;
271+ should . deepEqual ( txJson . chainName , 'Westend Asset Hub ' ) ;
303272 should . deepEqual ( txJson . eraPeriod , 64 ) ;
304273
305274 const txHex = tx . toBroadcastFormat ( ) ;
@@ -337,7 +306,7 @@ describe('Dot Batch Transaction Builder', () => {
337306 should . deepEqual ( txJson . nonce , 200 ) ;
338307 should . deepEqual ( txJson . tip , 0 ) ;
339308 should . deepEqual ( txJson . transactionVersion , txVersion ) ;
340- should . deepEqual ( txJson . chainName , 'Westend' ) ;
309+ should . deepEqual ( txJson . chainName , 'Westend Asset Hub ' ) ;
341310 should . deepEqual ( txJson . eraPeriod , 64 ) ;
342311
343312 const txHex = tx . toBroadcastFormat ( ) ;
@@ -373,7 +342,7 @@ describe('Dot Batch Transaction Builder', () => {
373342 should . deepEqual ( txJson . nonce , 200 ) ;
374343 should . deepEqual ( txJson . tip , 0 ) ;
375344 should . deepEqual ( txJson . transactionVersion , txVersion ) ;
376- should . deepEqual ( txJson . chainName , 'Westend' ) ;
345+ should . deepEqual ( txJson . chainName , 'Westend Asset Hub ' ) ;
377346 should . deepEqual ( txJson . eraPeriod , 64 ) ;
378347
379348 const txHex = tx . toBroadcastFormat ( ) ;
@@ -408,7 +377,7 @@ describe('Dot Batch Transaction Builder', () => {
408377 should . deepEqual ( txJson . nonce , 0 ) ;
409378 should . deepEqual ( txJson . tip , 0 ) ;
410379 should . deepEqual ( txJson . transactionVersion , txVersion ) ;
411- should . deepEqual ( txJson . chainName , 'Westend' ) ;
380+ should . deepEqual ( txJson . chainName , 'Westend Asset Hub ' ) ;
412381 should . deepEqual ( txJson . eraPeriod , 64 ) ;
413382
414383 const txHex = tx . toBroadcastFormat ( ) ;
@@ -443,7 +412,7 @@ describe('Dot Batch Transaction Builder', () => {
443412 should . deepEqual ( txJson . nonce , 0 ) ;
444413 should . deepEqual ( txJson . tip , 0 ) ;
445414 should . deepEqual ( txJson . transactionVersion , txVersion ) ;
446- should . deepEqual ( txJson . chainName , 'Westend' ) ;
415+ should . deepEqual ( txJson . chainName , 'Westend Asset Hub ' ) ;
447416 should . deepEqual ( txJson . eraPeriod , 64 ) ;
448417
449418 const txHex = tx . toBroadcastFormat ( ) ;
@@ -489,48 +458,14 @@ describe('Dot Batch Transaction Builder', () => {
489458 should . deepEqual ( txJson . nonce , 0 ) ;
490459 should . deepEqual ( txJson . tip , 0 ) ;
491460 should . deepEqual ( txJson . transactionVersion , txVersion ) ;
492- should . deepEqual ( txJson . chainName , 'Westend' ) ;
461+ should . deepEqual ( txJson . chainName , 'Westend Asset Hub ' ) ;
493462 should . deepEqual ( txJson . eraPeriod , 64 ) ;
494463
495464 const txHex = tx . toBroadcastFormat ( ) ;
496465 should . deepEqual ( rawTx . unstake . batchAll . unsigned , txHex ) ;
497466 } ) ;
498467
499468 describe ( 'from raw' , ( ) => {
500- it ( 'should build a batch from a raw unsigned tx' , async ( ) => {
501- builder . from ( rawTx . batch . threeAddPureProxies . unsigned ) ;
502- builder
503- . validity ( { firstValid : 9266787 , maxDuration : 64 } )
504- . referenceBlock ( referenceBlock )
505- . sender ( { address : sender . address } ) ;
506-
507- const tx = await builder . build ( ) ;
508- const txJson = tx . toJson ( ) ;
509- should . deepEqual ( txJson . sender , sender . address ) ;
510- should . deepEqual ( txJson . batchCalls . length , 3 ) ;
511- should . deepEqual ( txJson . batchCalls [ 0 ] . args ?. proxy_type , ProxyType . ANY ) ;
512- should . deepEqual ( txJson . batchCalls [ 0 ] . args ?. delay , 0 ) ;
513- should . deepEqual ( txJson . batchCalls [ 0 ] . args ?. index , 0 ) ;
514- should . deepEqual ( txJson . batchCalls [ 1 ] . args ?. proxy_type , ProxyType . ANY ) ;
515- should . deepEqual ( txJson . batchCalls [ 1 ] . args ?. delay , 0 ) ;
516- should . deepEqual ( txJson . batchCalls [ 1 ] . args ?. index , 1 ) ;
517- should . deepEqual ( txJson . batchCalls [ 2 ] . args ?. proxy_type , ProxyType . ANY ) ;
518- should . deepEqual ( txJson . batchCalls [ 2 ] . args ?. delay , 0 ) ;
519- should . deepEqual ( txJson . batchCalls [ 2 ] . args ?. index , 2 ) ;
520- should . deepEqual ( txJson . blockNumber , 9266787 ) ;
521- should . deepEqual ( txJson . referenceBlock , referenceBlock ) ;
522- should . deepEqual ( txJson . genesisHash , genesisHash ) ;
523- should . deepEqual ( txJson . specVersion , specVersion ) ;
524- should . deepEqual ( txJson . nonce , 0 ) ;
525- should . deepEqual ( txJson . tip , 0 ) ;
526- should . deepEqual ( txJson . transactionVersion , txVersion ) ;
527- should . deepEqual ( txJson . chainName , 'Westend' ) ;
528- should . deepEqual ( txJson . eraPeriod , 64 ) ;
529-
530- const txHex = tx . toBroadcastFormat ( ) ;
531- should . deepEqual ( rawTx . batch . threeAddPureProxies . unsigned , txHex ) ;
532- } ) ;
533-
534469 it ( 'should build a batch all from a raw unsigned tx' , async ( ) => {
535470 builder . from ( rawTx . batchAll . twoAddPureProxies . unsigned ) ;
536471 builder
@@ -555,7 +490,7 @@ describe('Dot Batch Transaction Builder', () => {
555490 should . deepEqual ( txJson . nonce , 200 ) ;
556491 should . deepEqual ( txJson . tip , 0 ) ;
557492 should . deepEqual ( txJson . transactionVersion , txVersion ) ;
558- should . deepEqual ( txJson . chainName , 'Westend' ) ;
493+ should . deepEqual ( txJson . chainName , 'Westend Asset Hub ' ) ;
559494 should . deepEqual ( txJson . eraPeriod , 64 ) ;
560495
561496 const txHex = tx . toBroadcastFormat ( ) ;
@@ -589,7 +524,7 @@ describe('Dot Batch Transaction Builder', () => {
589524 should . deepEqual ( txJson . nonce , 0 ) ;
590525 should . deepEqual ( txJson . tip , 0 ) ;
591526 should . deepEqual ( txJson . transactionVersion , txVersion ) ;
592- should . deepEqual ( txJson . chainName , 'Westend' ) ;
527+ should . deepEqual ( txJson . chainName , 'Westend Asset Hub ' ) ;
593528 should . deepEqual ( txJson . eraPeriod , 64 ) ;
594529
595530 const txHex = tx . toBroadcastFormat ( ) ;
@@ -624,7 +559,7 @@ describe('Dot Batch Transaction Builder', () => {
624559 should . deepEqual ( txJson . nonce , 0 ) ;
625560 should . deepEqual ( txJson . tip , 0 ) ;
626561 should . deepEqual ( txJson . transactionVersion , txVersion ) ;
627- should . deepEqual ( txJson . chainName , 'Westend' ) ;
562+ should . deepEqual ( txJson . chainName , 'Westend Asset Hub ' ) ;
628563 should . deepEqual ( txJson . eraPeriod , 64 ) ;
629564
630565 const txHex = tx . toBroadcastFormat ( ) ;
0 commit comments