Commit 112a5b07 authored by Kenny Tran's avatar Kenny Tran

Fix approvals

parent 63440fd8
......@@ -219,7 +219,13 @@ class CurrencyInputPanel extends Component {
const { value: allowance, decimals, label } = selectors().getApprovals(selectedTokenAddress, account, fromToken[selectedTokenAddress]);
if (!label || allowance.isGreaterThanOrEqualTo(BN(value * 10 ** decimals || 0))) {
if (
!label ||
(
allowance.isGreaterThanOrEqualTo(BN((value || 0) * 10 ** decimals)) &&
!BN(allowance).isZero()
)
) {
return;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment