diff --git a/package-lock.json b/package-lock.json index 93b4642..5d79a01 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4791,9 +4791,9 @@ } }, "cic-schemas-data-validator": { - "version": "1.0.0-alpha.2", - "resolved": "https://registry.npmjs.org/cic-schemas-data-validator/-/cic-schemas-data-validator-1.0.0-alpha.2.tgz", - "integrity": "sha512-CYOAuKUUEaVWmWZ1/WFhc1jsJGs35r57A1UPXZhq7nUUDACRR8LXPAqv5qNjZoA3P+f/9uBxXh/Ds9qnzZveKw==", + "version": "1.0.0-alpha.3", + "resolved": "https://registry.npmjs.org/cic-schemas-data-validator/-/cic-schemas-data-validator-1.0.0-alpha.3.tgz", + "integrity": "sha512-0Cgl6oyPnXfXGX03bAmBr0xzVeq2z2OuD4aw7akYmTYqjCdt2Zt7Y+JWUmIZCyP1F5pii4UK6SNw4dF6AVTXgg==", "requires": { "@apidevtools/json-schema-ref-parser": "^9.0.7", "ajv": "^8.1.0" diff --git a/package.json b/package.json index 93d1277..a9d9fe3 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "chart.js": "^2.9.4", "cic-client": "0.1.4", "cic-client-meta": "0.0.7-alpha.6", - "cic-schemas-data-validator": "^1.0.0-alpha.2", + "cic-schemas-data-validator": "^1.0.0-alpha.3", "datatables.net": "^1.10.22", "datatables.net-dt": "^1.10.22", "ethers": "^5.0.31", diff --git a/src/app/_services/user.service.ts b/src/app/_services/user.service.ts index f5248ea..35a284d 100644 --- a/src/app/_services/user.service.ts +++ b/src/app/_services/user.service.ts @@ -12,7 +12,7 @@ import {MutableKeyStore, PGPSigner, Signer} from '@app/_pgp'; import {RegistryService} from '@app/_services/registry.service'; import {CICRegistry} from 'cic-client'; import {AuthService} from './auth.service'; -import {personValidation} from '@app/_helpers'; +import {personValidation, vcardValidation} from '@app/_helpers'; const vCard = require('vcard-parser'); @Injectable({ @@ -88,6 +88,7 @@ export class UserService { accountInfo.location.area = location; accountInfo.location.area_name = userLocation; accountInfo.location.area_type = locationType; + await vcardValidation(accountInfo.vcard); accountInfo.vcard = btoa(vCard.generate(accountInfo.vcard)); await personValidation(accountInfo); const accountKey = await User.toKey(address); @@ -188,6 +189,7 @@ export class UserService { await personValidation(accountInfo); accountInfo.balance = await this.tokenService.getTokenBalance(accountInfo.identities.evm['bloxberg:8996'][0]); accountInfo.vcard = vCard.parse(atob(accountInfo.vcard)); + await vcardValidation(accountInfo.vcard); this.accounts.unshift(accountInfo); if (this.accounts.length > limit) { this.accounts.length = limit;