diff --git a/src/components/Modals/BorrowModal.tsx b/src/components/Modals/BorrowModal.tsx index 95807e92..07493d0d 100644 --- a/src/components/Modals/BorrowModal.tsx +++ b/src/components/Modals/BorrowModal.tsx @@ -54,7 +54,6 @@ export default function BorrowModalController() { function BorrowModal(props: Props) { const { modal, account } = props - const [percentage, setPercentage] = useState(0) const [amount, setAmount] = useState(BN_ZERO) const [isConfirming, setIsConfirming] = useToggle() const [borrowToWallet, setBorrowToWallet] = useToggle() @@ -71,7 +70,6 @@ function BorrowModal(props: Props) { function resetState() { setAmount(BN_ZERO) - setPercentage(0) setIsConfirming(false) } @@ -87,7 +85,7 @@ function BorrowModal(props: Props) { result = await repay({ accountId: account.id, coin: BNCoin.fromDenomAndBigNumber(asset.denom, amount), - accountBalance: percentage === 100, + accountBalance: max.isEqualTo(amount), lends, }) } else { @@ -110,16 +108,6 @@ function BorrowModal(props: Props) { useStore.setState({ borrowModal: null }) } - const liquidityAmountString = formatValue(modal.marketData?.liquidity?.amount.toString() || 0, { - abbreviated: true, - decimals: 6, - }) - - const liquidityValueString = formatValue(modal.marketData?.liquidity?.value.toString() || 0, { - abbreviated: true, - decimals: 6, - }) - const handleChange = useCallback( (newAmount: BigNumber) => { const coin = BNCoin.fromDenomAndBigNumber(asset.denom, newAmount)