Skip to content

Commit

Permalink
fix: code review
Browse files Browse the repository at this point in the history
  • Loading branch information
danielsimao committed Dec 20, 2024
1 parent 71af52e commit 3674ceb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apps/evm/src/app/[lang]/(bridge)/bridge/Bridge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ const Bridge = ({ searchParams }: Props) => {
const [bridgeOrigin, setBridgeOrigin] = useState<BridgeOrigin>(getOrigin(type, chain, symbol));

const handleChangeTab = (key: Key) => {
if (type === key.toString()) return;

const newChain = L1_CHAIN;

setChain(newChain);
Expand Down Expand Up @@ -117,9 +119,7 @@ const Bridge = ({ searchParams }: Props) => {
router.replace('?' + urlSearchParams);
}, [type, chain, router, symbol, urlSearchParams]);

const isBobBridgeDisabled =
(direction === TransactionDirection.L1_TO_L2 && chain !== L1_CHAIN && chain !== 'BTC') ||
(direction === TransactionDirection.L2_TO_L1 && chain !== L1_CHAIN);
const isBobBridgeDisabled = !(chain === L1_CHAIN || chain === L2_CHAIN || chain === 'BTC');

const isExternalBridgeDisabled = chain === 'BTC' || !!(symbol && externalUnsupportedTokens.includes(symbol));

Expand Down

0 comments on commit 3674ceb

Please sign in to comment.