Skip to content

Commit

Permalink
fix bottom sheet stacking order
Browse files Browse the repository at this point in the history
  • Loading branch information
walmat committed Jan 25, 2025
1 parent 7c716cb commit 892e29f
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions src/handlers/walletReadyEvents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { logger } from '@/logger';
import { IS_TEST } from '@/env';
import { backupsStore, CloudBackupState, LoadingStates, oneWeekInMs } from '@/state/backups/backups';
import walletBackupTypes from '@/helpers/walletBackupTypes';
import { useNavigationStore } from '@/state/navigation/navigationStore';

export const runKeychainIntegrityChecks = async () => {
const keychainIntegrityState = await getKeychainIntegrityState();
Expand Down Expand Up @@ -112,16 +113,21 @@ export const runFeatureUnlockChecks = async (): Promise<boolean> => {
return false;
};

const notificationsCampaignCheckTimeout = 15_000;
const routesToExitEarlyOn: string[] = [Routes.BACKUP_SHEET, Routes.APP_ICON_UNLOCK_SHEET, Routes.REMOTE_PROMO_SHEET];

const handleLocalCampaignChecks = async () => {
setTimeout(() => {
const { activeRoute } = useNavigationStore.getState();
if (routesToExitEarlyOn.includes(activeRoute)) return;
runLocalCampaignChecks();
}, notificationsCampaignCheckTimeout);
};

export const runFeaturesLocalCampaignAndBackupChecks = async () => {
if (await runFeatureUnlockChecks()) {
return true;
}
if (await runLocalCampaignChecks()) {
return true;
}
if (await runWalletBackupStatusChecks()) {
return true;
}

return false;
handleLocalCampaignChecks();
return await runWalletBackupStatusChecks();
};

0 comments on commit 892e29f

Please sign in to comment.