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 2cb6b7f
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
8 changes: 4 additions & 4 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 All @@ -146,7 +146,7 @@ const Bridge = ({ searchParams }: Props) => {
title={<Trans>Withdraw</Trans>}
tooltipProps={{
isDisabled: !isWithdrawTabDisabled,
label: <Trans>Withdraws back to BTC are currently not supported</Trans>
label: <Trans>Withdrawals back to BTC are currently not supported</Trans>
}}
>
<></>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ const BobBridgeForm = ({
const handleSuccess = (data: BridgeTransaction) => {
onBridgeSuccess?.(data);

// Reseting form and defaulting ETH
// Resetting form and defaulting ETH
form.resetForm({ values: { ...initialValues, [BRIDGE_ASSET]: initialToken.symbol } });

onChangeSymbol?.(initialToken.symbol);
Expand Down
8 changes: 6 additions & 2 deletions apps/evm/src/locales/en.po
Original file line number Diff line number Diff line change
Expand Up @@ -2091,8 +2091,12 @@ msgid "Withdraw to L1 failed. Please try again."
msgstr "Withdraw to L1 failed. Please try again."

#: src/app/[lang]/(bridge)/bridge/Bridge.tsx:149
msgid "Withdraws back to BTC are currently not supported"
msgstr "Withdraws back to BTC are currently not supported"
msgid "Withdrawals back to BTC are currently not supported"
msgstr "Withdrawals back to BTC are currently not supported"

#: src/app/[lang]/(bridge)/bridge/Bridge.tsx:149
#~ msgid "Withdraws back to BTC are currently not supported"
#~ msgstr "Withdraws back to BTC are currently not supported"

#: src/app/[lang]/fusion/components/UserInfo/MultipliersModal.tsx:209
msgid "Yield Assets"
Expand Down
6 changes: 5 additions & 1 deletion apps/evm/src/locales/zh.po
Original file line number Diff line number Diff line change
Expand Up @@ -2078,9 +2078,13 @@ msgid "Withdraw to L1 failed. Please try again."
msgstr ""

#: src/app/[lang]/(bridge)/bridge/Bridge.tsx:149
msgid "Withdraws back to BTC are currently not supported"
msgid "Withdrawals back to BTC are currently not supported"
msgstr ""

#: src/app/[lang]/(bridge)/bridge/Bridge.tsx:149
#~ msgid "Withdraws back to BTC are currently not supported"
#~ msgstr ""

#: src/app/[lang]/fusion/components/UserInfo/MultipliersModal.tsx:209
msgid "Yield Assets"
msgstr "收益资产"
Expand Down

0 comments on commit 2cb6b7f

Please sign in to comment.