We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6fb8a0a commit e833337Copy full SHA for e833337
src/hooks/paraswap/common.ts
@@ -22,6 +22,7 @@ import {
22
TransactionParams,
23
} from '@paraswap/sdk';
24
import { GetRateFunctions, RateOptions } from '@paraswap/sdk/dist/methods/swap/rates';
25
+import { BigNumber } from 'bignumber.js';
26
27
import { ComputedReserveData } from '../app-data-provider/useAppDataProvider';
28
@@ -463,7 +464,7 @@ export const maxInputAmountWithSlippage = (
463
464
if (inputAmount === '0') return '0';
465
return valueToBigNumber(inputAmount)
466
.multipliedBy(1 + Number(slippage) / 100)
- .toFixed(decimals);
467
+ .toFixed(decimals, BigNumber.ROUND_UP);
468
};
469
470
export const minimumReceivedAfterSlippage = (
0 commit comments