Compare commits

...
33 Commits
Author SHA1 Message Date
Github Actions a26ef77df2 [CI Skip] release/stable 0.58.1
skip-checks: true
2020-08-31 16:02:16 +00:00
Jaco Greeff 0bffc7af3c 0.58.1 (#360) 2020-08-31 17:58:20 +02:00
Github Actions 496dc7fe2e [CI Skip] release/beta 0.58.0-beta.9
skip-checks: true
2020-08-27 08:58:01 +00:00
Vlad Proshchavaiev 3610d1b921 Add Subsocial to ss58 defaults (#358) 2020-08-27 10:53:37 +02:00
Github Actions abdfa588a6 [CI Skip] release/beta 0.58.0-beta.8
skip-checks: true
2020-08-26 14:04:31 +00:00
Jaco Greeff ccfa730713 Bump deps (#357)
* Bump deps

* Update packages/ui-settings/src/defaults/crypto.ts

* .eslintrc
2020-08-26 15:59:57 +02:00
Github Actions 3eb8799f67 [CI Skip] release/beta 0.58.0-beta.7
skip-checks: true
2020-08-18 10:07:03 +00:00
Jaco Greeff 42e57ee0ca Bump deps (#356) 2020-08-18 12:03:28 +02:00
Github Actions e37751672b [CI Skip] release/beta 0.58.0-beta.6
skip-checks: true
2020-08-13 09:10:37 +00:00
Jaco Greeff 9768383b40 Bump deps (#355) 2020-08-13 11:07:06 +02:00
Github Actions b87479f618 [CI Skip] release/beta 0.58.0-beta.5
skip-checks: true
2020-08-10 19:29:47 +00:00
Jaco Greeff fdc310b32e Support scanning name where ":" is contained within (#354) 2020-08-10 21:26:11 +02:00
Github Actions 8766481109 [CI Skip] release/beta 0.58.0-beta.4
skip-checks: true
2020-08-08 07:10:35 +00:00
Jaco Greeff d4575f7e65 Bump deps (#353) 2020-08-08 09:07:31 +02:00
Github Actions 59952cbb3a [CI Skip] release/beta 0.58.0-beta.3
skip-checks: true
2020-08-06 13:19:07 +00:00
Jaco Greeff 492e1739bc Bump berry (#352)
* Bump berry

* Rewrite
2020-08-06 15:15:56 +02:00
Github Actions a6065f7154 [CI Skip] release/beta 0.58.0-beta.2
skip-checks: true
2020-07-31 12:35:14 +00:00
Jaco Greeff 11c44643aa Bump deps (#351) 2020-07-31 14:29:50 +02:00
Github Actions 04b61d6b7a [CI Skip] release/beta 0.58.0-beta.1
skip-checks: true
2020-07-27 12:13:22 +00:00
Jaco Greeff bc15f44780 Bump to next beta 2020-07-27 14:09:23 +02:00
Github Actions 735b18d59f [CI Skip] release/stable 0.57.3
skip-checks: true
2020-07-27 12:07:25 +00:00
Jaco Greeff 5001dea3c1 Add updated yarn.lock 2020-07-27 14:03:50 +02:00
Jaco Greeff 1be84c778b 0.57.3 (CHANGELOG typo) 2020-07-27 14:03:10 +02:00
Github Actions ddb1b8169b [CI Skip] release/stable 0.57.2
skip-checks: true
2020-07-27 12:00:47 +00:00
Jaco Greeff e077259037 0.57.2 (after failed 0.57.1 release) 2020-07-27 13:57:06 +02:00
Github Actions c88bccb560 [CI Skip] release/stable 0.57.1
skip-checks: true
2020-07-27 11:53:15 +00:00
Jaco Greeff 5bd2b3c85e Actual bump to 0.57 2020-07-27 13:48:41 +02:00
Github Actions 078d6800a6 [CI Skip] release/beta 0.57.0-beta.2
skip-checks: true
2020-07-27 11:47:25 +00:00
Jaco Greeff 4126dffc96 0.57 (#350) 2020-07-27 13:43:18 +02:00
Github Actions 61400d4c03 [CI Skip] release/beta 0.57.0-beta.1
skip-checks: true
2020-07-21 20:33:33 +00:00
Jaco Greeff a3ab735c4e Adjust password checks for v3 (#349) 2020-07-21 22:29:50 +02:00
Github Actions 0138ac3e4a [CI Skip] release/beta 0.57.0-beta.0
skip-checks: true
2020-07-21 09:22:08 +00:00
Jaco Greeff 0dcbdcac3a JSON v3 (#348) 2020-07-21 11:18:19 +02:00
28 changed files with 3667 additions and 3347 deletions
+1
View File
@@ -1 +1,2 @@
1
0.57.20.57.3
+9
View File
@@ -7,5 +7,14 @@ module.exports = {
project: [
'./tsconfig.json'
]
},
rules: {
...base.rules,
// add override for any (a metric ton of them, initial conversion)
'@typescript-eslint/no-explicit-any': 'off',
// these should be removed, there are 8 of them as errors
'@typescript-eslint/no-non-null-assertion': 'off',
// this seems very broken atm, false positives
'@typescript-eslint/unbound-method': 'off'
}
};
+86
View File
File diff suppressed because one or more lines are too long
-56
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -8,4 +8,4 @@ plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.js
spec: "@yarnpkg/plugin-interactive-tools"
yarnPath: .yarn/releases/yarn-rc.js
yarnPath: .yarn/releases/yarn-2.1.1.cjs
+58 -1
View File
@@ -1,64 +1,94 @@
# CHANGELOG
## 0.58.1 Aug 31, 2020
- Add Subsocial to ss58 defaults (Thanks to https://github.com/F3Joule)
- Support QR scanning where name contains ":"
- Support for Moonbeam ETH-compatible crypto types
## 0.57.3 Jul 27, 2020
- Support for JSON v3 kdf-enabled format
- Adjust password validity checks (alongside v3)
- Bump to `@polkadot/api` 1.26.1
- Bump to `@polkadot/util` 3.0.1
## 0.56.1 Jul 20, 2020
- Add Kulupu to ss58 options (https://github.com/carumusan)
- Remove CC1 naming for Polkadot (as applicable)
- Flatten React IdentityIcon (no extra wrapping)
- Bump to `@polkadot/api` 1.25.1
- Bump to `@polkadot/util` 2.18.1
## 0.55.1 Jul 2, 2020
- Better error-handling for invalid FileStore accounts (Thanks to https://github.com/yuhui1208)
- Adjust react-qr `Scan*` making `onScan` callbacks required
- Rework the react-qr display to use functional components
- Bump to `@polkadot/api` 1.21.1
- Bump to `@polkadot/util` 2.15.1
## 0.54.1 Jun 16, 2020
- Add genesisHash to signer payload (Thanks to https://github.com/hanwencheng)
- Allow QR scanning to parse mini keys (Thanks to https://github.com/hanwencheng)
- Adjust ordering of available crypto types (native first)
- Rename Substrate prefix entry (42) to "generic"
- Bump to `@polkadot/api` 1.19.1
- Bump to `@polkadot/util` 2.14.1
## 0.53.1 May 14, 2020
- Add Ecdsa to the supported crypto types options (Thanks to https://github.com/akru)
- Add Egedware to network prefix settings (Thanks to https://github.com/jnaviask)
- Add `addMultisig` into keyring (with all options to re-create address)
- Bump to `@polkadot/api` 1.14.1
- Bump to `@polkadot/util` 2.10.1
## 0.52.1 Apr 15, 2020
- **Breaking change** (TypeScript only) The `*.d.ts` files now contain TypeScript 3.8 features, `#private`, which is not usable in older versions
- Allow for the encoding of chain-settings via QR (Thanks to https://github.com/hanwencheng)
- Enhance checks for ws url in settings (Thanks to https://github.com/kwingram25)
- Start of `isAlternative` implementations for identicons to react, react-native & vue (currently only Polkadot sixPoint)
- Bump to `@polkadot/api` 1.10 & `@polkadot/util` 2.8
- Convert `private <field>` to `#<field>`
- Remove internal/duplicated ui-keyring ss58Format mapping, rather set it directly on wrapped keyring
## 0.51.1 Feb 18, 2020
- Support formatting of addresses via createPair base on latest upstream keyring
- Bump to `@polkadot/api` 1.3.1
- Bump to `@polkadot/util` 2.4.1
## 0.50.1 Feb 16, 2020
- ui-settings does not expose pre-configured endpoints by default (only local dev node)
- Bump to `@polkadot/api` 1.2.1
- Bump to `@polkadot/util` 2.3.1
## 0.49.1 Feb 06, 2020
- Add resolver for jest requires (tests from src)
## 0.48.1 Jan 30, 2020
- Add Westend & Kulupulu, remove Alexander
@@ -66,6 +96,7 @@
- Change display name for Kusama
- Mirror QR scanning display
## 0.47.1 Nov 29, 2019
- Support for Kusama CC3 (network endpoints)
@@ -73,27 +104,33 @@
- Language options have been removed from settings (these will be app-specific)
- QR display loops now have a timeout decay (slower as it loops)
## 0.46.1 Oct 25, 2019
- Add an example for using React Native (thanks to https://github.com/cameronfr)
- Add base documentation for getting started
- Add camera access to the setting structure
## 0.45.1 Sep 26, 2019
- Support for Kusama CC2
- **Breaking change** The subscription subject for `ui-keyring` does not return a pre-formatted React object anymore. This is SUI-specific, so had limited use and therefore should not even be split into a `react-keyring` component. Rather users of this functionality should construct their own options for their framework.
- Support for Kusama CC2
- Experimental support for signing via Ledger HW
- Add specific settings for the icon type to `ui-settings`
- Add Edgeware live RPC endpoints to `ui-settings`
- Adjust `react-identicon` highlights (validators)
- Add `example-{react, vue}` highlighting simple use with `ui-keyring`, `ui-settings` & `*-identicon` components
## 0.44.1 Sep 12, 2019
- Update `@polkadot/util` to 1.4.1
- Upddate to Babel 7.6
## 0.43.1 Sep 10, 2019
- Add W3F Node for Kusama
@@ -102,16 +139,19 @@
- ui-keyring now check the genesisHash on all load operations (if supplied)
- react-qr is now operational and integrated in the polkadot-js/extension and apps repos
## 0.42.1 Aug 24, 2019
- **Breaking Change** The `@polkadot/ui-identicon` package has been renamed to `@polkadot/react-identicon`
- **Breaking change** For `@polkadot/ui-keyring` the stores are now not exported from the index, imports should be changed to either `ui-keyring/stores` or explicitly to `ui-keyring/stores/Extension`
- Support for Kusama with endpoints and settings
- The `@polkadot/reactnative-identicon` package has been added (only Polkadot support atm)
- The `@polkadot/react-qr` package has been added to display/scan QR codes
- `@polkadot/ui-settings` has UNfrastructure added as an RPC provider for Alex
- `@polkadot/ui-settings` exposes a dropdown with address prefix options
## 0.41.1 Jun 14, 2019
- Adapt interface to cater for new `@polkadot/keyring`, where pairs -
@@ -124,15 +164,18 @@
- Remove previously deprecated kering functions, `createAccount`, `createAccountExternal` & `createAccountMnemonic`
- Remove (previously deprecated), `@polkadot/ui-util`, all these functions have been incorporated in `@polkadot/util`
## 0.40.1 Jun 04, 2019
- Address encoding changes, use encoded address instead of supplied
## 0.39.1 May 22, 2019
- Allow for externally injected accounts
- @polkadot/util 0.91.1 & @polkadot/api 0.79.1
## 0.38.1 May 08, 2019
- Sorting of keyring addresses
@@ -141,23 +184,28 @@
- Ensure only a single instance of ui-keyring is loaded
- Adjust short address option display (keyring options)
## 0.37.1 Apr 03, 2019
- Add Emberic Elm (Dried Danta discontinued)
- @polkadot/util & @polkadot/api 0.75.1
## 0.36.1 Mar 29, 2019
- Small fixes, latest @polkadot/wasm-* packages
## 0.35.1 Mar 29, 2019
- @polkadot/util & @polkadot/api 0.75.1
## 0.34.1 Mar 28, 2019
- Fix for blake2 in Polkadot identicon generation
## 0.33.1 Mar 23, 2019
- Rename createUri and createExternal to addExternal and addUri
@@ -165,6 +213,7 @@
- Add additional createFromUri function to create pair, but not add it
- Latest api, util & util-crypto (this with WASM and JS fallbacks)
## 0.32.1 Mar 20, 2019
- Add createUri to create an account from a path uri
@@ -172,35 +221,43 @@
- Deprecate createAccount, createAccountExternal and createAccountMnemonic
- Fix styled-component dependencies when used in a non-@polkadot project
## 0.31.1 Mar 18, 2019
- Allow for latest keyring with sr25519 derived support
- When using dev mode, it assumes the substrate node has sr25519 derived keys
## 0.30.1 Mar 14, 2019
- Swap to publishing -beta.x on merge (non-breaking testing)
## 0.29.1 Mar 13, 2019
Swap to using a dev HDKD keyring (only available on latest substrate master, only affects nodes running with --dev, normal operation unaffected)
## 0.28.1 Feb 21, 2019
Default Substrate icon is Jdenticon
## 0.27.1 Feb 20, 2019
Replace Charred Cherry with Dried Danta, remove old decimals and token name configs
## 0.26.1 Feb 14, 2019
Add keyring support for sd25519 (schnorrkel)
## 0.25.1 Jan 09, 2019
Add `@polkadot/{keyring,util,util-crypto,types}` as peerDependencies for the various packages as used. Thie should allow less churn on this repo with version bumps, although it does add some extra effort onto the users of these libraries. (But the assumption is that they use these anyway)
## 0.24.1 Dec 19, 2018
## 0.23.1 Dec 14, 2018
+1 -1
View File
@@ -10,5 +10,5 @@
"packages": [
"packages/*"
],
"version": "0.56.1"
"version": "0.58.1"
}
+11 -8
View File
@@ -29,19 +29,22 @@
"test:one": "polkadot-dev-run-test"
},
"devDependencies": {
"@babel/core": "^7.10.5",
"@babel/runtime": "^7.10.5",
"@polkadot/dev": "^0.55.27",
"@polkadot/ts": "^0.3.29",
"@types/jest": "^26.0.5",
"@babel/core": "^7.11.4",
"@babel/runtime": "^7.11.2",
"@polkadot/dev": "^0.55.43",
"@polkadot/ts": "^0.3.40",
"@types/jest": "^26.0.10",
"babel-plugin-transform-vue-template": "^0.4.2",
"empty": "^0.10.1",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-is": "^16.13.1",
"react-native": "^0.63.1",
"vue-template-compiler": "^2.6.11",
"react-native": "^0.63.2",
"typedoc": "^0.18.0",
"typedoc-plugin-markdown": "^2.4.2",
"typedoc-plugin-no-inherit": "^1.1.10",
"vue-template-compiler": "^2.6.12",
"webpack-serve": "^3.2.0"
},
"version": "0.56.1"
"version": "0.58.1"
}
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/example-react",
"version": "0.56.1",
"version": "0.58.1",
"description": "A very basic example with ui-* & react-* packages",
"main": "index.js",
"author": "Jaco Greeff <jacogr@gmail.com>",
@@ -9,6 +9,6 @@
],
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.10.5"
"@babel/runtime": "^7.11.2"
}
}
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/example-vue",
"version": "0.56.1",
"version": "0.58.1",
"description": "A very basic example with ui-* & vue-* packages",
"main": "index.js",
"author": "Jaco Greeff <jacogr@gmail.com>",
@@ -9,6 +9,6 @@
],
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.10.5"
"@babel/runtime": "^7.11.2"
}
}
+15 -15
View File
@@ -1,6 +1,6 @@
{
"name": "exampleReactNative",
"version": "0.56.1",
"version": "0.58.1",
"private": true,
"workspaces": {
"nohoist": [
@@ -23,30 +23,30 @@
"test": "jest"
},
"dependencies": {
"@polkadot/reactnative-identicon": "0.56.1",
"@polkadot/ui-keyring": "0.56.1",
"@polkadot/ui-settings": "0.56.1",
"@react-native-community/async-storage": "^1.11.0",
"@polkadot/reactnative-identicon": "0.58.1",
"@polkadot/ui-keyring": "0.58.1",
"@polkadot/ui-settings": "0.58.1",
"@react-native-community/async-storage": "^1.12.0",
"fast-text-encoding": "^1.0.3",
"get-yarn-workspaces": "^1.0.2",
"os-browserify": "^0.3.0",
"process": "^0.11.10",
"react": "16.13.1",
"react-native": "^0.63.1",
"react-native": "^0.63.2",
"react-native-crypto": "^2.2.0",
"react-native-randombytes": "^3.5.3",
"stream-http": "^3.1.1"
},
"devDependencies": {
"@babel/core": "^7.10.5",
"@babel/runtime": "^7.10.5",
"@polkadot/keyring": "^2.18.1",
"@polkadot/util": "^2.18.1",
"@polkadot/util-crypto": "^2.18.1",
"@react-native-community/cli-platform-ios": "^4.10.1",
"@types/react-test-renderer": "16.9.2",
"babel-jest": "^26.1.0",
"metro-react-native-babel-preset": "^0.60.0",
"@babel/core": "^7.11.4",
"@babel/runtime": "^7.11.2",
"@polkadot/keyring": "^3.4.1",
"@polkadot/util": "^3.4.1",
"@polkadot/util-crypto": "^3.4.1",
"@react-native-community/cli-platform-ios": "^4.11.0",
"@types/react-test-renderer": "16.9.3",
"babel-jest": "^26.3.0",
"metro-react-native-babel-preset": "^0.63.0",
"react-test-renderer": "16.13.1"
},
"peerDependencies": {
+8 -8
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/react-identicon",
"version": "0.56.1",
"version": "0.58.1",
"description": "Renders an SVG picture representing an address",
"main": "index.js",
"author": "Jaco Greeff <jacogr@gmail.com>",
@@ -9,9 +9,9 @@
],
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.10.5",
"@polkadot/ui-settings": "0.56.1",
"@polkadot/ui-shared": "0.56.1",
"@babel/runtime": "^7.11.2",
"@polkadot/ui-settings": "0.58.1",
"@polkadot/ui-shared": "0.58.1",
"color": "^3.1.2",
"jdenticon": "2.2.0",
"react-copy-to-clipboard": "^5.0.2"
@@ -26,12 +26,12 @@
"styled-components": "*"
},
"devDependencies": {
"@polkadot/keyring": "^2.18.1",
"@polkadot/util": "^2.18.1",
"@polkadot/util-crypto": "^2.18.1",
"@polkadot/keyring": "^3.4.1",
"@polkadot/util": "^3.4.1",
"@polkadot/util-crypto": "^3.4.1",
"@types/react-copy-to-clipboard": "^4.3.0",
"@types/react-dom": "^16.9.8",
"@types/styled-components": "^5.1.1",
"@types/styled-components": "^5.1.2",
"styled-components": "^5.1.1",
"xmlserializer": "^0.6.1"
}
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/react-qr",
"version": "0.56.1",
"version": "0.58.1",
"description": "Generates and reads QR codes",
"main": "index.js",
"author": "Jaco Greeff <jacogr@gmail.com>",
@@ -9,13 +9,13 @@
],
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.10.5",
"@babel/runtime": "^7.11.2",
"qrcode-generator": "^1.4.4",
"react-qr-reader": "^2.2.1"
},
"devDependencies": {
"@types/react-qr-reader": "^2.1.3",
"@types/styled-components": "^5.1.1"
"@types/styled-components": "^5.1.2"
},
"peerDependencies": {
"@polkadot/util": "*",
+2 -2
View File
@@ -29,7 +29,7 @@ function ScanAddress ({ className, onError, onScan, size, style }: Props): React
(data: string | null): void => {
if (data) {
try {
const [prefix, content, genesisHash, name] = data.split(':');
const [prefix, content, genesisHash, ...name] = data.split(':');
const isValidPrefix = prefix === ADDRESS_PREFIX || prefix === SEED_PREFIX;
assert(isValidPrefix, `Invalid prefix received, expected '${ADDRESS_PREFIX}/${SEED_PREFIX}' , found '${prefix}'`);
@@ -40,7 +40,7 @@ function ScanAddress ({ className, onError, onScan, size, style }: Props): React
decodeAddress(content);
}
onScan({ content, genesisHash, isAddress, name });
onScan({ content, genesisHash, isAddress, name: name?.length ? name.join(':') : undefined });
} catch (error) {
console.error('@polkadot/react-qr:QrScanAddress', (error as Error).message, data);
}
+5 -5
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/reactnative-identicon",
"version": "0.56.1",
"version": "0.58.1",
"description": "Renders an SVG picture representing an address",
"main": "index.js",
"author": "Jaco Greeff <jacogr@gmail.com>",
@@ -9,8 +9,8 @@
],
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.10.5",
"@polkadot/ui-shared": "0.56.1",
"@babel/runtime": "^7.11.2",
"@polkadot/ui-shared": "0.58.1",
"react-native-svg": "^12.1.0"
},
"peerDependencies": {
@@ -19,7 +19,7 @@
"react-native": "*"
},
"devDependencies": {
"@polkadot/util-crypto": "^2.18.1",
"@types/react-native": "^0.63.1"
"@polkadot/util-crypto": "^3.4.1",
"@types/react-native": "^0.63.10"
}
}
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/ui-assets",
"version": "0.56.1",
"version": "0.58.1",
"description": "Static assets shared accross projects",
"main": "index.js",
"author": "Jaco Greeff <jacogr@gmail.com>",
@@ -9,6 +9,6 @@
],
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.10.5"
"@babel/runtime": "^7.11.2"
}
}
+8 -8
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/ui-keyring",
"version": "0.56.1",
"version": "0.58.1",
"main": "index.js",
"repository": "https://github.com/polkadot-js/apps.git",
"author": "Jaco Greeff <jacogr@gmail.com>",
@@ -17,24 +17,24 @@
"./ledger/transportsWeb": "./ledger/transportsEmpty"
},
"dependencies": {
"@babel/runtime": "^7.10.5",
"@ledgerhq/hw-transport-webusb": "^5.19.1",
"@babel/runtime": "^7.11.2",
"@ledgerhq/hw-transport-webusb": "^5.22.0",
"@zondax/ledger-polkadot": "^0.11.0",
"mkdirp": "^1.0.4",
"rxjs": "^6.6.0",
"rxjs": "^6.6.2",
"store": "^2.0.12"
},
"devDependencies": {
"@polkadot/keyring": "^2.18.1",
"@polkadot/types": "^1.25.1",
"@polkadot/util": "^2.18.1",
"@polkadot/keyring": "^3.4.1",
"@polkadot/types": "^1.31.1",
"@polkadot/util": "^3.4.1",
"@types/ledgerhq__hw-transport-node-hid": "^4.22.1",
"@types/ledgerhq__hw-transport-webusb": "^4.70.0",
"@types/mkdirp": "^1.0.1",
"@types/store": "^2.0.2"
},
"optionalDependencies": {
"@ledgerhq/hw-transport-node-hid": "^5.19.1"
"@ledgerhq/hw-transport-node-hid": "^5.22.0"
},
"peerDependencies": {
"@polkadot/keyring": "*",
+1 -2
View File
@@ -15,7 +15,6 @@ import addresses from './observable/addresses';
import contracts from './observable/contracts';
import env from './observable/development';
import BrowserStore from './stores/Browser'; // direct import (skip index with all)
import { MAX_PASS_LEN } from './defaults';
export default class Base {
#accounts: AddressSubject;
@@ -91,7 +90,7 @@ export default class Base {
}
public isPassValid (password: string): boolean {
return password.length > 0 && password.length <= MAX_PASS_LEN;
return password.length > 0;
}
public setSS58Format (ss58Format?: Prefix): void {
+6 -4
View File
@@ -11,7 +11,7 @@ import BN from 'bn.js';
import createPair from '@polkadot/keyring/pair';
import chains from '@polkadot/ui-settings/defaults/chains';
import { bnToBn, hexToU8a, isHex, isString, u8aSorted } from '@polkadot/util';
import { createKeyMulti } from '@polkadot/util-crypto';
import { base64Decode, createKeyMulti } from '@polkadot/util-crypto';
import env from './observable/development';
import Base from './Base';
@@ -273,12 +273,14 @@ export class Keyring extends Base implements KeyringStruct {
}
public restoreAccount (json: KeyringPair$Json, password: string): KeyringPair {
const type = Array.isArray(json.encoding.content) ? json.encoding.content[1] : 'ed25519';
const cryptoType = Array.isArray(json.encoding.content) ? json.encoding.content[1] : 'ed25519';
const encType = Array.isArray(json.encoding.type) ? json.encoding.type : [json.encoding.type];
const pair = createPair(
{ toSS58: this.encodeAddress, type },
{ toSS58: this.encodeAddress, type: cryptoType },
{ publicKey: this.decodeAddress(json.address, true) },
json.meta,
hexToU8a(json.encoded)
isHex(json.encoded) ? hexToU8a(json.encoded) : base64Decode(json.encoded),
encType
);
// unlock, save account and then lock (locking cleans secretKey, so needs to be last)
+1 -3
View File
@@ -8,7 +8,6 @@ import { decodeAddress } from '@polkadot/keyring';
const ACCOUNT_PREFIX = 'account:';
const ADDRESS_PREFIX = 'address:';
const CONTRACT_PREFIX = 'contract:';
const MAX_PASS_LEN = 32;
function toHex (address: string): string {
return u8aToHex(
@@ -38,6 +37,5 @@ export {
addressKey,
addressRegex,
contractKey,
contractRegex,
MAX_PASS_LEN
contractRegex
};
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/ui-settings",
"version": "0.56.1",
"version": "0.58.1",
"description": "Manages app settings",
"main": "index.js",
"author": "Jaco Greeff <jacogr@gmail.com>",
@@ -9,12 +9,12 @@
],
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.10.5",
"eventemitter3": "^4.0.4",
"@babel/runtime": "^7.11.2",
"eventemitter3": "^4.0.6",
"store": "^2.0.12"
},
"devDependencies": {
"@polkadot/util": "^2.18.1",
"@polkadot/util": "^3.4.1",
"@types/store": "^2.0.2"
},
"peerDependencies": {
+5 -1
View File
@@ -6,7 +6,7 @@ import EventEmitter from 'eventemitter3';
import store from 'store';
import { isUndefined } from '@polkadot/util';
import { CAMERA_DEFAULT, CAMERA, CRYPTOS, ENDPOINT_DEFAULT, ENDPOINTS, ICON_DEFAULT, ICONS, LANGUAGE_DEFAULT, LEDGER_CONN, LEDGER_CONN_DEFAULT, LOCKING_DEFAULT, LOCKING, PREFIX_DEFAULT, PREFIXES, UIMODE_DEFAULT, UIMODES, UITHEME_DEFAULT, UITHEMES } from './defaults';
import { CAMERA_DEFAULT, CAMERA, CRYPTOS, CRYPTOS_ETH, ENDPOINT_DEFAULT, ENDPOINTS, ICON_DEFAULT, ICONS, LANGUAGE_DEFAULT, LEDGER_CONN, LEDGER_CONN_DEFAULT, LOCKING_DEFAULT, LOCKING, PREFIX_DEFAULT, PREFIXES, UIMODE_DEFAULT, UIMODES, UITHEME_DEFAULT, UITHEMES } from './defaults';
import { Option, SettingsStruct } from './types';
type ChangeCallback = (settings: SettingsStruct) => void;
@@ -101,6 +101,10 @@ export class Settings implements SettingsStruct {
return CRYPTOS;
}
public get availableCryptosEth (): Option[] {
return CRYPTOS_ETH;
}
public get availableIcons (): Option[] {
return ICONS;
}
+9 -1
View File
@@ -17,7 +17,15 @@ export const CRYPTOS: Option[] = [
},
{
info: 'ecdsa',
text: 'ECDSA (BTC/ETH compatible)',
text: 'ECDSA (Non BTC/ETH compatible)',
value: 'ecdsa'
}
];
export const CRYPTOS_ETH: Option[] = [
{
info: 'ethereum',
text: 'ECDSA (ETH compatible)',
value: 'ethereum'
}
];
+2 -1
View File
@@ -4,7 +4,7 @@
import { Option } from '../types';
import { CRYPTOS } from './crypto';
import { CRYPTOS, CRYPTOS_ETH } from './crypto';
import { ENDPOINTS, ENDPOINT_DEFAULT } from './endpoints';
import { LEDGER_CONN, LEDGER_CONN_DEFAULT } from './ledger';
import { PREFIXES, PREFIX_DEFAULT } from './ss58';
@@ -46,6 +46,7 @@ export {
CAMERA_DEFAULT,
CAMERA,
CRYPTOS,
CRYPTOS_ETH,
ENDPOINT_DEFAULT,
ENDPOINTS,
ICON_DEFAULT,
@@ -38,5 +38,10 @@ export const PREFIXES: Option[] = [
info: 'kulupu',
text: 'Kulupu (live)',
value: 16
},
{
info: 'subsocial',
text: 'Subsocial (live)',
value: 28
}
];
+5 -5
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/ui-shared",
"version": "0.56.1",
"version": "0.58.1",
"description": "Shared logic that is usable accross all frameworks-specific areas",
"main": "index.js",
"author": "Jaco Greeff <jacogr@gmail.com>",
@@ -9,7 +9,7 @@
],
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.10.5",
"@babel/runtime": "^7.11.2",
"color": "^3.1.2"
},
"peerDependencies": {
@@ -17,9 +17,9 @@
"@polkadot/util-crypto": "*"
},
"devDependencies": {
"@polkadot/util": "^2.18.1",
"@polkadot/util-crypto": "^2.18.1",
"@polkadot/util": "^3.4.1",
"@polkadot/util-crypto": "^3.4.1",
"@types/color": "^3.0.1",
"@types/xmlserializer": "^0.6.0"
"@types/xmlserializer": "^0.6.1"
}
}
+5 -5
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/vue-identicon",
"version": "0.56.1",
"version": "0.58.1",
"description": "Renders an SVG picture representing an address",
"author": "Jaco Greeff <jacogr@gmail.com>",
"maintainers": [
@@ -9,8 +9,8 @@
"main": "index.js",
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.10.5",
"@polkadot/ui-shared": "0.56.1",
"@babel/runtime": "^7.11.2",
"@polkadot/ui-shared": "0.58.1",
"jdenticon": "2.2.0"
},
"peerDependencies": {
@@ -18,7 +18,7 @@
"vue": "*"
},
"devDependencies": {
"@polkadot/util-crypto": "^2.18.1",
"vue": "^2.6.11"
"@polkadot/util-crypto": "^3.4.1",
"vue": "^2.6.12"
}
}
+3410 -3207
View File
File diff suppressed because it is too large Load Diff