Skip to content

Commit 6f69b15

Browse files
authored
fix: displays CCIP tooltip only once (#1425)
1 parent 14b3b96 commit 6f69b15

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

src/components/assets/EvmNativeToken.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ import { computed, defineComponent, ref, watch, watchEffect } from 'vue';
166166
import { nativeBridgeEnabled, layerZeroBridgeEnabled, ccipMinatoBridgeEnabled } from 'src/features';
167167
import CustomRouterLink from '../common/CustomRouterLink.vue';
168168
import Balloon from 'src/components/common/Balloon.vue';
169+
import { LOCAL_STORAGE } from 'src/config/localStorage';
169170
170171
export default defineComponent({
171172
components: { ModalFaucet, CustomRouterLink, Balloon },
@@ -242,9 +243,11 @@ export default defineComponent({
242243
watch(
243244
[isShibuyaEvm],
244245
async () => {
245-
if (isShibuyaEvm.value) {
246+
const isBallonDisplayed = Boolean(localStorage.getItem(LOCAL_STORAGE.BALLOON_CCIP_SHIBUYA));
247+
if (isShibuyaEvm.value && !isBallonDisplayed) {
246248
await wait(1000);
247249
isCcipBalloon.value = true;
250+
localStorage.setItem(LOCAL_STORAGE.BALLOON_CCIP_SHIBUYA, 'true');
248251
}
249252
},
250253
{ immediate: true }

src/config/localStorage.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export enum LOCAL_STORAGE {
1717
XCM_TX_HISTORIES = 'xcmTxHistories',
1818
XVM_TX_HISTORIES = 'xvmTxHistories',
1919
BALLOON_NATIVE_TOKEN = 'balloonNativeToken',
20+
BALLOON_CCIP_SHIBUYA = 'balloonCcipShibuya',
2021
THEME_COLOR = 'themeColor',
2122
MULTISIG = 'multisig',
2223
CLOSE_DAPP_STAKING_V3_ONBOARDING = 'closeDappStakingV3Onboarding',

0 commit comments

Comments
 (0)