Re-encode who addresses (align with settings) (#2908)

* Re-encode who addresses (align with settings)

* Don't display password for external signatories
This commit is contained in:
Jaco Greeff 2020-06-09 13:50:01 +02:00 committed by GitHub
parent 24f2930477
commit be3aefd524
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -99,7 +99,7 @@ function extractExternal (accountId?: string | null): AccountFlags {
isHardware: !!pair.meta.isHardware,
isMultisig: !!pair.meta.isMultisig,
threshold: (pair.meta.threshold as number) || 0,
who: (pair.meta.who as string[]) || []
who: ((pair.meta.who as string[]) || []).map((w) => keyring.encodeAddress(keyring.decodeAddress(w)))
};
}
@ -505,6 +505,14 @@ class Signer extends React.PureComponent<Props, State> {
return null;
}
if (isMultisig) {
const { isExternal, isHardware } = extractExternal(signatory);
if (isExternal || isHardware) {
return null;
}
}
return (
<Unlock
autoFocus