Skip to content
Open
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
@@ -1,6 +1,7 @@
import { normalize, normalizeBN, valueToBigNumber } from '@aave/math-utils';
import { OrderStatus } from '@cowprotocol/cow-sdk';
import { Trans } from '@lingui/macro';
import { BigNumber as BigNumberJS } from 'bignumber.js';
import { BigNumber, PopulatedTransaction } from 'ethers';
import { Dispatch } from 'react';
import { calculateSignedAmount } from 'src/hooks/paraswap/common';
Expand Down Expand Up @@ -127,6 +128,7 @@ export const RepayWithCollateralActionsViaParaswap = ({
// Account slippage to make sure we have enough collateral to repay with
repayWithAmount = valueToBigNumber(state.outputAmount || '0')
.multipliedBy(1 + Number(state.slippage) / 100)
.decimalPlaces(state.destinationToken.decimals, BigNumberJS.ROUND_CEIL)
.toFixed(state.destinationToken.decimals);
} else {
// If buy order i want use exactly the collateral to repay with amount
Expand Down