Merge branch 'master' into spencer/metadata-history
This commit is contained in:
		
						commit
						859868b1ec
					
				@ -11,7 +11,7 @@ import { MutableKeyStore, PGPSigner, Signer } from '@app/_pgp';
 | 
			
		||||
import { RegistryService } from '@app/_services/registry.service';
 | 
			
		||||
import { CICRegistry } from '@cicnet/cic-client';
 | 
			
		||||
import { personValidation, updateSyncable, vcardValidation } from '@app/_helpers';
 | 
			
		||||
import { add0x } from '@src/assets/js/ethtx/dist/hex';
 | 
			
		||||
import { add0x, strip0x } from '@src/assets/js/ethtx/dist/hex';
 | 
			
		||||
import { KeystoreService } from '@app/_services/keystore.service';
 | 
			
		||||
import * as Automerge from 'automerge';
 | 
			
		||||
const vCard = require('vcard-parser');
 | 
			
		||||
@ -80,7 +80,8 @@ export class UserService {
 | 
			
		||||
    businessCategory: string,
 | 
			
		||||
    userLocation: string,
 | 
			
		||||
    location: string,
 | 
			
		||||
    locationType: string
 | 
			
		||||
    locationType: string,
 | 
			
		||||
    oldPhoneNumber: string
 | 
			
		||||
  ): Promise<any> {
 | 
			
		||||
    const accountInfo: any = {
 | 
			
		||||
      vcard: {
 | 
			
		||||
@ -147,6 +148,14 @@ export class UserService {
 | 
			
		||||
          await this.updateMeta(syncableAccount, accountKey, this.headers);
 | 
			
		||||
        }
 | 
			
		||||
      );
 | 
			
		||||
    if (phoneNumber !== oldPhoneNumber) {
 | 
			
		||||
      const oldPhoneKey: string = await Phone.toKey(oldPhoneNumber);
 | 
			
		||||
      const newPhoneKey: string = await Phone.toKey(phoneNumber);
 | 
			
		||||
      const newPhoneData: Syncable = new Syncable(newPhoneKey, strip0x(address));
 | 
			
		||||
      await this.updateMeta(newPhoneData, newPhoneKey, this.headers);
 | 
			
		||||
      const oldPhoneData: Syncable = new Syncable(oldPhoneKey, '');
 | 
			
		||||
      await this.updateMeta(oldPhoneData, oldPhoneKey, this.headers);
 | 
			
		||||
    }
 | 
			
		||||
    return accountKey;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -290,7 +290,8 @@ export class AccountDetailsComponent implements OnInit, AfterViewInit {
 | 
			
		||||
      this.accountInfoFormStub.businessCategory.value,
 | 
			
		||||
      this.accountInfoFormStub.userLocation.value,
 | 
			
		||||
      this.accountInfoFormStub.location.value,
 | 
			
		||||
      this.accountInfoFormStub.locationType.value
 | 
			
		||||
      this.accountInfoFormStub.locationType.value,
 | 
			
		||||
      this.account.vcard?.tel[0].value
 | 
			
		||||
    );
 | 
			
		||||
    this.submitted = false;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user