diff --git a/.gitignore b/.gitignore index b730a6afe..9088eeb7e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ .DS_Store .thumbs.db node_modules +.env # Quasar core related directories .quasar @@ -52,3 +53,4 @@ astar-collator # Chopstick binaries db.sqlite* +.vercel \ No newline at end of file diff --git a/src/components/bridge/ethereum/L1Bridge.vue b/src/components/bridge/ethereum/L1Bridge.vue index 927e17144..bee0340e4 100644 --- a/src/components/bridge/ethereum/L1Bridge.vue +++ b/src/components/bridge/ethereum/L1Bridge.vue @@ -277,7 +277,7 @@ export default defineComponent({ const store = useStore(); const isHandling = ref(false); const isLoading = computed(() => store.getters['general/isLoading']); - const isEnabledWithdrawal = computed(() => true); + const isEnabledWithdrawal = computed(() => false); const isHighTrafficModalOpen = ref(false); const isWarningHighTraffic = computed(() => false); diff --git a/src/components/bridge/layerzero/LzBridge.vue b/src/components/bridge/layerzero/LzBridge.vue index 2e2756124..3df873e32 100644 --- a/src/components/bridge/layerzero/LzBridge.vue +++ b/src/components/bridge/layerzero/LzBridge.vue @@ -267,7 +267,7 @@ export default defineComponent({ const store = useStore(); const isHandling = ref(false); const isLoading = computed(() => store.getters['general/isLoading']); - const isEnabledWithdrawal = computed(() => true); + const isEnabledWithdrawal = computed(() => false); const isNativeToken = computed(() => { return ( diff --git a/src/features.ts b/src/features.ts index 50afb049f..ff3e7d7f5 100644 --- a/src/features.ts +++ b/src/features.ts @@ -1,7 +1,7 @@ // Bridges export const nativeBridgeEnabled = true; export const layerZeroBridgeEnabled = true; -export const layerSwapBridgeEnabled = true; +export const layerSwapBridgeEnabled = false; export const celerBridgeEnabled = true; export const omniBridgeEnabled = true; export const ccipMinatoBridgeEnabled = true; diff --git a/src/hooks/bridge/useL1Bridge.ts b/src/hooks/bridge/useL1Bridge.ts index 7348dc3ab..022f2a331 100644 --- a/src/hooks/bridge/useL1Bridge.ts +++ b/src/hooks/bridge/useL1Bridge.ts @@ -59,8 +59,8 @@ export const useL1Bridge = () => { const isGasPayable = ref(undefined); const isLoadingGasPayable = ref(true); const errMsg = ref(''); - const fromChainName = ref(l1Network.value); - const toChainName = ref(l2Network.value); + const fromChainName = ref(l2Network.value); + const toChainName = ref(l1Network.value); const isApproved = ref(false); const isApproving = ref(false); const isApproveMaxAmount = ref(false); diff --git a/src/hooks/bridge/useLayerZeroBridge.ts b/src/hooks/bridge/useLayerZeroBridge.ts index f6e76b1fa..58b1abbec 100644 --- a/src/hooks/bridge/useLayerZeroBridge.ts +++ b/src/hooks/bridge/useLayerZeroBridge.ts @@ -26,8 +26,6 @@ import { HistoryTxType, addLzHistories } from 'src/modules/account'; import { isHex } from '@polkadot/util'; export const useLayerZeroBridge = () => { - const { isAstar } = useNetworkInfo(); - const lzTokens = ref([]); const selectedToken = ref(LayerZeroTokens[0]); const importTokenAddress = ref(''); @@ -37,12 +35,8 @@ export const useLayerZeroBridge = () => { const isGasPayable = ref(undefined); const isLoadingGasPayable = ref(true); const errMsg = ref(''); - const fromChainName = ref( - isAstar.value ? LayerZeroNetworkName.AstarEvm : LayerZeroNetworkName.AstarZk - ); - const toChainName = ref( - isAstar.value ? LayerZeroNetworkName.AstarZk : LayerZeroNetworkName.AstarEvm - ); + const fromChainName = ref(LayerZeroNetworkName.AstarZk); + const toChainName = ref(LayerZeroNetworkName.AstarEvm); const isApproved = ref(false); const isApproving = ref(false); const isApproveMaxAmount = ref(false); diff --git a/src/i18n/en-US/index.ts b/src/i18n/en-US/index.ts index 2440b1aeb..35e29b030 100644 --- a/src/i18n/en-US/index.ts +++ b/src/i18n/en-US/index.ts @@ -1070,7 +1070,7 @@ export default { completed: 'Completed', inProgress: 'In Progress', approvalMaxAmount: 'Approve Max Amount (option)', - disabledWithdrawal: 'Bridge to {network} is temporarily disabled', + disabledWithdrawal: 'Bridge to {network} is disabled.', thirdPartyBridge: '3rd Party Bridge', bridgeMaintenanceMode: 'Bridge is currently under maintenance mode. Please come back later.', ethereumBridge: { diff --git a/src/router/utils/index.ts b/src/router/utils/index.ts index 14f87dad7..ed17308c7 100644 --- a/src/router/utils/index.ts +++ b/src/router/utils/index.ts @@ -44,25 +44,15 @@ export const buildXvmTransferPageLink = (symbol: string): string => { }; /** - * A helper function to replace the network params to the selected network - * EX: `http://localhost:8080/shiden/assets` -> `http://localhost:8080/astar/assets` + * A helper function to build the URL and redirect to the selected network's assets page + * EX: `http://localhost:8080/shiden/bridge` -> `http://localhost:8080/astar/assets` * @param network networkAlias in providerEndpoints - * @returns URL */ export const buildNetworkUrl = (network: string) => { const href = window.location.href; const hrefArray = href.split('/'); - const networkIndex = 3; - - const url = hrefArray - .slice(0, hrefArray.length) - .map((it: string, index: number) => (index === networkIndex ? network : it)) - .join('/'); - - // Memo: `window.open(url, '_self')` won't work with `#` - if (url.includes('#staking')) { - return url.replace('#staking', ''); - } - + // Memo: Extract the protocol + host + const host = hrefArray.slice(0, 3).join('/'); + const url = `${host}/${network}${Path.Assets}`; return url; };