From 8521b998a9a6223afa42810872f89b23388e948b Mon Sep 17 00:00:00 2001 From: hichri-louay Date: Mon, 25 Sep 2023 17:27:11 +0100 Subject: [PATCH] wip correction display wallet for new users --- src/app/core/services/Auth/auth-store.service.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/app/core/services/Auth/auth-store.service.ts b/src/app/core/services/Auth/auth-store.service.ts index 98d733d10..c00dac6b8 100755 --- a/src/app/core/services/Auth/auth-store.service.ts +++ b/src/app/core/services/Auth/auth-store.service.ts @@ -56,10 +56,17 @@ export class AuthStoreService { public getAccount() { return this.auth.verifyAccount().pipe( tap( (response) => { + console.log({response}) const hasWalletV2 = response.data.hasWalletV2 || false if(!!response.data.migrated && response.data.migrated) this.tokenStorageService.setItem('wallet_version', 'v2'); else { - this.tokenStorageService.setItem('wallet_version', 'v1'); + this.walletFacade.checkUserIsNew().subscribe((res:any) => { + if(res.data) this.tokenStorageService.setItem('wallet_version', 'v2'); + else this.tokenStorageService.setItem('wallet_version', 'v1'); + }, (err) => { + hasWalletV2 ? this.tokenStorageService.setItem('wallet_version', 'v2') : this.tokenStorageService.setItem('wallet_version', 'v1'); + }) + /*this.cryptofetchServiceService.getTotalBalance().subscribe((res:any) => {