Skip to content

Commit 4c236b6

Browse files
committed
minor fix
1 parent 94d5dce commit 4c236b6

File tree

1 file changed

+0
-31
lines changed
  • packages/bridge-ui/src/components/Bridge/SharedBridgeComponents

1 file changed

+0
-31
lines changed

packages/bridge-ui/src/components/Bridge/SharedBridgeComponents/Actions.svelte

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -71,37 +71,6 @@
7171
7272
$: canDoNothing = !hasAddress || !hasNetworks || !hasBalance || !$selectedToken || disabled;
7373
74-
$: {
75-
const isERC20ApprovalDisabled = () => {
76-
return canDoNothing || $insufficientBalance || $validatingAmount || approving || $allApproved || !$enteredAmount;
77-
};
78-
79-
const isERC721ApprovalDisabled = () => {
80-
return $allApproved || approving;
81-
};
82-
83-
const isERC1155ApprovalDisabled = () => {
84-
return $allApproved || approving;
85-
};
86-
87-
const isDisableApprove = () => {
88-
if (checking) return true;
89-
if (!$selectedTokenIsBridged) {
90-
switch (true) {
91-
case isERC20:
92-
return isERC20ApprovalDisabled();
93-
case isERC721:
94-
return isERC721ApprovalDisabled();
95-
case isERC1155:
96-
return isERC1155ApprovalDisabled();
97-
}
98-
}
99-
return approving;
100-
};
101-
102-
disableApprove = isDisableApprove();
103-
}
104-
10574
$: isERC20 = $selectedToken?.type === TokenType.ERC20;
10675
$: isERC721 = $selectedToken?.type === TokenType.ERC721;
10776
$: isERC1155 = $selectedToken?.type === TokenType.ERC1155;

0 commit comments

Comments
 (0)