mirror of
https://github.com/pezkuwichain/pezkuwi-ui.git
synced 2026-04-22 09:07:56 +00:00
Restore Account from JSON with Appropriate crypto type (#117)
* json restore with appropriate crypto type * check if array
This commit is contained in:
@@ -201,8 +201,9 @@ export class Keyring extends Base implements KeyringStruct {
|
||||
}
|
||||
|
||||
restoreAccount (json: KeyringPair$Json, password: string): KeyringPair {
|
||||
const type = Array.isArray(json.encoding.content) ? json.encoding.content[1] : 'ed25519';
|
||||
const pair = createPair(
|
||||
this.keyring.type,
|
||||
type,
|
||||
{
|
||||
// FIXME Just for the transition period (ignoreChecksum)
|
||||
publicKey: this.decodeAddress(json.address, true)
|
||||
|
||||
Reference in New Issue
Block a user