Skip to content

Commit

Permalink
fix: stop deposit/withdraw modal multiple renders
Browse files Browse the repository at this point in the history
  • Loading branch information
saml33 committed Dec 8, 2021
1 parent 670712e commit 6ac2993
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions components/BalancesTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -404,28 +404,28 @@ const BalancesTable = ({ showZeroBalances = false }) => {
</Button>
</div>
</Td>
{showDepositModal && (
<DepositModal
isOpen={showDepositModal}
onClose={() => setShowDepositModal(false)}
tokenSymbol={actionSymbol}
repayAmount={
balance.borrows.toNumber() > 0
? balance.borrows.toFixed()
: ''
}
/>
)}
{showWithdrawModal && (
<WithdrawModal
isOpen={showWithdrawModal}
onClose={() => setShowWithdrawModal(false)}
tokenSymbol={actionSymbol}
/>
)}
</TrBody>
))}
</tbody>
{showDepositModal && (
<DepositModal
isOpen={showDepositModal}
onClose={() => setShowDepositModal(false)}
tokenSymbol={actionSymbol}
// repayAmount={
// balance.borrows.toNumber() > 0
// ? balance.borrows.toFixed()
// : ''
// }
/>
)}
{showWithdrawModal && (
<WithdrawModal
isOpen={showWithdrawModal}
onClose={() => setShowWithdrawModal(false)}
tokenSymbol={actionSymbol}
/>
)}
</Table>
) : (
<>
Expand Down

0 comments on commit 6ac2993

Please sign in to comment.