Allow addFromAddress to be encodable (#463)

This commit is contained in:
Jaco Greeff
2019-08-31 14:26:47 +02:00
committed by GitHub
parent b2ed63b66a
commit 22e76c17ca
+1 -1
View File
@@ -90,7 +90,7 @@ export default class Keyring implements KeyringInstance {
public addFromAddress (address: string | Uint8Array, meta: KeyringPair$Meta = {}, encoded: Uint8Array | null = null, type: KeypairType = this.type, ignoreChecksum?: boolean): KeyringPair {
const publicKey = this.decodeAddress(address, ignoreChecksum);
return this.addPair(createPair(type, { publicKey }, meta, encoded));
return this.addPair(createPair(type, { publicKey, secretKey: new Uint8Array(64) }, meta, encoded));
}
/**