diff --git a/src/app/_services/user.service.ts b/src/app/_services/user.service.ts index f90583a..0f88a80 100644 --- a/src/app/_services/user.service.ts +++ b/src/app/_services/user.service.ts @@ -67,8 +67,7 @@ export class UserService { } async changeAccountInfo(address: string, name: string, phoneNumber: string, age: string, type: string, bio: string, gender: string, - businessCategory: string, userLocation: string, location: string, locationType: string, dateRegistered: string, - identities: any, + businessCategory: string, userLocation: string, location: string, locationType: string ): Promise { let accountInfo: any = { vcard: { @@ -89,12 +88,8 @@ export class UserService { accountInfo.location.area = location; accountInfo.location.area_name = userLocation; accountInfo.location.area_type = locationType; - accountInfo.date_registered = dateRegistered; - accountInfo.identities = identities; await vcardValidation(accountInfo.vcard); accountInfo.vcard = btoa(vCard.generate(accountInfo.vcard)); - await personValidation(accountInfo); - delete accountInfo.identities; const accountKey = await User.toKey(address); this.getAccountDetailsFromMeta(accountKey).pipe(first()).subscribe(async res => { const syncableAccount: Syncable = Envelope.fromJSON(JSON.stringify(res)).unwrap(); @@ -103,6 +98,7 @@ export class UserService { update.push(new ArgPair(prop, accountInfo[prop])); } syncableAccount.update(update, 'client-branch'); + await personValidation(syncableAccount.m.data); await this.updateMeta(syncableAccount, accountKey, this.headers); }, async error => { this.loggingService.sendErrorLevelMessage('Can\'t find account info in meta service', this, {error}); diff --git a/src/app/pages/accounts/account-details/account-details.component.ts b/src/app/pages/accounts/account-details/account-details.component.ts index 8ad7f1a..2d667ff 100644 --- a/src/app/pages/accounts/account-details/account-details.component.ts +++ b/src/app/pages/accounts/account-details/account-details.component.ts @@ -151,9 +151,7 @@ export class AccountDetailsComponent implements OnInit { this.accountInfoFormStub.businessCategory.value, this.accountInfoFormStub.userLocation.value, this.accountInfoFormStub.location.value, - this.accountInfoFormStub.locationType.value, - this.account.date_registered, - this.account.identities + this.accountInfoFormStub.locationType.value ); this.submitted = false; }