4545
4646 <div class =" box--ccip" >
4747 <custom-router-link
48- v-if =" isShibuyaEvm"
48+ v-if =" isShibuyaEvm || isAstarEvm "
4949 :to =" buildCcipBridgePageLink()"
50- :is-disabled =" !ccipMinatoBridgeEnabled "
50+ :is-disabled =" !isEnableCcipBridge "
5151 >
52- <button class =" btn btn--icon" >
52+ <button
53+ v-if =" width >= screenSize.sm"
54+ class =" btn btn--icon"
55+ @mouseover =" isSoneiumButtonHover = true"
56+ @mouseleave =" isSoneiumButtonHover = false"
57+ >
5358 <img
5459 class =" img--logo-soneium"
55- :src =" require('src/assets/img/chain/soneium-color.svg')"
60+ :src ="
61+ isSoneiumButtonHover
62+ ? require('src/assets/img/chain/soneium-white.svg')
63+ : require('src/assets/img/chain/soneium-color.svg')
64+ "
65+ alt =" soneium"
66+ />
67+ </button >
68+ <button v-else class =" btn btn--icon" >
69+ <img
70+ class =" img--logo-soneium"
71+ :src =" require('src/assets/img/chain/soneium-white.svg')"
5672 alt =" soneium"
5773 />
5874 </button >
7894 :is-disabled =" !layerZeroBridgeEnabled"
7995 >
8096 <button class =" btn btn--icon" ><astar-icon-bridge /></button >
81- <span class =" text--mobile-menu" >{{ $t('assets.bridge ') }}</span >
97+ <span class =" text--mobile-menu" >{{ $t('assets.bridgeToZkEvm ') }}</span >
8298 <q-tooltip >
83- <span class =" text--tooltip" >{{ $t('assets.bridge ') }}</span >
99+ <span class =" text--tooltip" >{{ $t('assets.bridgeToZkEvm ') }}</span >
84100 </q-tooltip >
85101 </custom-router-link >
86102
@@ -144,7 +160,12 @@ import { cbridgeAppLink } from 'src/c-bridge';
144160import ModalFaucet from ' src/components/assets/modals/ModalFaucet.vue' ;
145161import Balloon from ' src/components/common/Balloon.vue' ;
146162import { LOCAL_STORAGE } from ' src/config/localStorage' ;
147- import { ccipMinatoBridgeEnabled , layerZeroBridgeEnabled , nativeBridgeEnabled } from ' src/features' ;
163+ import {
164+ ccipMinatoBridgeEnabled ,
165+ layerZeroBridgeEnabled ,
166+ nativeBridgeEnabled ,
167+ ccipSoneiumBridgeEnabled ,
168+ } from ' src/features' ;
148169import { useAccount , useBreakpoints , useFaucet , useNetworkInfo } from ' src/hooks' ;
149170import { faucetSethLink } from ' src/links' ;
150171import { getTokenImage } from ' src/modules/token' ;
@@ -156,6 +177,7 @@ import {
156177} from ' src/router/routes' ;
157178import { useStore } from ' src/store' ;
158179import { computed , defineComponent , ref , watch , watchEffect } from ' vue' ;
180+
159181import CustomRouterLink from ' ../common/CustomRouterLink.vue' ;
160182
161183export default defineComponent ({
@@ -177,8 +199,9 @@ export default defineComponent({
177199
178200 const isCcipBalloon = ref <boolean >(false );
179201 const isBalloonClosing = ref <boolean >(false );
202+ const isSoneiumButtonHover = ref <boolean >(false );
180203
181- const { currentNetworkName, nativeTokenSymbol, isZkEvm, isAstar, isShibuyaEvm } =
204+ const { currentNetworkName, nativeTokenSymbol, isZkEvm, isAstar, isShibuyaEvm, isAstarEvm } =
182205 useNetworkInfo ();
183206
184207 const closeCcipBalloon = () => {
@@ -229,16 +252,34 @@ export default defineComponent({
229252
230253 const isTruncate = ! nativeTokenSymbol .value .toUpperCase ().includes (' BTC' );
231254
255+ const isEnableCcipBridge = computed <boolean >(() => {
256+ return (
257+ (isShibuyaEvm .value && ccipMinatoBridgeEnabled ) ||
258+ (isAstarEvm .value && ccipSoneiumBridgeEnabled )
259+ );
260+ });
261+
232262 // Memo: display the balloon animation
233263 watch (
234- [isShibuyaEvm ],
264+ [isShibuyaEvm , isAstarEvm ],
235265 async () => {
236- const isBallonDisplayed = Boolean (localStorage .getItem (LOCAL_STORAGE .BALLOON_CCIP_SHIBUYA ));
237- if (isShibuyaEvm .value && ! isBallonDisplayed ) {
266+ const isBallonShibuyaDisplayed = Boolean (
267+ localStorage .getItem (LOCAL_STORAGE .BALLOON_CCIP_SHIBUYA )
268+ );
269+ const isBallonAstarDisplayed = Boolean (
270+ localStorage .getItem (LOCAL_STORAGE .BALLOON_CCIP_ASTAR )
271+ );
272+ if (isShibuyaEvm .value && ! isBallonShibuyaDisplayed ) {
238273 await wait (1000 );
239274 isCcipBalloon .value = true ;
240275 localStorage .setItem (LOCAL_STORAGE .BALLOON_CCIP_SHIBUYA , ' true' );
241276 }
277+
278+ if (isAstarEvm .value && ! isBallonAstarDisplayed ) {
279+ await wait (1000 );
280+ isCcipBalloon .value = true ;
281+ localStorage .setItem (LOCAL_STORAGE .BALLOON_CCIP_ASTAR , ' true' );
282+ }
242283 },
243284 { immediate: true }
244285 );
@@ -261,9 +302,11 @@ export default defineComponent({
261302 nativeBridgeEnabled ,
262303 layerZeroBridgeEnabled ,
263304 isShibuyaEvm ,
264- ccipMinatoBridgeEnabled ,
305+ isEnableCcipBridge ,
265306 isCcipBalloon ,
266307 isBalloonClosing ,
308+ isAstarEvm ,
309+ isSoneiumButtonHover ,
267310 closeCcipBalloon ,
268311 buildCcipBridgePageLink ,
269312 truncate ,
0 commit comments