1- import { activeProfile , activeWallets , addWalletPersistedDataToActiveProfile , createWallet , login } from '@core/profile'
1+ import { IWallet , activeProfile , activeWallets , addWalletPersistedDataToActiveProfile , createWallet , login } from '@core/profile'
22import { get } from 'svelte/store'
33import { OnboardingType } from '../enums'
44import { addWalletPersistedDataToOnboardingProfile , onboardingProfile } from '../stores'
@@ -11,6 +11,7 @@ export async function completeOnboardingProcess(): Promise<void> {
1111 // if we already have an active profile
1212 // it means we are trying to load again after an error
1313 // and we don't need to add it again
14+ console . log ( "get(activeProfile), get(onboardingProfile)" , get ( activeProfile ) , get ( onboardingProfile ) )
1415 if ( ! get ( activeProfile ) ?. id ) {
1516 createNewProfileFromOnboardingProfile ( )
1617 }
@@ -19,15 +20,13 @@ export async function completeOnboardingProcess(): Promise<void> {
1920 const shouldRecoverAccounts = onboardingType === OnboardingType . Restore || onboardingType === OnboardingType . Claim
2021 showBalanceOverviewPopup . set ( shouldRecoverAccounts )
2122
22-
2323 await createOnboardingWallet ( )
24-
2524 void login ( { isFromOnboardingFlow : true , shouldRecoverAccounts } )
2625
2726 onboardingProfile . set ( undefined )
2827}
2928
30- export async function createOnboardingWallet ( name ?: string , color ?: string ) : Promise < IWalletState > {
29+ export async function createOnboardingWallet ( name ?: string , color ?: string ) : Promise < IWallet > {
3130 // 1. Get the wallet name
3231 const walletName = name || `${ localize ( 'general.account' ) } ${ ( get ( activeWallets ) ?. length ?? 0 ) + 1 } ` ;
3332
@@ -36,17 +35,16 @@ export async function createOnboardingWallet(name?: string, color?: string): Pro
3635
3736 // 3. Sync the wallet with the Node
3837 // TODO(2.0): test & fix sync when we have iota2.0 nodes
39- //await account.sync(DEFAULT_SYNC_OPTIONS)
40-
38+ //await wallet.sync(DEFAULT_SYNC_OPTIONS)
4139 // 4. Create a wrapper over the wallet instance and the persisted data
42- const [ walletState , accountPersistedData ] = await buildWalletStateAndPersistedData ( wallet , walletName , color )
40+ // const [walletState, accountPersistedData] = await buildWalletStateAndPersistedData(wallet, walletName, color)
4341
4442 // TODO(2.0) Fix
4543 // addAccountToActiveAccounts(walletState)
46- addWalletPersistedDataToOnboardingProfile ( walletState . id , accountPersistedData )
44+ // addWalletPersistedDataToOnboardingProfile(walletState.id, accountPersistedData)
4745 // TODO(2.0) Fix
4846 // addEmptyAccountActivitiesToAllAccountActivities(walletState.id)
4947
5048
51- return walletState
49+ return wallet
5250}
0 commit comments