mirror of
https://github.com/pezkuwichain/pezkuwi-ui.git
synced 2026-07-21 15:35:43 +00:00
ss58 keyring bump (#105)
* ss58 keyring bump * loadAll (ignoreChecksum) * Restore ignore checksum * Identicon decode params
This commit is contained in:
@@ -24,8 +24,8 @@
|
||||
"react": "*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^0.42.1",
|
||||
"@polkadot/util-crypto": "^0.42.1",
|
||||
"@polkadot/keyring": "^0.43.0-beta.0",
|
||||
"@polkadot/util-crypto": "^0.43.0-beta.0",
|
||||
"xmlserializer": "^0.6.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ export default class IdentityIcon extends React.PureComponent<Props, State> {
|
||||
? encodeAddress(value, prefix)
|
||||
: value;
|
||||
|
||||
decodeAddress(address as string, prefix);
|
||||
decodeAddress(address as string, false, prefix);
|
||||
|
||||
return address === prevState.address
|
||||
? null
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
"styled-components": "^4.1.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^0.42.1",
|
||||
"@polkadot/types": "^0.52.1",
|
||||
"@polkadot/util": "^0.42.1"
|
||||
"@polkadot/keyring": "^0.43.0-beta.0",
|
||||
"@polkadot/types": "^0.53.0-beta.1",
|
||||
"@polkadot/util": "^0.43.0-beta.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@polkadot/keyring": "*",
|
||||
|
||||
@@ -43,8 +43,8 @@ export default class Base {
|
||||
throw new Error(`Keyring should be initialised via 'loadAll' before use`);
|
||||
}
|
||||
|
||||
decodeAddress (key: string | Uint8Array): Uint8Array {
|
||||
return this.keyring.decodeAddress(key);
|
||||
decodeAddress (key: string | Uint8Array, ignoreChecksum?: boolean): Uint8Array {
|
||||
return this.keyring.decodeAddress(key, ignoreChecksum);
|
||||
}
|
||||
|
||||
encodeAddress (key: string | Uint8Array): string {
|
||||
|
||||
@@ -153,7 +153,8 @@ export class Keyring extends Base implements KeyringStruct {
|
||||
|
||||
private loadAccount (json: KeyringJson, key: string) {
|
||||
if (!json.meta.isTesting && (json as KeyringPair$Json).encoded) {
|
||||
const pair = this.keyring.addFromJson(json as KeyringPair$Json);
|
||||
// FIXME Just for the transition period (ignoreChecksum)
|
||||
const pair = this.keyring.addFromJson(json as KeyringPair$Json, true);
|
||||
|
||||
this.accounts.add(pair.address(), json);
|
||||
}
|
||||
@@ -167,7 +168,8 @@ export class Keyring extends Base implements KeyringStruct {
|
||||
const address = this.encodeAddress(
|
||||
isHex(json.address)
|
||||
? hexToU8a(json.address)
|
||||
: this.decodeAddress(json.address)
|
||||
// FIXME Just for the transition period (ignoreChecksum)
|
||||
: this.decodeAddress(json.address, true)
|
||||
);
|
||||
const [, hexAddr] = key.split(':');
|
||||
|
||||
@@ -193,7 +195,8 @@ export class Keyring extends Base implements KeyringStruct {
|
||||
const pair = createPair(
|
||||
this.keyring.type,
|
||||
{
|
||||
publicKey: this.decodeAddress(json.address)
|
||||
// FIXME Just for the transition period (ignoreChecksum)
|
||||
publicKey: this.decodeAddress(json.address, true)
|
||||
},
|
||||
json.meta,
|
||||
hexToU8a(json.encoded)
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.3.4",
|
||||
"@polkadot/util": "^0.42.1",
|
||||
"@polkadot/util": "^0.43.0-beta.0",
|
||||
"@types/store": "^2.0.1",
|
||||
"store": "^2.0.12"
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
"@babel/runtime": "^7.3.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/types": "^0.52.1"
|
||||
"@polkadot/types": "^0.53.0-beta.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@polkadot/types": "*"
|
||||
|
||||
Reference in New Issue
Block a user