Skip to content

Commit 42913a7

Browse files
committed
update payment processor batchPayments and fix one test
1 parent 63ae2a1 commit 42913a7

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

packages/payment-processor/src/payment/batch-conversion-proxy.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ export function encodePayBatchConversionRequest(enrichedRequests: EnrichedReques
139139
const proxyContract = BatchConversionPayments__factory.createInterface();
140140
return proxyContract.encodeFunctionData('batchPayments', [
141141
metaDetails,
142+
[],
142143
feeAddress || constants.AddressZero,
143144
]);
144145
}

packages/payment-processor/test/payment/any-to-erc20-batch-proxy.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ describe('erc20-batch-conversion-proxy', () => {
338338
{ gasPrice: '20000000000' },
339339
);
340340
expect(spy).toHaveBeenCalledWith({
341-
data: '0xf0fa379f0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000c5fdf4076b8f3a5357c5e395ab970b5b54098fef0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000f17f52151ebef6c7334fad080c5704d77216b7320000000000000000000000000000000000000000000000000000000005f5e10000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000001e84800000000000000000000000000000000000000000204fce5e3e250261100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000300000000000000000000000017b4158805772ced11225e77339f90beb5aae968000000000000000000000000775eb53d00dd0acd3ec1696472105d579b9b386b00000000000000000000000038cf23c52bb4b13f051aec09580a2de845a7fa35000000000000000000000000000000000000000000000000000000000000000886dfbccad783599a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
341+
data: '0x92cddb91000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000002c0000000000000000000000000c5fdf4076b8f3a5357c5e395ab970b5b54098fef000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000f17f52151ebef6c7334fad080c5704d77216b7320000000000000000000000000000000000000000000000000000000005f5e10000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000001e84800000000000000000000000000000000000000000204fce5e3e250261100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000300000000000000000000000017b4158805772ced11225e77339f90beb5aae968000000000000000000000000775eb53d00dd0acd3ec1696472105d579b9b386b00000000000000000000000038cf23c52bb4b13f051aec09580a2de845a7fa35000000000000000000000000000000000000000000000000000000000000000886dfbccad783599a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
342342
gasPrice: '20000000000',
343343
to: getBatchConversionProxyAddress(EURValidRequest, '0.1.0'),
344344
value: 0,
@@ -409,15 +409,15 @@ describe('erc20-batch-conversion-proxy', () => {
409409
// (exact result) = 1.215516831683168316 (over 18 decimals for this ERC20)
410410
).toEqual(expectedAmountToPay);
411411
});
412-
it('should convert and pay two requests in EUR with ERC20', async () => {
412+
it.only('should convert and pay two requests in EUR with ERC20', async () => {
413413
// Get initial balances
414414
const initialETHFromBalance = await wallet.getBalance();
415415
const initialDAIFromBalance = await getErc20Balance(
416416
DAIValidRequest,
417417
wallet.address,
418418
provider,
419419
);
420-
420+
alphaPaymentSettings.maxToSpend = alphaPaymentSettings.maxToSpend;
421421
// Convert and pay
422422
const tx = await payBatchConversionProxyRequest(
423423
Array(2).fill({

0 commit comments

Comments
 (0)