+1
-1
@@ -23,7 +23,7 @@
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.5.5",
|
||||
"@polkadot/dev": "^0.31.0-beta.6",
|
||||
"@polkadot/ts": "^0.1.69",
|
||||
"@polkadot/ts": "^0.1.70",
|
||||
"gh-pages": "^2.1.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,6 +12,10 @@ import decode from './decode';
|
||||
import encode from './encode';
|
||||
import toJson from './toJson';
|
||||
|
||||
function isEmpty (u8a: Uint8Array): boolean {
|
||||
return u8a.reduce((count, u8): number => count + u8, 0) > 0;
|
||||
}
|
||||
|
||||
const isSr25519 = (type: KeypairType): boolean =>
|
||||
type === 'sr25519';
|
||||
|
||||
@@ -86,7 +90,7 @@ export default function createPair (type: KeypairType, { publicKey, secretKey }:
|
||||
return meta;
|
||||
},
|
||||
get isLocked (): boolean {
|
||||
return !secretKey || secretKey.length === 0;
|
||||
return !secretKey || secretKey.length === 0 || !isEmpty(secretKey);
|
||||
},
|
||||
lock: (): void => {
|
||||
secretKey = new Uint8Array(0);
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.5.5",
|
||||
"@polkadot/util": "^1.2.0-beta.5",
|
||||
"@polkadot/wasm-crypto": "^0.14.0-beta.2",
|
||||
"@polkadot/wasm-crypto": "^0.14.0-beta.3",
|
||||
"@types/bip39": "^2.4.2",
|
||||
"@types/bs58": "^4.0.0",
|
||||
"@types/pbkdf2": "^3.0.0",
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"exclude": [
|
||||
"build",
|
||||
"packages/*/build"
|
||||
],
|
||||
"include": [
|
||||
"packages/**/*.d.ts",
|
||||
"packages/**/*.ts",
|
||||
|
||||
@@ -1844,17 +1844,17 @@
|
||||
typescript "^3.6.2"
|
||||
vuepress "^1.0.3"
|
||||
|
||||
"@polkadot/ts@^0.1.69":
|
||||
"@polkadot/ts@^0.1.70":
|
||||
version "0.1.70"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/ts/-/ts-0.1.70.tgz#0f6462871c557fc81bf0e0542d5ac4ccd18f134c"
|
||||
integrity sha512-SREHjU1WHfQeHo8/ieeQuiahHXSvZMyySdP44+G+sySgTDHK5wfOK7zJKv1dFOZBHrWcqtjCptTNMg2B9E2ysQ==
|
||||
dependencies:
|
||||
"@types/chrome" "^0.0.88"
|
||||
|
||||
"@polkadot/wasm-crypto@^0.14.0-beta.2":
|
||||
version "0.14.0-beta.2"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto/-/wasm-crypto-0.14.0-beta.2.tgz#a405cbf019e0213b6d6df7ad0062fc766af3f537"
|
||||
integrity sha512-QGXgLfeaQDKBASZ70mrSApQ8ROOj2eRDdSUSNu+ApgoRODptkm7NrRtGBWw+5nH5qVOmGG3eZYFHFDZGUrlOag==
|
||||
"@polkadot/wasm-crypto@^0.14.0-beta.3":
|
||||
version "0.14.0-beta.3"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto/-/wasm-crypto-0.14.0-beta.3.tgz#740e576ed07e378b55e7333239da23a44d0a07f3"
|
||||
integrity sha512-CbPx+ymPkE5TPDH/1cnIi7WhssIRrVY3Ira2qY9YDcc1+L3Gr3yvPvLnNnynaZ+LtYkt57jRSZtUbUgXoT98Dw==
|
||||
|
||||
"@types/babel__core@^7.1.0":
|
||||
version "7.1.2"
|
||||
|
||||
Reference in New Issue
Block a user