Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DO NOT MERGE] Fork to disable amountTooLow error from suggested-fees. #1340

Closed
wants to merge 1 commit into from
Closed
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
12 changes: 6 additions & 6 deletions api/suggested-fees.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
import {
InvalidParamError,
AmountTooHighError,
AmountTooLowError,

Check warning on line 39 in api/suggested-fees.ts

View workflow job for this annotation

GitHub Actions / format-and-lint

'AmountTooLowError' is defined but never used
} from "./_errors";

const { BigNumber } = ethers;
Expand Down Expand Up @@ -81,7 +81,7 @@
let {
amount: amountInput,
timestamp,
skipAmountLimit,

Check warning on line 84 in api/suggested-fees.ts

View workflow job for this annotation

GitHub Actions / format-and-lint

'skipAmountLimit' is assigned a value but never used
recipient,
relayer,
message,
Expand Down Expand Up @@ -237,12 +237,12 @@

const isAmountTooLow = BigNumber.from(amountInput).lt(minDeposit);

const skipAmountLimitEnabled = skipAmountLimit === "true";
if (!skipAmountLimitEnabled && isAmountTooLow) {
throw new AmountTooLowError({
message: `Sent amount is too low relative to fees`,
});
}
// const skipAmountLimitEnabled = skipAmountLimit === "true";
// if (!skipAmountLimitEnabled && isAmountTooLow) {
// throw new AmountTooLowError({
// message: `Sent amount is too low relative to fees`,
// });
// }

// Across V3's new `deposit` function requires now a total fee that includes the LP fee
const totalRelayFee = BigNumber.from(relayerFeeDetails.relayFeeTotal).add(
Expand Down
Loading