Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kirillov13 committed May 8, 2024
1 parent 94d5dce commit 4c236b6
Showing 1 changed file with 0 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,37 +71,6 @@
$: canDoNothing = !hasAddress || !hasNetworks || !hasBalance || !$selectedToken || disabled;
$: {
const isERC20ApprovalDisabled = () => {
return canDoNothing || $insufficientBalance || $validatingAmount || approving || $allApproved || !$enteredAmount;
};
const isERC721ApprovalDisabled = () => {
return $allApproved || approving;
};
const isERC1155ApprovalDisabled = () => {
return $allApproved || approving;
};
const isDisableApprove = () => {
if (checking) return true;
if (!$selectedTokenIsBridged) {
switch (true) {
case isERC20:
return isERC20ApprovalDisabled();
case isERC721:
return isERC721ApprovalDisabled();
case isERC1155:
return isERC1155ApprovalDisabled();
}
}
return approving;
};
disableApprove = isDisableApprove();
}
$: isERC20 = $selectedToken?.type === TokenType.ERC20;
$: isERC721 = $selectedToken?.type === TokenType.ERC721;
$: isERC1155 = $selectedToken?.type === TokenType.ERC1155;
Expand Down

0 comments on commit 4c236b6

Please sign in to comment.