@@ -245,7 +245,6 @@ describe('erc20-batch-conversion-proxy', () => {
245
245
] ,
246
246
batchConvVersion ,
247
247
wallet ,
248
- true ,
249
248
) ,
250
249
) . rejects . toThrowError (
251
250
new UnsupportedCurrencyError ( {
@@ -266,14 +265,13 @@ describe('erc20-batch-conversion-proxy', () => {
266
265
] ,
267
266
batchConvVersion ,
268
267
wallet ,
269
- true ,
270
268
) ,
271
269
) . rejects . toThrowError ( 'the enrichedRequest has no paymentSettings' ) ;
272
270
} ) ;
273
271
it ( 'should throw an error if the request is ETH' , async ( ) => {
274
272
EURRequest . currencyInfo . type = RequestLogicTypes . CURRENCY . ETH ;
275
273
await expect (
276
- payBatchConversionProxyRequest ( enrichedRequests , batchConvVersion , wallet , true ) ,
274
+ payBatchConversionProxyRequest ( enrichedRequests , batchConvVersion , wallet ) ,
277
275
) . rejects . toThrowError ( `wrong request currencyInfo type` ) ;
278
276
} ) ;
279
277
it ( 'should throw an error if the request has a wrong network' , async ( ) => {
@@ -295,7 +293,7 @@ describe('erc20-batch-conversion-proxy', () => {
295
293
} ;
296
294
297
295
await expect (
298
- payBatchConversionProxyRequest ( enrichedRequests , batchConvVersion , wallet , true ) ,
296
+ payBatchConversionProxyRequest ( enrichedRequests , batchConvVersion , wallet ) ,
299
297
) . rejects . toThrowError ( 'All the requests must have the same network' ) ;
300
298
} ) ;
301
299
it ( 'should throw an error if the request has a wrong payment network id' , async ( ) => {
@@ -316,21 +314,21 @@ describe('erc20-batch-conversion-proxy', () => {
316
314
} ;
317
315
318
316
await expect (
319
- payBatchConversionProxyRequest ( enrichedRequests , batchConvVersion , wallet , true ) ,
317
+ payBatchConversionProxyRequest ( enrichedRequests , batchConvVersion , wallet ) ,
320
318
) . rejects . toThrowError (
321
319
'request cannot be processed, or is not an pn-any-to-erc20-proxy request' ,
322
320
) ;
323
321
} ) ;
324
322
it ( "should throw an error if one request's currencyInfo has no value" , async ( ) => {
325
323
EURRequest . currencyInfo . value = '' ;
326
324
await expect (
327
- payBatchConversionProxyRequest ( enrichedRequests , batchConvVersion , wallet , true ) ,
325
+ payBatchConversionProxyRequest ( enrichedRequests , batchConvVersion , wallet ) ,
328
326
) . rejects . toThrowError ( "The currency '' is unknown or not supported" ) ;
329
327
} ) ;
330
328
it ( 'should throw an error if request has no extension' , async ( ) => {
331
329
EURRequest . extensions = [ ] as any ;
332
330
await expect (
333
- payBatchConversionProxyRequest ( enrichedRequests , batchConvVersion , wallet , true ) ,
331
+ payBatchConversionProxyRequest ( enrichedRequests , batchConvVersion , wallet ) ,
334
332
) . rejects . toThrowError ( 'no payment network found' ) ;
335
333
} ) ;
336
334
it ( 'should throw an error if there is a wrong version mapping' , async ( ) => {
@@ -341,7 +339,7 @@ describe('erc20-batch-conversion-proxy', () => {
341
339
} ,
342
340
} ;
343
341
await expect (
344
- payBatchConversionProxyRequest ( enrichedRequests , batchConvVersion , wallet , true ) ,
342
+ payBatchConversionProxyRequest ( enrichedRequests , batchConvVersion , wallet ) ,
345
343
) . rejects . toThrowError ( 'Every payment network type and version must be identical' ) ;
346
344
} ) ;
347
345
} ) ;
@@ -447,7 +445,6 @@ describe('erc20-batch-conversion-proxy', () => {
447
445
} ) ,
448
446
batchConvVersion ,
449
447
wallet ,
450
- true ,
451
448
) ;
452
449
const confirmedTx = await tx . wait ( 1 ) ;
453
450
expect ( confirmedTx . status ) . toEqual ( 1 ) ;
@@ -503,7 +500,6 @@ describe('erc20-batch-conversion-proxy', () => {
503
500
] ,
504
501
batchConvVersion ,
505
502
wallet ,
506
- true ,
507
503
) ;
508
504
const confirmedTx = await tx . wait ( 1 ) ;
509
505
expect ( confirmedTx . status ) . toEqual ( 1 ) ;
@@ -557,14 +553,14 @@ describe('erc20-batch-conversion-proxy', () => {
557
553
it ( 'should throw an error if the request is not erc20' , async ( ) => {
558
554
FAURequest . currencyInfo . type = RequestLogicTypes . CURRENCY . ETH ;
559
555
await expect (
560
- payBatchConversionProxyRequest ( enrichedRequests , batchConvVersion , wallet , true ) ,
556
+ payBatchConversionProxyRequest ( enrichedRequests , batchConvVersion , wallet ) ,
561
557
) . rejects . toThrowError ( 'wrong request currencyInfo type' ) ;
562
558
} ) ;
563
559
564
560
it ( "should throw an error if one request's currencyInfo has no value" , async ( ) => {
565
561
FAURequest . currencyInfo . value = '' ;
566
562
await expect (
567
- payBatchConversionProxyRequest ( enrichedRequests , batchConvVersion , wallet , true ) ,
563
+ payBatchConversionProxyRequest ( enrichedRequests , batchConvVersion , wallet ) ,
568
564
) . rejects . toThrowError (
569
565
'request cannot be processed, or is not an pn-erc20-fee-proxy-contract request' ,
570
566
) ;
@@ -573,7 +569,7 @@ describe('erc20-batch-conversion-proxy', () => {
573
569
it ( "should throw an error if one request's currencyInfo has no network" , async ( ) => {
574
570
FAURequest . currencyInfo . network = '' ;
575
571
await expect (
576
- payBatchConversionProxyRequest ( enrichedRequests , batchConvVersion , wallet , true ) ,
572
+ payBatchConversionProxyRequest ( enrichedRequests , batchConvVersion , wallet ) ,
577
573
) . rejects . toThrowError (
578
574
'request cannot be processed, or is not an pn-erc20-fee-proxy-contract request' ,
579
575
) ;
@@ -582,7 +578,7 @@ describe('erc20-batch-conversion-proxy', () => {
582
578
it ( 'should throw an error if request has no extension' , async ( ) => {
583
579
FAURequest . extensions = [ ] as any ;
584
580
await expect (
585
- payBatchConversionProxyRequest ( enrichedRequests , batchConvVersion , wallet , true ) ,
581
+ payBatchConversionProxyRequest ( enrichedRequests , batchConvVersion , wallet ) ,
586
582
) . rejects . toThrowError ( 'no payment network found' ) ;
587
583
} ) ;
588
584
@@ -594,7 +590,7 @@ describe('erc20-batch-conversion-proxy', () => {
594
590
} ,
595
591
} ;
596
592
await expect (
597
- payBatchConversionProxyRequest ( enrichedRequests , batchConvVersion , wallet , true ) ,
593
+ payBatchConversionProxyRequest ( enrichedRequests , batchConvVersion , wallet ) ,
598
594
) . rejects . toThrowError ( 'Every payment network type and version must be identical' ) ;
599
595
} ) ;
600
596
} ) ;
@@ -650,12 +646,7 @@ describe('erc20-batch-conversion-proxy', () => {
650
646
const initialFAUFeeBalance = await getErc20Balance ( FAUValidRequest , feeAddress , provider ) ;
651
647
652
648
// Batch payment
653
- const tx = await payBatchConversionProxyRequest (
654
- enrichedRequests ,
655
- batchConvVersion ,
656
- wallet ,
657
- true ,
658
- ) ;
649
+ const tx = await payBatchConversionProxyRequest ( enrichedRequests , batchConvVersion , wallet ) ;
659
650
const confirmedTx = await tx . wait ( 1 ) ;
660
651
expect ( confirmedTx . status ) . toBe ( 1 ) ;
661
652
expect ( tx . hash ) . not . toBeUndefined ( ) ;
0 commit comments