Fix approvals

This commit is contained in:
Kenny Tran 2018-10-26 18:08:38 -07:00
parent 63440fd83f
commit 112a5b07ec

@ -219,7 +219,13 @@ class CurrencyInputPanel extends Component {
const { value: allowance, decimals, label } = selectors().getApprovals(selectedTokenAddress, account, fromToken[selectedTokenAddress]); 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; return;
} }