File tree Expand file tree Collapse file tree 1 file changed +0
-31
lines changed
packages/bridge-ui/src/components/Bridge/SharedBridgeComponents Expand file tree Collapse file tree 1 file changed +0
-31
lines changed Original file line number Diff line number Diff line change 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 ;
You can’t perform that action at this time.
0 commit comments