Return all additional identity fields (#1943)

This commit is contained in:
Jaco Greeff
2020-02-25 15:10:47 +01:00
committed by GitHub
parent eeaf6118a5
commit 253e48f7bb
2 changed files with 11 additions and 0 deletions
+10
View File
@@ -54,6 +54,16 @@ function extractIdentity (identityOfOpt?: Option<Registration>, superOf?: [Accou
email: dataAsString(info.email),
image: dataAsString(info.image),
legal: dataAsString(info.legal),
other: info.additional.reduce((other: Record<string, string>, [_key, _value]): Record<string, string> => {
const key = dataAsString(_key);
const value = dataAsString(_value);
if (key && value) {
other[key] = value;
}
return other;
}, {}),
parent: superOf
? superOf[0]
: undefined,
+1
View File
@@ -15,6 +15,7 @@ export interface DeriveAccountRegistration {
email?: string;
image?: string;
legal?: string;
other?: Record<string, string>;
parent?: AccountId;
pgp?: string;
riot?: string;