diff --git a/packages/ui-identicon/package.json b/packages/ui-identicon/package.json index c3e4a526..614a45c5 100644 --- a/packages/ui-identicon/package.json +++ b/packages/ui-identicon/package.json @@ -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" } } diff --git a/packages/ui-identicon/src/Identicon.tsx b/packages/ui-identicon/src/Identicon.tsx index 6786741f..3524d987 100644 --- a/packages/ui-identicon/src/Identicon.tsx +++ b/packages/ui-identicon/src/Identicon.tsx @@ -74,7 +74,7 @@ export default class IdentityIcon extends React.PureComponent { ? encodeAddress(value, prefix) : value; - decodeAddress(address as string, prefix); + decodeAddress(address as string, false, prefix); return address === prevState.address ? null diff --git a/packages/ui-keyring/package.json b/packages/ui-keyring/package.json index 5d3ad6c1..dc5cb577 100644 --- a/packages/ui-keyring/package.json +++ b/packages/ui-keyring/package.json @@ -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": "*", diff --git a/packages/ui-keyring/src/Base.ts b/packages/ui-keyring/src/Base.ts index cabdb2b7..85d1c0fe 100644 --- a/packages/ui-keyring/src/Base.ts +++ b/packages/ui-keyring/src/Base.ts @@ -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 { diff --git a/packages/ui-keyring/src/Keyring.ts b/packages/ui-keyring/src/Keyring.ts index 49b6389c..56cc8120 100644 --- a/packages/ui-keyring/src/Keyring.ts +++ b/packages/ui-keyring/src/Keyring.ts @@ -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) diff --git a/packages/ui-settings/package.json b/packages/ui-settings/package.json index ef29de86..ef3bb39b 100644 --- a/packages/ui-settings/package.json +++ b/packages/ui-settings/package.json @@ -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" } diff --git a/packages/ui-util/package.json b/packages/ui-util/package.json index 6db08d2e..264ef7ea 100644 --- a/packages/ui-util/package.json +++ b/packages/ui-util/package.json @@ -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": "*" diff --git a/yarn.lock b/yarn.lock index 9dc62718..9f130b91 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1694,15 +1694,26 @@ "@types/bs58" "^4.0.0" bs58 "^4.0.1" +"@polkadot/keyring@^0.43.0-beta.0": + version "0.43.0-beta.0" + resolved "https://registry.yarnpkg.com/@polkadot/keyring/-/keyring-0.43.0-beta.0.tgz#d1f6edb24d9b9a817d48d6b180da8d0efb7c6121" + integrity sha512-izJw9KxXpmewQw9aKIjmNpKiLnVNdvSY6fA55aXGLlCDLjkkufW1OXoZmhsGi3jWzto6wWWAFfnzBxvimzuPBQ== + dependencies: + "@babel/runtime" "^7.4.0" + "@polkadot/util" "^0.43.0-beta.0" + "@polkadot/util-crypto" "^0.43.0-beta.0" + "@types/bs58" "^4.0.0" + bs58 "^4.0.1" + "@polkadot/ts@^0.1.56": version "0.1.56" resolved "https://registry.yarnpkg.com/@polkadot/ts/-/ts-0.1.56.tgz#ffd6e9c95704a7fb90b918193b9dc5c440114b27" integrity sha512-wnt4zXxZXyz6WaubTO/I+nUElwV2DogFzdl6CrKfVn2PTWp8uHN06W9s40FH57ORtmQfDr9rLRP8Nq+oIyElbg== -"@polkadot/types@^0.52.1": - version "0.52.1" - resolved "https://registry.yarnpkg.com/@polkadot/types/-/types-0.52.1.tgz#f24e02bdb280c191119b8d8e3d08785f9bf971ec" - integrity sha512-63uaHnQl2hJ0h7bEryMDQxHzLb0KxlLND3RrNEZ7CTCtRc8wJ4ZQemO0Mdn0N0WClwqY5TuQqvg3cWNWLz3BaA== +"@polkadot/types@^0.53.0-beta.1": + version "0.53.0-beta.1" + resolved "https://registry.yarnpkg.com/@polkadot/types/-/types-0.53.0-beta.1.tgz#8a039e3dcbf060cc941130fd825f030f878a6cbd" + integrity sha512-2NcfJGU130xbCU12cFr5sYwgMl5NgNaup51WVepDiDZKY56SK9hrdQ79Z7VLgOoAsmN/IhZUe+5899SDCbdfoA== dependencies: "@babel/runtime" "^7.4.0" "@polkadot/keyring" "^0.42.1" @@ -1730,6 +1741,28 @@ tweetnacl "^1.0.1" xxhashjs "^0.2.2" +"@polkadot/util-crypto@^0.43.0-beta.0": + version "0.43.0-beta.0" + resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-0.43.0-beta.0.tgz#73440c789c83e7ff19d6ac7347a1573cd97b0da5" + integrity sha512-840A3Dl+j6RHMeaQDwINM79VaVtBZdOSw2m7EuTkQXE1+705pLrwqpwUcXHNEo9fCz6Io6MkavJUm9nKZotjww== + dependencies: + "@babel/runtime" "^7.4.0" + "@polkadot/util" "^0.43.0-beta.0" + "@polkadot/wasm-crypto" "^0.6.1" + "@polkadot/wasm-dalek-ed25519" "^0.6.1" + "@polkadot/wasm-schnorrkel" "^0.6.1" + "@types/bip39" "^2.4.2" + "@types/pbkdf2" "^3.0.0" + "@types/secp256k1" "^3.5.0" + "@types/webassembly-js-api" "^0.0.2" + "@types/xxhashjs" "^0.2.1" + bip39 "^2.5.0" + blakejs "^1.1.0" + js-sha3 "^0.8.0" + secp256k1 "^3.6.2" + tweetnacl "^1.0.1" + xxhashjs "^0.2.2" + "@polkadot/util@^0.42.1": version "0.42.1" resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-0.42.1.tgz#270f87c5370ab38e17d7aa77804686dc309328f7" @@ -1745,6 +1778,21 @@ ip-regex "^4.0.0" moment "^2.24.0" +"@polkadot/util@^0.43.0-beta.0": + version "0.43.0-beta.0" + resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-0.43.0-beta.0.tgz#ec621344b690d49fec473c2a9b0d215b13d4decd" + integrity sha512-XTHb3fowTO4fPTE+72xh1Cdy+/gdmi5ytsHuZtlNC1DH09TZ6R3GBi9NzX4mQZsH8dSUOzQkGHiHzCPRULE9fQ== + dependencies: + "@babel/runtime" "^7.4.0" + "@types/bn.js" "^4.11.4" + "@types/deasync" "^0.1.0" + "@types/ip-regex" "^3.0.0" + bn.js "^4.11.8" + camelcase "^5.2.0" + chalk "^2.4.2" + ip-regex "^4.0.0" + moment "^2.24.0" + "@polkadot/wasm-crypto@^0.6.1": version "0.6.1" resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto/-/wasm-crypto-0.6.1.tgz#34e14cf6946060e50bc6f423afa6a11b8eadec4e"