Skip to content

Commit b4f5839

Browse files
brunobar79ibrahimtaveras00
authored andcommitted
icons hotfix pt 2 (#6345)
* added migration to reset icon handled flag * ignore old icon sheets temporarilly
1 parent e0fc97d commit b4f5839

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

src/featuresToUnlock/unlockableAppIconCheck.ts

+20
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,26 @@ export const unlockableAppIconCheck = async (appIconKey: UnlockableAppIconKey, w
7070
unlockableAppIconStorage.set(appIconKey, true);
7171
logger.debug(`[unlockableAppIconCheck]: Feature check ${appIconKey} set to true. Wont show up anymore!`);
7272

73+
// Temporarily ignore some icons
74+
// We can get rid of this in 2025!
75+
const iconsToIgnore = [
76+
'optimism',
77+
'smol',
78+
'zora',
79+
'golddoge',
80+
'raindoge',
81+
'pooly',
82+
'finiliar',
83+
'zorb',
84+
'poolboy',
85+
'adworld',
86+
'farcaster',
87+
];
88+
89+
if (iconsToIgnore.includes(appIconKey)) {
90+
return false;
91+
}
92+
7393
Navigation.handleAction(Routes.APP_ICON_UNLOCK_SHEET, { appIconKey });
7494
return true;
7595
}

src/model/migrations.ts

+16
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ import { useLegacyFavoriteDappsStore } from '@/state/legacyFavoriteDapps';
4141
import { getAddressAndChainIdFromUniqueId, getUniqueId, getUniqueIdNetwork } from '@/utils/ethereumUtils';
4242
import { UniqueId } from '@/__swaps__/types/assets';
4343
import { userAssetsStore } from '@/state/assets/userAssets';
44+
import { UnlockableAppIconKey, unlockableAppIcons } from '@/appIcons/appIcons';
45+
import { unlockableAppIconStorage } from '@/featuresToUnlock/unlockableAppIconCheck';
4446

4547
export default async function runMigrations() {
4648
// get current version
@@ -696,6 +698,20 @@ export default async function runMigrations() {
696698

697699
migrations.push(v21);
698700

701+
/**
702+
*************** Migration v22 ******************
703+
* Reset icon checks
704+
*/
705+
const v22 = async () => {
706+
// For each appIcon, delete the handled flag
707+
(Object.keys(unlockableAppIcons) as UnlockableAppIconKey[]).map(appIconKey => {
708+
unlockableAppIconStorage.delete(appIconKey);
709+
logger.debug('Resetting icon status for ' + appIconKey);
710+
});
711+
};
712+
713+
migrations.push(v22);
714+
699715
logger.debug(`[runMigrations]: ready to run migrations starting on number ${currentVersion}`);
700716
// await setMigrationVersion(17);
701717
if (migrations.length === currentVersion) {

0 commit comments

Comments
 (0)