diff --git a/public/images/dapp_promotions/airlyft_stake_campaign.png b/public/images/dapp_promotions/airlyft_stake_campaign.png new file mode 100644 index 000000000..046739d1d Binary files /dev/null and b/public/images/dapp_promotions/airlyft_stake_campaign.png differ diff --git a/src/components/bridge/BridgeSelection.vue b/src/components/bridge/BridgeSelection.vue index 501721f7e..7ccc5c5cc 100644 --- a/src/components/bridge/BridgeSelection.vue +++ b/src/components/bridge/BridgeSelection.vue @@ -6,9 +6,9 @@
-
@@ -201,8 +204,16 @@ export default defineComponent({ components: {}, setup() { const { currentAccount } = useAccount(); - const { isZkEvm, networkNameSubstrate, isMainnet, isZkyoto, isAstarZkEvm, isAstar, isH160 } = - useNetworkInfo(); + const { + isZkEvm, + networkNameSubstrate, + isMainnet, + isZkyoto, + isAstarZkEvm, + isAstar, + isH160, + isBridgeMaintenanceMode, + } = useNetworkInfo(); const l1Name = computed(() => { return isZkyoto.value ? EthBridgeNetworkName.Sepolia : EthBridgeNetworkName.Ethereum; @@ -241,6 +252,7 @@ export default defineComponent({ zKatanaBridgeUrl, isZkyoto, isEnableLzBridge, + isBridgeMaintenanceMode, }; }, }); diff --git a/src/data/dapp_promotions.json b/src/data/dapp_promotions.json index 642acd99a..8d4fe2b5d 100644 --- a/src/data/dapp_promotions.json +++ b/src/data/dapp_promotions.json @@ -1,4 +1,10 @@ [ + { + "name": "AirLyft Stake Campaign", + "shortDescription": "Stake on AirLyft and get a chance to share extra reward!", + "link": "https://airlyft.one/community/astar-stake-on-airlyft", + "img": "images/dapp_promotions/airlyft_stake_campaign.png" + }, { "name": "Ledger - dApp Staking V3", "shortDescription": "Join dApp Staking V3 with your Ledger device using the new Astar Native app.", diff --git a/src/hooks/bridge/useL1Bridge.ts b/src/hooks/bridge/useL1Bridge.ts index 5560fd2f4..a407992a9 100644 --- a/src/hooks/bridge/useL1Bridge.ts +++ b/src/hooks/bridge/useL1Bridge.ts @@ -3,7 +3,7 @@ import { debounce } from 'lodash-es'; import { endpointKey } from 'src/config/chainEndpoints'; import { LOCAL_STORAGE } from 'src/config/localStorage'; import { checkAllowance, getTokenBal, setupNetwork } from 'src/config/web3'; -import { useAccount } from 'src/hooks'; +import { useAccount, useNetworkInfo } from 'src/hooks'; import { Erc20Token } from 'src/modules/token'; import { astarNativeTokenErcAddr } from 'src/modules/xcm'; import { @@ -17,10 +17,12 @@ import { useStore } from 'src/store'; import { container } from 'src/v2/common'; import { IZkBridgeService } from 'src/v2/services'; import { Symbols } from 'src/v2/symbols'; -import { WatchCallback, computed, onUnmounted, ref, watch } from 'vue'; +import { WatchCallback, computed, onUnmounted, ref, watch, watchEffect } from 'vue'; import { useI18n } from 'vue-i18n'; import { useEthProvider } from '../custom-signature/useEthProvider'; import { EthereumProvider } from '../types/CustomSignature'; +import { Path } from 'src/router'; +import { useRouter } from 'vue-router'; const eth = { symbol: 'ETH', @@ -77,6 +79,8 @@ export const useL1Bridge = () => { const { t } = useI18n(); const { currentAccount } = useAccount(); const { web3Provider, ethProvider } = useEthProvider(); + const router = useRouter(); + const { isBridgeMaintenanceMode } = useNetworkInfo(); const isLoading = computed(() => store.getters['general/isLoading']); const fromChainId = computed( @@ -417,6 +421,13 @@ export const useL1Bridge = () => { isApproving.value ? 5 : 30 * 1000 ); + // Memo: the app goes to assets page if users access to the bridge page by inputting URL directly + watchEffect(() => { + if (isBridgeMaintenanceMode.value) { + router.push(Path.Assets); + } + }); + onUnmounted(() => { clearInterval(autoFetchAllowanceHandler); }); diff --git a/src/hooks/useNetworkInfo.ts b/src/hooks/useNetworkInfo.ts index c5c1a462c..0f414fac0 100644 --- a/src/hooks/useNetworkInfo.ts +++ b/src/hooks/useNetworkInfo.ts @@ -112,6 +112,10 @@ export function useNetworkInfo() { : shibuya; }); + const isBridgeMaintenanceMode = computed(() => { + return isZkyoto.value; + }); + return { isMainnet, currentNetworkChain, @@ -129,5 +133,6 @@ export function useNetworkInfo() { dappStakingCurrency, isH160, nativeTokenImg, + isBridgeMaintenanceMode, }; } diff --git a/src/i18n/en-US/index.ts b/src/i18n/en-US/index.ts index 667e25882..2ba92bdb3 100644 --- a/src/i18n/en-US/index.ts +++ b/src/i18n/en-US/index.ts @@ -1047,10 +1047,20 @@ export default { moreInfoFor: 'More info for', bonusRewards: 'Bonus Rewards', threshold: 'Threshold', - percentageStaked: 'Percentage of Supply Staked', + percentageLocked: 'Percentage of Supply Locked', unclaimedRewards: 'Unclaimed rewards', rewardsClaimedOnStake: 'Rewards will be claimed when stake', - ifYouStakeNow: 'If you stake now', + ifYouStakeNow: 'Basic APR + Bonus (If you stake now)', + defiDescription: 'Discover the world of decentralized finance solutions on Astar.', + 'unstoppable-grantsDescription': + 'Support projects in the Unstoppable Community Grants program, powered by dApp staking.', + nftDescription: 'Find and support creative communities with Astar’s NFT dApps.', + toolingDescription: + 'Support powerful tools and frameworks designed to accelerate network growth.', + utilityDescription: + 'Stake to essential projects that enhance the productivity and functionality of Web3.', + othersDescription: 'Explore a diverse set of blockchain dApps.', + basicAprPlusBonus: 'Basic APR + Bonus', }, bridge: { selectBridge: 'Select a Bridge', @@ -1064,6 +1074,7 @@ export default { approvalMaxAmount: 'Approve Max Amount (option)', disabledWithdrawal: 'Bridge to {network} is temporarily disabled', thirdPartyBridge: '3rd Party Bridge', + bridgeMaintenanceMode: 'Bridge is currently under maintenance mode. Please come back later.', ethereumBridge: { title: 'Native Bridge', tag: 'ERC20', diff --git a/src/staking-v3/components/PeriodInfoVote.vue b/src/staking-v3/components/PeriodInfoVote.vue index bfb83b7c2..463302c56 100644 --- a/src/staking-v3/components/PeriodInfoVote.vue +++ b/src/staking-v3/components/PeriodInfoVote.vue @@ -45,7 +45,7 @@
{{ $t('stakingV3.ifYouStakeNow') }}
- 15%+ + {{ totalApr.toFixed(1) }}%
@@ -54,8 +54,8 @@