diff --git a/apps/canonical-bridge-ui/pages/testnet/index.tsx b/apps/canonical-bridge-ui/pages/testnet/index.tsx index cff5aca5..49e6f713 100644 --- a/apps/canonical-bridge-ui/pages/testnet/index.tsx +++ b/apps/canonical-bridge-ui/pages/testnet/index.tsx @@ -17,7 +17,7 @@ export const bridgeConfig: ICanonicalBridgeConfig = { assetPrefix: env.ASSET_PREFIX, appearance: { - bridgeTitle: 'BNB Chain Cross-Chain Bridge', + bridgeTitle: 'BNB Chain Cross-Chain Bridge Testnet', locale: 'en', messages, mode: 'dark', diff --git a/packages/canonical-bridge-widget/src/modules/aggregator/adapters/meson/MesonAdapter.ts b/packages/canonical-bridge-widget/src/modules/aggregator/adapters/meson/MesonAdapter.ts index 27013281..5b786c2d 100644 --- a/packages/canonical-bridge-widget/src/modules/aggregator/adapters/meson/MesonAdapter.ts +++ b/packages/canonical-bridge-widget/src/modules/aggregator/adapters/meson/MesonAdapter.ts @@ -4,7 +4,7 @@ import { BaseAdapter, ITransferTokenPair } from '@/modules/aggregator/shared/Bas import { IMesonChain, IMesonToken } from '@/modules/aggregator/adapters/meson/types'; const SUPPORTED_CHAIN_IDS = [56, 97, 728126427, 728126428]; -const SUPPORTED_TOKENS = ['USDT']; +const SUPPORTED_TOKENS = ['USDT', 'USDC']; export class MesonAdapter extends BaseAdapter { public bridgeType: BridgeType = 'meson'; diff --git a/packages/canonical-bridge-widget/src/modules/aggregator/adapters/meson/hooks/useGetTronAllowance.ts b/packages/canonical-bridge-widget/src/modules/aggregator/adapters/meson/hooks/useGetTronAllowance.ts index d9a380a2..6a92ef86 100644 --- a/packages/canonical-bridge-widget/src/modules/aggregator/adapters/meson/hooks/useGetTronAllowance.ts +++ b/packages/canonical-bridge-widget/src/modules/aggregator/adapters/meson/hooks/useGetTronAllowance.ts @@ -28,7 +28,11 @@ export const useGetTronAllowance = () => { trc20Address: selectedToken?.address, tronBridgeAddress: transferActionInfo?.bridgeAddress, }); - if (typeof allowance === 'bigint' && !!allowance) setAllowance(allowance); + if (typeof allowance === 'bigint' && allowance !== null) { + setAllowance(allowance); + } else if (typeof allowance?.[0] === 'bigint') { + setAllowance(allowance?.[0]); + } // eslint-disable-next-line no-console console.log('Tron token allowance', allowance); return { allowance }; diff --git a/packages/canonical-bridge-widget/src/modules/transfer/components/ToAccount/index.tsx b/packages/canonical-bridge-widget/src/modules/transfer/components/ToAccount/index.tsx index 9be97d22..8fe533b4 100644 --- a/packages/canonical-bridge-widget/src/modules/transfer/components/ToAccount/index.tsx +++ b/packages/canonical-bridge-widget/src/modules/transfer/components/ToAccount/index.tsx @@ -8,6 +8,7 @@ import { useIntl, InputGroup, InputRightElement, + Checkbox, } from '@bnb-chain/space'; import { ChangeEvent, useRef, useState } from 'react'; @@ -22,7 +23,7 @@ export function ToAccount(props: FlexProps) { const { formatMessage } = useIntl(); const dispatch = useAppDispatch(); - // const [isChecked, setIsChecked] = useState(false); + const [isChecked, setIsChecked] = useState(false); const toAccount = useAppSelector((state) => state.transfer.toAccount); const toChain = useAppSelector((state) => state.transfer.toChain); @@ -51,13 +52,13 @@ export function ToAccount(props: FlexProps) { const isInvalid = !isAvailableAccount && !!toAccount.address; - // const onCheckboxChange = (e: React.ChangeEvent) => { - // if (e.target.checked === true) { - // setIsChecked(true); - // } else { - // setIsChecked(false); - // } - // }; + const onCheckboxChange = (e: React.ChangeEvent) => { + if (e.target.checked === true) { + setIsChecked(true); + } else { + setIsChecked(false); + } + }; return (