Skip to content

Commit

Permalink
wip correction display wallet for new users (#559)
Browse files Browse the repository at this point in the history
  • Loading branch information
hichri-louay authored Sep 25, 2023
1 parent 7c60ae5 commit 0542377
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/app/core/services/Auth/auth-store.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit 0542377

Please sign in to comment.