@@ -38,6 +38,7 @@ import { WELCOME_MODAL_LOCALSTORAGE_KEY, WELCOME_STAKING_MODAL_LOCALSTORAGE_KEY
3838import { usePwaInstallPrompt } from './composables/usePwaInstallPrompt' ;
3939import type { SetupSwapWithKycResult , SWAP_KYC_HANDLER_STORAGE_KEY } from './swap-kyc-handler' ; // avoid bundling
4040import type { RelayServerInfo } from './lib/usdc/OpenGSN' ;
41+ import { HubApiMock , isPlaygroundEnabled } from './stores/Playground' ;
4142
4243export function shouldUseRedirects ( ignoreSettings = false ) : boolean {
4344 if ( ! ignoreSettings ) {
@@ -125,7 +126,7 @@ hubApi.on(HubApi.RequestType.ONBOARD, async (accounts) => {
125126 processAndStoreAccounts ( accounts ) ;
126127
127128 // Open optional Welcome modal, Bitcoin activation modal or USDC activation modal if appropriate.
128- await new Promise ( ( resolve ) => { router . onReady ( resolve ) ; } ) ;
129+ await new Promise < void > ( ( resolve ) => { router . onReady ( resolve ) ; } ) ;
129130 if ( ! areOptionalRedirectsAllowed ( router . currentRoute ) ) return ;
130131 const welcomeModalAlreadyShown = window . localStorage . getItem ( WELCOME_MODAL_LOCALSTORAGE_KEY ) ;
131132 const { requestType } = accounts [ 0 ] ;
@@ -390,7 +391,7 @@ export async function syncFromHub() {
390391 // for Ledgers USDC would not be enabled automatically on logins and the activation reminder on every app start
391392 // would be annoying for the user.
392393 const { activeAccountInfo } = useAccountStore ( ) ;
393- await new Promise ( ( resolve ) => { router . onReady ( resolve ) ; } ) ;
394+ await new Promise < void > ( ( resolve ) => { router . onReady ( resolve ) ; } ) ;
394395 if (
395396 areOptionalRedirectsAllowed ( router . currentRoute )
396397 && activeAccountInfo . value ?. type === AccountType . BIP39 // Legacy accounts and Ledgers are not supported.
@@ -434,7 +435,7 @@ export async function onboard(asRedirect = false) {
434435 // automatically on login), optionally offer to activate it. After activation, the Bitcoin activation modal leads
435436 // into the Welcome modal if not shown yet.
436437 const { activeAccountInfo } = useAccountStore ( ) ;
437- await new Promise ( ( resolve ) => { router . onReady ( resolve ) ; } ) ;
438+ await new Promise < void > ( ( resolve ) => { router . onReady ( resolve ) ; } ) ;
438439 if (
439440 areOptionalRedirectsAllowed ( router . currentRoute )
440441 && activeAccountInfo . value
0 commit comments