Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { BigNumber } from 'ethers';

// Fees: 0.5%
export const REQUEST_SWAP_FEES = 5;
// Batch Fees: 1%
export const BATCH_FEE = 10;
// Batch Fees: .3%
export const BATCH_FEE = 3;

export const updateChainlinkConversionPath = async (
contract: any,
Expand Down Expand Up @@ -57,6 +57,8 @@ export const updateBatchPaymentFees = async (
): Promise<void> => {
const currentFees = await contract.batchFee();
if (currentFees !== BATCH_FEE) {
// Log is useful to have a direct view on was is being updated
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Log is useful to have a direct view on was is being updated
// Log is useful to have a direct view on what is being updated

console.log(`currentFees: ${currentFees.toString()}, new fees: ${BATCH_FEE}`);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should it be displayed by dividing it by 10 ?

await contract.setBatchFee(BATCH_FEE, { nonce: nonce, gasPrice: gasPrice });
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ export const setupBatchPayments = async (

// start from the adminNonce, increase gasPrice if needed
await Promise.all([
updateBatchPaymentFees(batchPaymentConnected, adminNonce, gasPrice),
updatePaymentErc20FeeProxy(batchPaymentConnected, network, adminNonce + 1, gasPrice),
updatePaymentEthFeeProxy(batchPaymentConnected, network, adminNonce + 2, gasPrice),
updateBatchPaymentFees(batchPaymentConnected, adminNonce, gasPrice.mul(2)),
updatePaymentErc20FeeProxy(batchPaymentConnected, network, adminNonce + 1, gasPrice.mul(2)),
updatePaymentEthFeeProxy(batchPaymentConnected, network, adminNonce + 2, gasPrice.mul(2)),
]);
}),
);
Expand Down