Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2f28f04b22 | ||
|
|
0a96372186 | ||
|
|
41edf711ec | ||
|
|
d38a8dfd96 | ||
|
|
465152698d | ||
|
|
84a18f3c0b | ||
|
|
f222cbb6c0 | ||
|
|
6ceb397c87 | ||
|
|
bd7fa3db34 | ||
|
|
f6e6c83950 | ||
|
|
2910128399 | ||
|
|
58ad6efadb | ||
|
|
5c0f70a4a2 | ||
|
|
921bb0a4a0 | ||
|
|
10450a350b | ||
|
|
60bce7c0fa | ||
|
|
aa36e56ff6 | ||
|
|
653a4a8f39 | ||
|
|
9b9fa77bc8 | ||
|
|
0427f8e2af | ||
|
|
7b45a86daa | ||
|
|
c94427d150 | ||
|
|
b9179a391e | ||
|
|
ade03fcc7e | ||
|
|
dc2c83d21c | ||
|
|
9c012e02d2 | ||
|
|
47576d50e0 | ||
|
|
782f87fc17 | ||
|
|
bc4b5090b4 | ||
|
|
24dc52741b | ||
|
|
725feb2528 | ||
|
|
196e851fa3 | ||
|
|
633ca5fd2e | ||
|
|
5f0c9889c5 | ||
|
|
1e95898bd5 | ||
|
|
f069f4997a | ||
|
|
4451c5e984 | ||
|
|
1830a32e77 | ||
|
|
b910a2e335 | ||
|
|
4ae5d9495f | ||
|
|
2aa64b62a9 | ||
|
|
c8f2f119f0 | ||
|
|
eeca1f8f50 | ||
|
|
b74034a809 | ||
|
|
b356f26e08 | ||
|
|
c9c3011441 | ||
|
|
d2fcebd84a | ||
|
|
9c47628233 | ||
|
|
28956664cc | ||
|
|
994f303064 | ||
|
|
52a09f4364 | ||
|
|
6abb0f79b6 | ||
|
|
2afd941483 | ||
|
|
fd43c16853 | ||
|
|
c27f971878 | ||
|
|
e48115c557 | ||
|
|
3f0c2d82e8 | ||
|
|
544fbb5e6d | ||
|
|
dfde4d7989 | ||
|
|
d80f0ce906 | ||
|
|
6a6a247b1f | ||
|
|
b7c5a9a509 | ||
|
|
8694cb45e3 | ||
|
|
c075950e93 | ||
|
|
3e555546cd | ||
|
|
63440d051f | ||
|
|
0cd16ee2d7 | ||
|
|
3803286251 | ||
|
|
2d801b535e | ||
|
|
f2189f3780 | ||
|
|
be251919d6 | ||
|
|
bdec479885 | ||
|
|
ed56f21bcb | ||
|
|
76e1248c5f | ||
|
|
b6f12ba822 | ||
|
|
0892532f5c | ||
|
|
99ea536891 | ||
|
|
ad59098b70 | ||
|
|
8f4e839d21 | ||
|
|
994e0f1ee4 | ||
|
|
d0016d6672 | ||
|
|
3c3cd43bf6 | ||
|
|
4cb7e0e239 | ||
|
|
5f00d9f310 | ||
|
|
9393bb9b3f | ||
|
|
120fe69329 | ||
|
|
fd9fdf37d9 | ||
|
|
b857ce4614 | ||
|
|
78450918dc | ||
|
|
3b0b86c4b7 | ||
|
|
335296bc56 | ||
|
|
beca59750a | ||
|
|
a5dc09f7e7 | ||
|
|
2e892c00cd | ||
|
|
d168127e23 | ||
|
|
6ae99fa573 | ||
|
|
d7a30db878 | ||
|
|
8acd7d49a8 | ||
|
|
c65e7a28c7 | ||
|
|
106784d5b4 | ||
|
|
bcbfa193f5 | ||
|
|
0fb6b0a21a | ||
|
|
26e0ecbbd1 | ||
|
|
4c097c5001 | ||
|
|
851c452782 | ||
|
|
f345a70b9f | ||
|
|
8866703ad2 | ||
|
|
0adac5f9fa | ||
|
|
b19e20c82a | ||
|
|
eef76f5734 | ||
|
|
6e3243cde7 | ||
|
|
48292b06d8 | ||
|
|
da1203125e | ||
|
|
e0fcfd2d1d | ||
|
|
b02a3ba421 | ||
|
|
f41c1516ed | ||
|
|
f7d9737950 | ||
|
|
6ab36a36c5 | ||
|
|
640065171b | ||
|
|
b9ac67f6a8 | ||
|
|
def168928c | ||
|
|
db67cf32b1 | ||
|
|
e134e707c9 | ||
|
|
f174bb188e | ||
|
|
c487a0acf4 | ||
|
|
d152a182f3 | ||
|
|
660f65dab6 | ||
|
|
841d44180f | ||
|
|
7c64e75648 | ||
|
|
b6ac318e95 | ||
|
|
b99c316fe0 | ||
|
|
b069b69bcf | ||
|
|
805c2088aa | ||
|
|
baf6c58280 | ||
|
|
dd21ee2eb4 | ||
|
|
d3e5ba557d | ||
|
|
8d10679cac | ||
|
|
8eab5c731e | ||
|
|
93107eb800 | ||
|
|
7c17d9a304 | ||
|
|
3cb7b9ec17 | ||
|
|
9fed78b350 | ||
|
|
c01135f515 | ||
|
|
6bf0c428d5 | ||
|
|
0dbcd23747 | ||
|
|
fdc1834491 | ||
|
|
b684af3f50 | ||
|
|
24b76e63f8 | ||
|
|
d7fd57c431 | ||
|
|
7da91dba9b | ||
|
|
b8e78ccb99 | ||
|
|
8b7494699a | ||
|
|
3b221f7a5a | ||
|
|
ab5ae15257 | ||
|
|
9f2921791d | ||
|
|
200f12803a | ||
|
|
a8e6f90fbf | ||
|
|
8f6ad2fc5e | ||
|
|
4c24f08e73 | ||
|
|
c1c185fc25 | ||
|
|
325217736e | ||
|
|
71b16b5036 | ||
|
|
abc50b3e30 | ||
|
|
44690ffe3b |
+14
-2
@@ -1,6 +1,18 @@
|
||||
1
|
||||
2
|
||||
0.57.20.57.3
|
||||
0.66.2
|
||||
0.66.3
|
||||
0.71.2
|
||||
0.71.3
|
||||
0.71.3
|
||||
|
||||
0.84.2
|
||||
0.84.3
|
||||
0.85.2
|
||||
0.85.3
|
||||
0.85.4
|
||||
0.85.5
|
||||
0.86.2
|
||||
0.86.3
|
||||
0.86.4
|
||||
0.86.5
|
||||
0.86.6
|
||||
@@ -0,0 +1,23 @@
|
||||
name: 'Lock Threads'
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '30 1/2 * * *'
|
||||
|
||||
jobs:
|
||||
lock:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: dessant/lock-threads@v2
|
||||
with:
|
||||
github-token: ${{ secrets.GH_PAT_BOT }}
|
||||
issue-lock-inactive-days: '7'
|
||||
issue-lock-comment: >
|
||||
This thread has been automatically locked since there has not been
|
||||
any recent activity after it was closed. Please open a new issue
|
||||
if you think you have a related problem or query.
|
||||
pr-lock-inactive-days: '2'
|
||||
pr-lock-comment: >
|
||||
This pull request has been automatically locked since there
|
||||
has not been any recent activity after it was closed.
|
||||
Please open a new issue for related bugs.
|
||||
@@ -6,11 +6,11 @@ on:
|
||||
|
||||
jobs:
|
||||
master:
|
||||
if: "! startsWith(github.event.head_commit.message, '[CI Skip]')"
|
||||
strategy:
|
||||
matrix:
|
||||
step: ['build:release']
|
||||
name: ${{ matrix.step }}
|
||||
if: "! startsWith(github.event.head_commit.message, '[CI Skip]') && github.repository == 'polkadot-js/ui'"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
@@ -25,10 +25,3 @@ jobs:
|
||||
run: |
|
||||
yarn install --immutable | grep -v 'YN0013'
|
||||
yarn ${{ matrix.step }}
|
||||
|
||||
dummy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: dummy
|
||||
run: |
|
||||
echo "Dummy skip step"
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
name: Semgrep
|
||||
on:
|
||||
pull_request: {}
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
check:
|
||||
if: "! startsWith(github.event.head_commit.message, '[CI Skip]') && (!github.event.pull_request || github.event.pull_request.head.repo.full_name == github.repository)"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: returntocorp/semgrep-action@v1
|
||||
with:
|
||||
auditOn: push
|
||||
publishToken: ${{ secrets.SEMGREP_APP_TOKEN }}
|
||||
publishDeployment: 1395
|
||||
@@ -0,0 +1,17 @@
|
||||
name: 'Close stale issues and PRs'
|
||||
on:
|
||||
schedule:
|
||||
- cron: '30 2/2 * * *'
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/stale@v3
|
||||
with:
|
||||
repo-token: ${{ secrets.GH_PAT_BOT }}
|
||||
stale-issue-message: 'This issue has been open for 21 days with no activity and is not labelled as an enhancement. It will be closed in 7 days.'
|
||||
stale-issue-label: 'stale'
|
||||
exempt-issue-labels: '-size-l,-size-m,-size-s,-size-xl,-size-xs,[bug]'
|
||||
days-before-stale: 21
|
||||
days-before-close: 7
|
||||
@@ -0,0 +1,3 @@
|
||||
build
|
||||
coverage
|
||||
packages
|
||||
@@ -0,0 +1,4 @@
|
||||
// Copyright 2017-2021 @polkadot/ui authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
module.exports = require('@polkadot/dev/config/prettier.cjs');
|
||||
+7
-9
File diff suppressed because one or more lines are too long
+7
-9
File diff suppressed because one or more lines are too long
Vendored
-55
File diff suppressed because one or more lines are too long
+631
File diff suppressed because one or more lines are too long
+1
-1
@@ -10,4 +10,4 @@ plugins:
|
||||
- path: .yarn/plugins/@yarnpkg/plugin-version.cjs
|
||||
spec: "@yarnpkg/plugin-version"
|
||||
|
||||
yarnPath: .yarn/releases/yarn-2.4.1.cjs
|
||||
yarnPath: .yarn/releases/yarn-3.0.1.cjs
|
||||
|
||||
+168
@@ -1,5 +1,173 @@
|
||||
# CHANGELOG
|
||||
|
||||
## 0.86.6 Nov 6, 2021
|
||||
|
||||
Changes:
|
||||
|
||||
- Updated to `@polkadot/{hw-ledger, keyring, util, util-crypto}` 7.9.1
|
||||
|
||||
|
||||
## 0.86.5 Nov 6, 2021
|
||||
|
||||
Changes:
|
||||
|
||||
- Updated to `@polkadot/{hw-ledger, keyring, util, util-crypto}` 7.8.2
|
||||
|
||||
|
||||
## 0.86.4 Nov 6, 2021
|
||||
|
||||
Changes:
|
||||
|
||||
- Updated to `@polkadot/{hw-ledger, keyring, util, util-crypto}` 7.8.1
|
||||
|
||||
|
||||
## 0.86.3 Nov 1, 2021
|
||||
|
||||
Changes:
|
||||
|
||||
- Add publish skip to all examples
|
||||
- Updated to `@polkadot/{hw-ledger, keyring, util, util-crypto}` 7.7.1
|
||||
|
||||
|
||||
## 0.86.2 Oct 24, 2021
|
||||
|
||||
Changes:
|
||||
|
||||
- Updated to `@polkadot/{hw-ledger, keyring, util, util-crypto}` 7.6.1
|
||||
|
||||
|
||||
## 0.86.1 Oct 16, 2021
|
||||
|
||||
Contributed:
|
||||
|
||||
- Check for existence of `process` before using (Thanks to https://github.com/wirednkod)
|
||||
|
||||
Changes:
|
||||
|
||||
- Updated to `@polkadot/{hw-ledger, keyring, util, util-crypto}` 7.5.1
|
||||
|
||||
|
||||
## 0.85.5 Oct 10, 2021
|
||||
|
||||
Changes:
|
||||
|
||||
- Update rxjs to 7.4 (aligning with use in API)
|
||||
|
||||
|
||||
## 0.85.4 Sep 17, 2021
|
||||
|
||||
Changes:
|
||||
|
||||
- Updated to `@polkadot/{hw-ledger, keyring, util, util-crypto}` 7.4.1
|
||||
|
||||
|
||||
## 0.85.3 Aug 29, 2021
|
||||
|
||||
Changes:
|
||||
|
||||
- Revert color bump to 4.0.1, keep at 3.2.1 (numeric separators on Vue & react-native)
|
||||
|
||||
|
||||
## 0.85.2 Aug 28, 2021
|
||||
|
||||
Changes:
|
||||
|
||||
- Updated to `@polkadot/{hw-ledger, keyring, util, util-crypto}` 7.3.1
|
||||
|
||||
|
||||
## 0.85.1 Aug 15, 2021
|
||||
|
||||
Contributed:
|
||||
|
||||
- Always use `bigint` type to indicate instance (Thanks to https://github.com/ntduan)
|
||||
|
||||
Changes:
|
||||
|
||||
- Updated to `@polkadot/{hw-ledger, keyring, util, util-crypto}` 7.2.1
|
||||
|
||||
|
||||
## 0.84.3 Aug 2, 2021
|
||||
|
||||
Changes:
|
||||
|
||||
- Updated to `@polkadot/{hw-ledger, keyring, util, util-crypto}` 7.1.1
|
||||
|
||||
|
||||
## 0.84.2 Jul 26, 2021
|
||||
|
||||
Changes:
|
||||
|
||||
- Updated to `@polkadot/{hw-ledger, keyring, util, util-crypto}` 7.0.3
|
||||
|
||||
|
||||
## 0.84.1 Jul 11, 2021
|
||||
|
||||
Changes:
|
||||
|
||||
- Internal RxJs usage has been bumped to the 7.2 version
|
||||
- Allow building as a completely stand-alone browser bundle (experimental)
|
||||
- Updated to `@polkadot/{hw-ledger, keyring, util, util-crypto}` 7.0.1
|
||||
|
||||
|
||||
## 0.83.1 Jul 5, 2021
|
||||
|
||||
Contributed:
|
||||
|
||||
- Add support for notifications setting (Thanks to https://github.com/shawntabrizi)
|
||||
|
||||
Changes:
|
||||
|
||||
- Updated to `@polkadot/{hw-ledger, keyring, util, util-crypto}` 6.11.1
|
||||
|
||||
|
||||
## 0.82.1 Jun 26, 2021
|
||||
|
||||
Contributed:
|
||||
|
||||
- Adjust Qr address imports (Thanks to https://github.com/joelamouche)
|
||||
- Bubble errors on Qr scanning (Thanks to https://github.com/joelamouche)
|
||||
|
||||
Changes:
|
||||
|
||||
- Fix `keyring.setSS58Format` to correctly set for prefix 0
|
||||
- Updated to `@polkadot/{hw-ledger, keyring, util, util-crypto}` 6.10.1
|
||||
|
||||
|
||||
## 0.81.1 Jun 20, 2021
|
||||
|
||||
Contributed:
|
||||
|
||||
- Import `ethereum` addresses via QR (Thanks to https://github.com/joelamouche)
|
||||
- Support settings for non-RPC connectors (Thanks to https://github.com/wirednkod)
|
||||
|
||||
Changes:
|
||||
|
||||
- Updated to `@polkadot/{hw-ledger, keyring, util, util-crypto}` 6.9.1
|
||||
- Fix webpack demo import locations
|
||||
|
||||
|
||||
## 0.80.1 Jun 14, 2021
|
||||
|
||||
Changes:
|
||||
|
||||
- Updated to `@polkadot/{hw-ledger, keyring, util, util-crypto}` 6.8.1
|
||||
|
||||
|
||||
## 0.79.1 Jun 6, 2021
|
||||
|
||||
Changes:
|
||||
|
||||
- Add support for WebHID selection (as exposed by ledger packages)
|
||||
- Updated to `@polkadot/{hw-ledger, keyring, util, util-crypto}` 6.7.1
|
||||
|
||||
|
||||
## 0.78.1 May 29, 2021
|
||||
|
||||
Changes:
|
||||
|
||||
- Updated to `@polkadot/{hw-ledger, keyring, util, util-crypto}` 6.6.1
|
||||
|
||||
|
||||
## 0.77.1 May 25, 2021
|
||||
|
||||
Changes:
|
||||
|
||||
+1
-1
@@ -12,5 +12,5 @@ module.exports = {
|
||||
'\\.(css|less)$': 'empty/object',
|
||||
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': 'empty/object'
|
||||
},
|
||||
transformIgnorePatterns: ['/node_modules/(?!@polkadot|@babel/runtime/helpers/esm/)']
|
||||
testEnvironment: 'jsdom'
|
||||
};
|
||||
|
||||
+25
-17
@@ -1,47 +1,55 @@
|
||||
{
|
||||
"repository": "https://github.com/polkadot-js/ui",
|
||||
"author": "Jaco Greeff <jacogr@gmail.com>",
|
||||
"bugs": "https://github.com/polkadot-js/ui/issues",
|
||||
"homepage": "https://github.com/polkadot-js/ui#readme",
|
||||
"license": "Apache-2",
|
||||
"packageManager": "yarn@3.0.1",
|
||||
"private": true,
|
||||
"homepage": ".",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/polkadot-js/ui.git"
|
||||
},
|
||||
"sideEffects": false,
|
||||
"version": "0.86.6",
|
||||
"workspaces": [
|
||||
"packages/*"
|
||||
],
|
||||
"resolutions": {
|
||||
"typescript": "^4.2.4"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "polkadot-dev-build-ts",
|
||||
"build:release": "polkadot-ci-ghact-build",
|
||||
"lint": "polkadot-dev-run-lint",
|
||||
"build:rollup": "polkadot-exec-rollup --config",
|
||||
"clean": "polkadot-dev-clean-build",
|
||||
"demo:identicon:react": "yarn build && webpack-serve --config packages/react-identicon/webpack.config.js --content packages/react-identicon --port 8080",
|
||||
"demo:identicon:vue": "yarn build && webpack-serve --config packages/vue-identicon/webpack.config.js --content packages/vue-identicon --port 8080",
|
||||
"example:rn:packager": "yarn build && cd packages/exampleReactNative && yarn copy-workspace-packages && yarn start",
|
||||
"example:rn:ios": "cd packages/exampleReactNative && cd ios && pod install && cd .. && yarn ios",
|
||||
"example:rn:android": "cd packages/exampleReactNative && yarn android",
|
||||
"example:react": "yarn build && cd packages/example-react && webpack --config webpack.config.js",
|
||||
"example:rn:android": "cd packages/exampleReactNative && yarn android",
|
||||
"example:rn:ios": "cd packages/exampleReactNative && cd ios && pod install && cd .. && yarn ios",
|
||||
"example:rn:packager": "yarn build && cd packages/exampleReactNative && yarn copy-workspace-packages && yarn start",
|
||||
"example:vue": "yarn build && cd packages/example-vue && webpack --config webpack.config.js",
|
||||
"lint": "polkadot-dev-run-lint",
|
||||
"postinstall": "polkadot-dev-yarn-only",
|
||||
"test": "polkadot-dev-run-test --coverage --runInBand",
|
||||
"test:one": "polkadot-dev-run-test"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.14.3",
|
||||
"@babel/runtime": "^7.14.0",
|
||||
"@polkadot/dev": "^0.62.16",
|
||||
"@polkadot/ts": "^0.3.66",
|
||||
"@types/jest": "^26.0.23",
|
||||
"@babel/core": "^7.16.0",
|
||||
"@babel/runtime": "^7.16.3",
|
||||
"@polkadot/dev": "^0.63.29",
|
||||
"@polkadot/ts": "^0.4.14",
|
||||
"@polkadot/x-bundle": "^7.9.1",
|
||||
"@types/jest": "^27.0.3",
|
||||
"babel-plugin-transform-vue-template": "^0.4.2",
|
||||
"empty": "^0.10.1",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2",
|
||||
"react-is": "^17.0.2",
|
||||
"react-native": "^0.64.1",
|
||||
"vue-template-compiler": "^2.6.12",
|
||||
"react-native": "^0.66.3",
|
||||
"vue-template-compiler": "^2.6.14",
|
||||
"webpack": "^4.46.0",
|
||||
"webpack-cli": "^3.3.12",
|
||||
"webpack-serve": "^3.2.0"
|
||||
},
|
||||
"version": "0.77.1"
|
||||
"resolutions": {
|
||||
"typescript": "^4.5.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,22 @@
|
||||
{
|
||||
"name": "@polkadot/example-react",
|
||||
"version": "0.77.1",
|
||||
"description": "A very basic example with ui-* & react-* packages",
|
||||
"main": "index.js",
|
||||
"author": "Jaco Greeff <jacogr@gmail.com>",
|
||||
"maintainers": [],
|
||||
"bugs": "https://github.com/polkadot-js/ui/issues",
|
||||
"contributors": [],
|
||||
"description": "A very basic example with ui-* & react-* packages",
|
||||
"homepage": "https://github.com/polkadot-js/ui/tree/master/packages/example-react#readme",
|
||||
"license": "Apache-2.0",
|
||||
"maintainers": [],
|
||||
"name": "@polkadot/example-react",
|
||||
"private": true,
|
||||
"repository": {
|
||||
"directory": "packages/example-react",
|
||||
"type": "git",
|
||||
"url": "https://github.com/polkadot-js/ui.git"
|
||||
},
|
||||
"sideEffects": false,
|
||||
"version": "0.86.6",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.14.0"
|
||||
"@babel/runtime": "^7.16.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Auto-generated by @polkadot/dev, do not edit
|
||||
|
||||
export const packageInfo = { name: '@polkadot/example-react', version: '0.77.1' };
|
||||
export const packageInfo = { name: '@polkadot/example-react', version: '0.86.6' };
|
||||
|
||||
@@ -17,7 +17,7 @@ module.exports = {
|
||||
use: [
|
||||
{
|
||||
loader: 'babel-loader',
|
||||
options: require('../../babel.config.js')
|
||||
options: require('../../babel.config.cjs')
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,12 +1,22 @@
|
||||
{
|
||||
"name": "@polkadot/example-vue",
|
||||
"version": "0.77.1",
|
||||
"description": "A very basic example with ui-* & vue-* packages",
|
||||
"main": "index.js",
|
||||
"author": "Jaco Greeff <jacogr@gmail.com>",
|
||||
"maintainers": [],
|
||||
"bugs": "https://github.com/polkadot-js/ui/issues",
|
||||
"contributors": [],
|
||||
"description": "A very basic example with ui-* & vue-* packages",
|
||||
"homepage": "https://github.com/polkadot-js/ui/tree/master/packages/example-vue#readme",
|
||||
"license": "Apache-2.0",
|
||||
"maintainers": [],
|
||||
"name": "@polkadot/example-vue",
|
||||
"private": true,
|
||||
"repository": {
|
||||
"directory": "packages/example-vue",
|
||||
"type": "git",
|
||||
"url": "https://github.com/polkadot-js/ui.git"
|
||||
},
|
||||
"sideEffects": false,
|
||||
"version": "0.86.6",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.14.0"
|
||||
"@babel/runtime": "^7.16.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Auto-generated by @polkadot/dev, do not edit
|
||||
|
||||
export const packageInfo = { name: '@polkadot/example-vue', version: '0.77.1' };
|
||||
export const packageInfo = { name: '@polkadot/example-vue', version: '0.86.6' };
|
||||
|
||||
@@ -18,7 +18,7 @@ module.exports = {
|
||||
use: [
|
||||
{
|
||||
loader: 'babel-loader',
|
||||
options: require('../../babel.config.js')
|
||||
options: require('../../babel.config.cjs')
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Copyright 2017-2021 @polkadot/example-react authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import React, { useCallback, useEffect, useState } from 'react';
|
||||
import { Button, SafeAreaView, ScrollView, StatusBar, StyleSheet, Text, View } from 'react-native';
|
||||
import { Colors } from 'react-native/Libraries/NewAppScreen';
|
||||
|
||||
@@ -57,17 +57,22 @@ export default function App (): React.ReactElement | null {
|
||||
const [phrase, setPhrase] = useState<string | null>(null);
|
||||
const [ss58Format, setSS58Format] = useState(42);
|
||||
|
||||
const _onClickNew = (): void => {
|
||||
const phrase = mnemonicGenerate(12);
|
||||
const { address } = keyring.createFromUri(phrase);
|
||||
const _onClickNew = useCallback(
|
||||
(): void => {
|
||||
const phrase = mnemonicGenerate(12);
|
||||
const { address } = keyring.createFromUri(phrase);
|
||||
|
||||
setAddress(keyring.encodeAddress(address, ss58Format));
|
||||
setPhrase(phrase);
|
||||
};
|
||||
setAddress(keyring.encodeAddress(address, ss58Format));
|
||||
setPhrase(phrase);
|
||||
},
|
||||
[ss58Format]
|
||||
);
|
||||
|
||||
const _onChangeSS58Format = (value: string): void => {
|
||||
setSS58Format(parseInt(value, 10));
|
||||
};
|
||||
const _onChangeSS58Format = useCallback(
|
||||
(value: string) =>
|
||||
() => setSS58Format(parseInt(value, 10)),
|
||||
[]
|
||||
);
|
||||
|
||||
useEffect((): void => {
|
||||
isReady && _onClickNew();
|
||||
@@ -108,7 +113,8 @@ export default function App (): React.ReactElement | null {
|
||||
<SafeAreaView>
|
||||
<ScrollView
|
||||
contentInsetAdjustmentBehavior='automatic'
|
||||
style={styles.scrollView}>
|
||||
style={styles.scrollView}
|
||||
>
|
||||
<View style={styles.body}>
|
||||
<View style={styles.sectionContainer}>
|
||||
<Text style={styles.mainTitle}>React-Native Example</Text>
|
||||
@@ -144,7 +150,7 @@ export default function App (): React.ReactElement | null {
|
||||
.map(({ text, value }): React.ReactNode => (
|
||||
<Button
|
||||
key={value}
|
||||
onPress={(): void => _onChangeSS58Format(value.toString())}
|
||||
onPress={_onChangeSS58Format(value.toString())}
|
||||
title={text}
|
||||
/>
|
||||
))
|
||||
|
||||
@@ -21,27 +21,27 @@ class Storage {
|
||||
this.loading = false;
|
||||
|
||||
return [...data];
|
||||
}
|
||||
};
|
||||
|
||||
getItem = (key) => {
|
||||
return this.dataMap.get(key);
|
||||
}
|
||||
};
|
||||
|
||||
setItem = (key, value) => {
|
||||
this.dataMap.set(key, value);
|
||||
|
||||
return AsyncStorage.setItem(key, value);
|
||||
}
|
||||
};
|
||||
|
||||
remove = (key) => {
|
||||
this.dataMap.delete(key);
|
||||
|
||||
return AsyncStorage.removeItem(key);
|
||||
}
|
||||
};
|
||||
|
||||
saveItem = (item) => {
|
||||
this.dataMap.set(item[0], item[1]);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// Set global process variable expected by some classes.
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"name": "exampleReactNative",
|
||||
"version": "0.77.1",
|
||||
"version": "0.86.6",
|
||||
"license": "Apache-2.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"copy-workspace-packages": "yarn copy-identicon && yarn copy-ui-shared",
|
||||
@@ -11,31 +12,39 @@
|
||||
"start": "NODE_OPTIONS=--max_old_space_size=8192 react-native start",
|
||||
"test": "jest"
|
||||
},
|
||||
"bugs": "https://github.com/polkadot-js/ui/issues",
|
||||
"homepage": "https://github.com/polkadot-js/ui#readme",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/polkadot-js/ui.git",
|
||||
"directory": "packages/exampleReactNative"
|
||||
},
|
||||
"sideEffects": false,
|
||||
"dependencies": {
|
||||
"@polkadot/keyring": "^6.5.1",
|
||||
"@polkadot/reactnative-identicon": "0.77.1",
|
||||
"@polkadot/ui-keyring": "0.77.1",
|
||||
"@polkadot/ui-settings": "0.77.1",
|
||||
"@polkadot/util": "^6.5.1",
|
||||
"@polkadot/util-crypto": "^6.5.1",
|
||||
"@polkadot/keyring": "^7.9.1",
|
||||
"@polkadot/reactnative-identicon": "0.86.6",
|
||||
"@polkadot/ui-keyring": "0.86.6",
|
||||
"@polkadot/ui-settings": "0.86.6",
|
||||
"@polkadot/util": "^7.9.1",
|
||||
"@polkadot/util-crypto": "^7.9.1",
|
||||
"@react-native-community/async-storage": "^1.12.1",
|
||||
"fast-text-encoding": "^1.0.3",
|
||||
"get-yarn-workspaces": "^1.0.2",
|
||||
"os-browserify": "^0.3.0",
|
||||
"process": "^0.11.10",
|
||||
"react": "^17.0.2",
|
||||
"react-native": "^0.64.1",
|
||||
"react-native": "^0.66.3",
|
||||
"react-native-crypto": "^2.2.0",
|
||||
"react-native-randombytes": "^3.6.1",
|
||||
"stream-http": "^3.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.14.3",
|
||||
"@babel/runtime": "^7.14.0",
|
||||
"@react-native-community/cli-platform-ios": "^5.0.1-alpha.2",
|
||||
"@babel/core": "^7.16.0",
|
||||
"@babel/runtime": "^7.16.3",
|
||||
"@react-native-community/cli-platform-ios": "^6.2.0",
|
||||
"@types/react-test-renderer": "17.0.1",
|
||||
"babel-jest": "^26.6.3",
|
||||
"metro-react-native-babel-preset": "^0.66.0",
|
||||
"babel-jest": "^27.3.1",
|
||||
"metro-react-native-babel-preset": "^0.66.2",
|
||||
"react-test-renderer": "17.0.2"
|
||||
},
|
||||
"jest": {
|
||||
|
||||
@@ -1,28 +1,43 @@
|
||||
{
|
||||
"name": "@polkadot/react-identicon",
|
||||
"version": "0.77.1",
|
||||
"type": "module",
|
||||
"author": "Jaco Greeff <jacogr@gmail.com>",
|
||||
"bugs": "https://github.com/polkadot-js/ui/issues",
|
||||
"contributors": [],
|
||||
"description": "Renders an SVG picture representing an address",
|
||||
"main": "index.js",
|
||||
"homepage": "https://github.com/polkadot-js/ui/tree/master/packages/react-identicon#readme",
|
||||
"license": "Apache-2.0",
|
||||
"maintainers": [],
|
||||
"name": "@polkadot/react-identicon",
|
||||
"repository": {
|
||||
"directory": "packages/react-identicon",
|
||||
"type": "git",
|
||||
"url": "https://github.com/polkadot-js/ui.git"
|
||||
},
|
||||
"sideEffects": [
|
||||
"./detectPackage.js",
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"author": "Jaco Greeff <jacogr@gmail.com>",
|
||||
"maintainers": [],
|
||||
"license": "Apache-2.0",
|
||||
"type": "module",
|
||||
"version": "0.86.6",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.14.0",
|
||||
"@polkadot/keyring": "^6.5.1",
|
||||
"@polkadot/ui-settings": "0.77.1",
|
||||
"@polkadot/ui-shared": "0.77.1",
|
||||
"@polkadot/util": "^6.5.1",
|
||||
"@polkadot/util-crypto": "^6.5.1",
|
||||
"color": "^3.1.3",
|
||||
"@babel/runtime": "^7.16.3",
|
||||
"@polkadot/keyring": "^7.9.1",
|
||||
"@polkadot/ui-settings": "0.86.6",
|
||||
"@polkadot/ui-shared": "0.86.6",
|
||||
"@polkadot/util": "^7.9.1",
|
||||
"@polkadot/util-crypto": "^7.9.1",
|
||||
"color": "^3.2.1",
|
||||
"ethereum-blockies-base64": "^1.0.2",
|
||||
"jdenticon": "3.1.0",
|
||||
"react-copy-to-clipboard": "^5.0.3",
|
||||
"styled-components": "^5.3.0"
|
||||
"jdenticon": "3.1.1",
|
||||
"react-copy-to-clipboard": "^5.0.4",
|
||||
"styled-components": "^5.3.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react-copy-to-clipboard": "^5.0.2",
|
||||
"@types/react-dom": "^17.0.11",
|
||||
"@types/styled-components": "^5.1.15",
|
||||
"styled-components": "^5.3.3",
|
||||
"xmlserializer": "^0.6.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@polkadot/keyring": "*",
|
||||
@@ -32,12 +47,5 @@
|
||||
"react-dom": "*",
|
||||
"react-is": "*",
|
||||
"styled-components": "*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react-copy-to-clipboard": "^5.0.0",
|
||||
"@types/react-dom": "^17.0.5",
|
||||
"@types/styled-components": "^5.1.9",
|
||||
"styled-components": "^5.3.0",
|
||||
"xmlserializer": "^0.6.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import { Identicon } from '.';
|
||||
const THEMES = ['beachball', 'polkadot', 'substrate'];
|
||||
|
||||
export default class Demo extends React.PureComponent {
|
||||
public render (): React.ReactNode {
|
||||
public override render (): React.ReactNode {
|
||||
const identities: string[] = [];
|
||||
|
||||
while (identities.length !== 50) {
|
||||
|
||||
@@ -58,7 +58,7 @@ const Wrapper = styled.div`
|
||||
`;
|
||||
|
||||
class BaseIcon extends React.PureComponent<Props, State> {
|
||||
public state: State = {
|
||||
public override state: State = {
|
||||
address: '',
|
||||
publicKey: '0x'
|
||||
};
|
||||
@@ -98,7 +98,7 @@ class BaseIcon extends React.PureComponent<Props, State> {
|
||||
}
|
||||
}
|
||||
|
||||
public render (): React.ReactNode {
|
||||
public override render (): React.ReactNode {
|
||||
const { address } = this.state;
|
||||
const wrapped = this.getWrapped(this.state, this.props);
|
||||
|
||||
@@ -144,7 +144,7 @@ class BaseIcon extends React.PureComponent<Props, State> {
|
||||
if (address && onCopy) {
|
||||
onCopy(address);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function Icon (props: Props): React.ReactElement<Props> {
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
// Copyright 2017-2021 @polkadot/react-identicon authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
export * from './icons';
|
||||
|
||||
export { Identicon } from './Identicon';
|
||||
export { packageInfo } from './packageInfo';
|
||||
@@ -3,11 +3,8 @@
|
||||
|
||||
import './detectPackage';
|
||||
|
||||
import { Identicon } from './Identicon';
|
||||
import { Identicon } from './bundle';
|
||||
|
||||
export * from './icons';
|
||||
export { packageInfo } from './packageInfo';
|
||||
|
||||
export { Identicon };
|
||||
export * from './bundle';
|
||||
|
||||
export default Identicon;
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Auto-generated by @polkadot/dev, do not edit
|
||||
|
||||
export const packageInfo = { name: '@polkadot/react-identicon', version: '0.77.1' };
|
||||
export const packageInfo = { name: '@polkadot/react-identicon', version: '0.86.6' };
|
||||
|
||||
@@ -1,24 +1,32 @@
|
||||
{
|
||||
"name": "@polkadot/react-qr",
|
||||
"version": "0.77.1",
|
||||
"type": "module",
|
||||
"description": "Generates and reads QR codes",
|
||||
"main": "index.js",
|
||||
"sideEffects": false,
|
||||
"author": "Jaco Greeff <jacogr@gmail.com>",
|
||||
"maintainers": [],
|
||||
"bugs": "https://github.com/polkadot-js/ui/issues",
|
||||
"contributors": [],
|
||||
"description": "Generates and reads QR codes",
|
||||
"homepage": "https://github.com/polkadot-js/ui/tree/master/packages/react-qr#readme",
|
||||
"license": "Apache-2.0",
|
||||
"maintainers": [],
|
||||
"name": "@polkadot/react-qr",
|
||||
"repository": {
|
||||
"directory": "packages/react-qr",
|
||||
"type": "git",
|
||||
"url": "https://github.com/polkadot-js/ui.git"
|
||||
},
|
||||
"sideEffects": false,
|
||||
"type": "module",
|
||||
"version": "0.86.6",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.14.0",
|
||||
"@polkadot/util": "^6.5.1",
|
||||
"@polkadot/util-crypto": "^6.5.1",
|
||||
"@babel/runtime": "^7.16.3",
|
||||
"@polkadot/util": "^7.9.1",
|
||||
"@polkadot/util-crypto": "^7.9.1",
|
||||
"qrcode-generator": "^1.4.4",
|
||||
"react-qr-reader": "^2.2.1",
|
||||
"styled-components": "^5.3.0"
|
||||
"styled-components": "^5.3.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react-qr-reader": "^2.1.3",
|
||||
"@types/styled-components": "^5.1.9"
|
||||
"@types/react-qr-reader": "^2.1.4",
|
||||
"@types/styled-components": "^5.1.15"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@polkadot/util": "*",
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
||||
import styled from 'styled-components';
|
||||
|
||||
import { objectSpread } from '@polkadot/util';
|
||||
import { xxhashAsHex } from '@polkadot/util-crypto';
|
||||
|
||||
import { qrcode } from './qrcode';
|
||||
@@ -37,8 +38,7 @@ function getDataUrl (value: Uint8Array): string {
|
||||
|
||||
// HACK See our qrcode stringToBytes override as used internally. This
|
||||
// will only work for the case where we actually pass `Bytes` in here
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
qr.addData(value as any, 'Byte');
|
||||
qr.addData(value as unknown as string, 'Byte');
|
||||
qr.make();
|
||||
|
||||
return qr.createDataURL(16, 0);
|
||||
@@ -74,11 +74,10 @@ function Display ({ className, size, skipEncoding, style, value }: Props): React
|
||||
// only encode the frames on demand, not above as part of the
|
||||
// state derivation - in the case of large payloads, this should
|
||||
// be slightly more responsive on initial load
|
||||
return {
|
||||
...state,
|
||||
return objectSpread({}, state, {
|
||||
frameIdx,
|
||||
image: getDataUrl(state.frames[frameIdx])
|
||||
};
|
||||
});
|
||||
});
|
||||
|
||||
timerRef.current.timerId = window.setTimeout(nextFrame, FRAME_DELAY);
|
||||
|
||||
@@ -22,31 +22,44 @@ interface Props {
|
||||
onScan: (scanned: ScanType) => void;
|
||||
size?: string | number;
|
||||
style?: React.CSSProperties;
|
||||
isEthereum?: boolean
|
||||
}
|
||||
|
||||
function ScanAddress ({ className, onError, onScan, size, style }: Props): React.ReactElement<Props> {
|
||||
function ScanAddress ({ className, isEthereum, onError, onScan, size, style }: Props): React.ReactElement<Props> {
|
||||
const _onScan = useCallback(
|
||||
(data: string | null): void => {
|
||||
if (data) {
|
||||
try {
|
||||
const [prefix, content, genesisHash, ...name] = data.split(':');
|
||||
const isValidPrefix = prefix === ADDRESS_PREFIX || prefix === SEED_PREFIX;
|
||||
let prefix: string, content: string, genesisHash: string, name: string[];
|
||||
|
||||
assert(isValidPrefix, `Invalid prefix received, expected '${ADDRESS_PREFIX}/${SEED_PREFIX}' , found '${prefix}'`);
|
||||
if (!isEthereum) {
|
||||
[prefix, content, genesisHash, ...name] = data.split(':');
|
||||
} else {
|
||||
[prefix, content, ...name] = data.split(':');
|
||||
genesisHash = '';
|
||||
content = content.substring(0, 42);
|
||||
}
|
||||
|
||||
const isAddress = prefix === ADDRESS_PREFIX;
|
||||
const expectedPrefix = (isEthereum ? 'ethereum' : ADDRESS_PREFIX);
|
||||
const isValidPrefix = (prefix === expectedPrefix) || (prefix === SEED_PREFIX);
|
||||
|
||||
if (isAddress) {
|
||||
assert(isValidPrefix, `Invalid prefix received, expected '${expectedPrefix} or ${SEED_PREFIX}' , found '${prefix}'`);
|
||||
|
||||
const isAddress = prefix === expectedPrefix;
|
||||
|
||||
if (isAddress && !isEthereum) {
|
||||
decodeAddress(content);
|
||||
}
|
||||
|
||||
onScan({ content, genesisHash, isAddress, name: name?.length ? name.join(':') : undefined });
|
||||
} catch (error) {
|
||||
onError && onError(error as Error);
|
||||
|
||||
console.error('@polkadot/react-qr:QrScanAddress', (error as Error).message, data);
|
||||
}
|
||||
}
|
||||
},
|
||||
[onScan]
|
||||
[onScan, onError, isEthereum]
|
||||
);
|
||||
|
||||
return (
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
// Copyright 2017-2021 @polkadot/react-qr authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { HexString } from '@polkadot/util/types';
|
||||
|
||||
import React, { useCallback } from 'react';
|
||||
|
||||
import { QrScan } from './Scan';
|
||||
|
||||
interface ScanType {
|
||||
signature: string;
|
||||
signature: HexString;
|
||||
}
|
||||
|
||||
interface Props {
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Auto-generated by @polkadot/dev, do not edit
|
||||
|
||||
export const packageInfo = { name: '@polkadot/react-qr', version: '0.77.1' };
|
||||
export const packageInfo = { name: '@polkadot/react-qr', version: '0.86.6' };
|
||||
|
||||
@@ -1,30 +1,38 @@
|
||||
{
|
||||
"name": "@polkadot/reactnative-identicon",
|
||||
"version": "0.77.1",
|
||||
"type": "module",
|
||||
"author": "Jaco Greeff <jacogr@gmail.com>",
|
||||
"bugs": "https://github.com/polkadot-js/ui/issues",
|
||||
"contributors": [],
|
||||
"description": "Renders an SVG picture representing an address",
|
||||
"main": "index.js",
|
||||
"homepage": "https://github.com/polkadot-js/ui/tree/master/packages/reactnative-identicon#readme",
|
||||
"license": "Apache-2.0",
|
||||
"maintainers": [],
|
||||
"name": "@polkadot/reactnative-identicon",
|
||||
"repository": {
|
||||
"directory": "packages/reactnative-identicon",
|
||||
"type": "git",
|
||||
"url": "https://github.com/polkadot-js/ui.git"
|
||||
},
|
||||
"sideEffects": [
|
||||
"./detectPackage.js",
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"author": "Jaco Greeff <jacogr@gmail.com>",
|
||||
"maintainers": [],
|
||||
"license": "Apache-2.0",
|
||||
"type": "module",
|
||||
"version": "0.86.6",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.14.0",
|
||||
"@polkadot/ui-shared": "0.77.1",
|
||||
"@polkadot/util": "^6.5.1",
|
||||
"@polkadot/util-crypto": "^6.5.1",
|
||||
"@babel/runtime": "^7.16.3",
|
||||
"@polkadot/ui-shared": "0.86.6",
|
||||
"@polkadot/util": "^7.9.1",
|
||||
"@polkadot/util-crypto": "^7.9.1",
|
||||
"react-native-svg": "^12.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react-native": "^0.66.5"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@polkadot/util": "*",
|
||||
"@polkadot/util-crypto": "*",
|
||||
"react": "*",
|
||||
"react-native": "*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react-native": "^0.64.6"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ const Components: Record<string, React.ComponentType<ComponentProps>> = {
|
||||
};
|
||||
|
||||
export default class IdentityIcon extends React.PureComponent<Props, State> {
|
||||
public state: State = {
|
||||
public override state: State = {
|
||||
address: '',
|
||||
publicKey: '0x'
|
||||
};
|
||||
@@ -62,7 +62,7 @@ export default class IdentityIcon extends React.PureComponent<Props, State> {
|
||||
}
|
||||
}
|
||||
|
||||
public render (): React.ReactNode {
|
||||
public override render (): React.ReactNode {
|
||||
const { theme = DEFAULT_THEME, size = DEFAULT_SIZE } = this.props;
|
||||
const { address, publicKey } = this.state;
|
||||
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Auto-generated by @polkadot/dev, do not edit
|
||||
|
||||
export const packageInfo = { name: '@polkadot/reactnative-identicon', version: '0.77.1' };
|
||||
export const packageInfo = { name: '@polkadot/reactnative-identicon', version: '0.86.6' };
|
||||
|
||||
@@ -1,12 +1,21 @@
|
||||
{
|
||||
"name": "@polkadot/ui-assets",
|
||||
"version": "0.77.1",
|
||||
"description": "Static assets shared accross projects",
|
||||
"main": "index.js",
|
||||
"author": "Jaco Greeff <jacogr@gmail.com>",
|
||||
"maintainers": [],
|
||||
"bugs": "https://github.com/polkadot-js/ui/issues",
|
||||
"contributors": [],
|
||||
"description": "Static assets shared accross projects",
|
||||
"homepage": "https://github.com/polkadot-js/ui/tree/master/packages/ui-assets#readme",
|
||||
"license": "Apache-2.0",
|
||||
"maintainers": [],
|
||||
"name": "@polkadot/ui-assets",
|
||||
"repository": {
|
||||
"directory": "packages/ui-assets",
|
||||
"type": "git",
|
||||
"url": "https://github.com/polkadot-js/ui.git"
|
||||
},
|
||||
"sideEffects": false,
|
||||
"version": "0.86.6",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.14.0"
|
||||
"@babel/runtime": "^7.16.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Auto-generated by @polkadot/dev, do not edit
|
||||
|
||||
export const packageInfo = { name: '@polkadot/ui-assets', version: '0.77.1' };
|
||||
export const packageInfo = { name: '@polkadot/ui-assets', version: '0.86.6' };
|
||||
|
||||
@@ -40,7 +40,7 @@ import accountObservable from '@polkadot/ui-keyring/observable/accounts';
|
||||
import { SingleAddress, SubjectInfo } from '@polkadot/ui-keyring/observable/types';
|
||||
import React from 'react';
|
||||
import { Subscribe } from 'react-with-observable';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { map } from 'rxjs';
|
||||
|
||||
class MyReactComponent extends React.PureComponent {
|
||||
render () {
|
||||
|
||||
@@ -1,29 +1,35 @@
|
||||
{
|
||||
"author": "Jaco Greeff <jacogr@gmail.com>",
|
||||
"bugs": "https://github.com/polkadot-js/ui/issues",
|
||||
"contributors": [],
|
||||
"homepage": "https://github.com/polkadot-js/ui/tree/master/packages/ui-keyring#readme",
|
||||
"license": "Apache-2.0",
|
||||
"maintainers": [],
|
||||
"name": "@polkadot/ui-keyring",
|
||||
"version": "0.77.1",
|
||||
"type": "module",
|
||||
"main": "index.js",
|
||||
"repository": {
|
||||
"directory": "packages/ui-keyring",
|
||||
"type": "git",
|
||||
"url": "https://github.com/polkadot-js/ui.git"
|
||||
},
|
||||
"sideEffects": [
|
||||
"./detectPackage.js",
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"repository": "github:polkadot-js/apps",
|
||||
"author": "Jaco Greeff <jacogr@gmail.com>",
|
||||
"maintainers": [],
|
||||
"contributors": [],
|
||||
"license": "Apache-2.0",
|
||||
"type": "module",
|
||||
"version": "0.86.6",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.14.0",
|
||||
"@polkadot/hw-ledger": "^6.5.1",
|
||||
"@polkadot/keyring": "^6.5.1",
|
||||
"@polkadot/ui-settings": "0.77.1",
|
||||
"@polkadot/util": "^6.5.1",
|
||||
"@polkadot/x-rxjs": "^6.5.1",
|
||||
"@babel/runtime": "^7.16.3",
|
||||
"@polkadot/hw-ledger": "^7.9.1",
|
||||
"@polkadot/keyring": "^7.9.1",
|
||||
"@polkadot/ui-settings": "0.86.6",
|
||||
"@polkadot/util": "^7.9.1",
|
||||
"mkdirp": "^1.0.4",
|
||||
"rxjs": "^7.4.0",
|
||||
"store": "^2.0.12"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/mkdirp": "^1.0.1",
|
||||
"@types/mkdirp": "^1.0.2",
|
||||
"@types/store": "^2.0.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
||||
@@ -6,8 +6,8 @@ import type { Prefix } from '@polkadot/util-crypto/address/types';
|
||||
import type { AddressSubject } from './observable/types';
|
||||
import type { KeyringOptions, KeyringStore } from './types';
|
||||
|
||||
import { createTestKeyring } from '@polkadot/keyring/testing';
|
||||
import { isBoolean, isString } from '@polkadot/util';
|
||||
import { createTestKeyring } from '@polkadot/keyring';
|
||||
import { isBoolean, isNumber, isString } from '@polkadot/util';
|
||||
|
||||
import { accounts } from './observable/accounts';
|
||||
import { addresses } from './observable/addresses';
|
||||
@@ -61,11 +61,11 @@ export class Base {
|
||||
|
||||
public decodeAddress = (key: string | Uint8Array, ignoreChecksum?: boolean, ss58Format?: Prefix): Uint8Array => {
|
||||
return this.keyring.decodeAddress(key, ignoreChecksum, ss58Format);
|
||||
}
|
||||
};
|
||||
|
||||
public encodeAddress = (key: string | Uint8Array, ss58Format?: Prefix): string => {
|
||||
return this.keyring.encodeAddress(key, ss58Format);
|
||||
}
|
||||
};
|
||||
|
||||
public getPair (address: string | Uint8Array): KeyringPair {
|
||||
return this.keyring.getPair(address);
|
||||
@@ -93,7 +93,7 @@ export class Base {
|
||||
}
|
||||
|
||||
public setSS58Format (ss58Format?: Prefix): void {
|
||||
if (this.#keyring && ss58Format) {
|
||||
if (this.#keyring && isNumber(ss58Format)) {
|
||||
this.#keyring.setSS58Format(ss58Format);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
// Copyright 2017-2021 @polkadot/ui-keyring authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type BN from 'bn.js';
|
||||
import type { KeyringPair, KeyringPair$Json, KeyringPair$Meta } from '@polkadot/keyring/types';
|
||||
import type { EncryptedJson } from '@polkadot/util-crypto/json/types';
|
||||
import type { KeypairType } from '@polkadot/util-crypto/types';
|
||||
import type { AddressSubject, SingleAddress } from './observable/types';
|
||||
import type { CreateResult, KeyringAddress, KeyringAddressType, KeyringItemType, KeyringJson, KeyringJson$Meta, KeyringOptions, KeyringPairs$Json, KeyringStruct } from './types';
|
||||
|
||||
import BN from 'bn.js';
|
||||
|
||||
import { createPair } from '@polkadot/keyring/pair';
|
||||
import { chains } from '@polkadot/ui-settings/defaults/chains';
|
||||
import { bnToBn, hexToU8a, isHex, isString, stringToU8a, u8aSorted, u8aToString } from '@polkadot/util';
|
||||
import { createPair } from '@polkadot/keyring';
|
||||
import { chains } from '@polkadot/ui-settings';
|
||||
import { bnToBn, hexToU8a, isHex, isString, objectSpread, stringToU8a, u8aSorted, u8aToString } from '@polkadot/util';
|
||||
import { base64Decode, createKeyMulti, jsonDecrypt, jsonEncrypt } from '@polkadot/util-crypto';
|
||||
|
||||
import { env } from './observable/env';
|
||||
@@ -34,7 +33,7 @@ export class Keyring extends Base implements KeyringStruct {
|
||||
};
|
||||
|
||||
public addExternal (address: string | Uint8Array, meta: KeyringPair$Meta = {}): CreateResult {
|
||||
const pair = this.keyring.addFromAddress(address, { ...meta, isExternal: true }, null);
|
||||
const pair = this.keyring.addFromAddress(address, objectSpread<KeyringJson$Meta>({}, meta, { isExternal: true }), null);
|
||||
|
||||
return {
|
||||
json: this.saveAccount(pair),
|
||||
@@ -43,16 +42,16 @@ export class Keyring extends Base implements KeyringStruct {
|
||||
}
|
||||
|
||||
public addHardware (address: string | Uint8Array, hardwareType: string, meta: KeyringPair$Meta = {}): CreateResult {
|
||||
return this.addExternal(address, { ...meta, hardwareType, isHardware: true });
|
||||
return this.addExternal(address, objectSpread<KeyringPair$Meta>({}, meta, { hardwareType, isHardware: true }));
|
||||
}
|
||||
|
||||
public addMultisig (addresses: (string | Uint8Array)[], threshold: BigInt | BN | number, meta: KeyringPair$Meta = {}): CreateResult {
|
||||
public addMultisig (addresses: (string | Uint8Array)[], threshold: bigint | BN | number, meta: KeyringPair$Meta = {}): CreateResult {
|
||||
const address = createKeyMulti(addresses, threshold);
|
||||
|
||||
// we could use `sortAddresses`, but rather use internal encode/decode so we are 100%
|
||||
const who = u8aSorted(addresses.map((who) => this.decodeAddress(who))).map((who) => this.encodeAddress(who));
|
||||
|
||||
return this.addExternal(address, { ...meta, isMultisig: true, threshold: bnToBn(threshold).toNumber(), who });
|
||||
return this.addExternal(address, objectSpread<KeyringPair$Meta>({}, meta, { isMultisig: true, threshold: bnToBn(threshold).toNumber(), who }));
|
||||
}
|
||||
|
||||
public addPair (pair: KeyringPair, password: string): CreateResult {
|
||||
@@ -92,17 +91,20 @@ export class Keyring extends Base implements KeyringStruct {
|
||||
|
||||
const accounts = await Promise.all(accountPromises);
|
||||
|
||||
return {
|
||||
...jsonEncrypt(stringToU8a(JSON.stringify(accounts)), ['batch-pkcs8'], password),
|
||||
return objectSpread({}, jsonEncrypt(stringToU8a(JSON.stringify(accounts)), ['batch-pkcs8'], password), {
|
||||
accounts: accounts.map((account) => ({
|
||||
address: account.address,
|
||||
meta: account.meta
|
||||
}))
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
public createFromJson (json: KeyringPair$Json, meta: KeyringPair$Meta = {}): KeyringPair {
|
||||
return this.keyring.createFromJson({ ...json, meta: { ...(json.meta || {}), meta } });
|
||||
return this.keyring.createFromJson(
|
||||
objectSpread({}, json, {
|
||||
meta: objectSpread({}, json.meta, meta)
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
public createFromUri (suri: string, meta: KeyringPair$Meta = {}, type?: KeypairType): KeyringPair {
|
||||
@@ -250,10 +252,7 @@ export class Keyring extends Base implements KeyringStruct {
|
||||
private loadInjected (address: string, meta: KeyringJson$Meta, type?: KeypairType): void {
|
||||
const json = {
|
||||
address,
|
||||
meta: {
|
||||
...meta,
|
||||
isInjected: true
|
||||
}
|
||||
meta: objectSpread<KeyringJson$Meta>({}, meta, { isInjected: true })
|
||||
};
|
||||
const pair = this.keyring.addFromAddress(address, json.meta, null, type);
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
// Copyright 2017-2021 @polkadot/ui-keyring authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import { Keyring } from './Keyring';
|
||||
|
||||
export { Ledger } from '@polkadot/hw-ledger';
|
||||
export { packageInfo } from './packageInfo';
|
||||
|
||||
const keyring = new Keyring();
|
||||
|
||||
export { Keyring, keyring };
|
||||
@@ -3,13 +3,8 @@
|
||||
|
||||
import './detectPackage';
|
||||
|
||||
import { Keyring } from './Keyring';
|
||||
import { keyring } from './bundle';
|
||||
|
||||
export { Ledger } from '@polkadot/hw-ledger';
|
||||
export { packageInfo } from './packageInfo';
|
||||
|
||||
const keyring = new Keyring();
|
||||
|
||||
export { Keyring, keyring };
|
||||
export * from './bundle';
|
||||
|
||||
export default keyring;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Copyright 2017-2021 @polkadot/ui-keyring authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import { BehaviorSubject } from '@polkadot/x-rxjs';
|
||||
import { BehaviorSubject } from 'rxjs';
|
||||
|
||||
const subject = new BehaviorSubject(false);
|
||||
|
||||
|
||||
@@ -5,7 +5,9 @@ import type { KeypairType } from '@polkadot/util-crypto/types';
|
||||
import type { KeyringJson, KeyringStore } from '../types';
|
||||
import type { AddressSubject, SingleAddress, SubjectInfo } from './types';
|
||||
|
||||
import { BehaviorSubject } from '@polkadot/x-rxjs';
|
||||
import { BehaviorSubject } from 'rxjs';
|
||||
|
||||
import { objectCopy, objectSpread } from '@polkadot/util';
|
||||
|
||||
import { createOptionItem } from '../options/item';
|
||||
import { env } from './env';
|
||||
@@ -34,10 +36,10 @@ export function genericSubject (keyCreator: (address: string) => string, withTes
|
||||
|
||||
return {
|
||||
add: (store: KeyringStore, address: string, json: KeyringJson, type?: KeypairType): SingleAddress => {
|
||||
current = { ...current };
|
||||
current = objectCopy(current);
|
||||
|
||||
current[address] = {
|
||||
json: { ...json, address },
|
||||
json: objectSpread({}, json, { address }),
|
||||
option: createOptionItem(address, json.meta.name),
|
||||
type
|
||||
};
|
||||
@@ -52,7 +54,7 @@ export function genericSubject (keyCreator: (address: string) => string, withTes
|
||||
return current[address];
|
||||
},
|
||||
remove: (store: KeyringStore, address: string): void => {
|
||||
current = { ...current };
|
||||
current = objectCopy(current);
|
||||
|
||||
delete current[address];
|
||||
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
|
||||
import type { SubjectInfo } from './types';
|
||||
|
||||
import { combineLatest } from '@polkadot/x-rxjs';
|
||||
import { map } from '@polkadot/x-rxjs/operators';
|
||||
import { combineLatest, map } from 'rxjs';
|
||||
|
||||
import { accounts } from './accounts';
|
||||
import { addresses } from './addresses';
|
||||
@@ -16,11 +15,11 @@ interface Result {
|
||||
contracts: SubjectInfo;
|
||||
}
|
||||
|
||||
export const obervableAll = combineLatest(
|
||||
export const obervableAll = combineLatest([
|
||||
accounts.subject,
|
||||
addresses.subject,
|
||||
contracts.subject
|
||||
).pipe(
|
||||
]).pipe(
|
||||
map(([accounts, addresses, contracts]): Result => ({
|
||||
accounts,
|
||||
addresses,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// Copyright 2017-2021 @polkadot/ui-keyring authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { BehaviorSubject } from 'rxjs';
|
||||
import type { KeypairType } from '@polkadot/util-crypto/types';
|
||||
import type { BehaviorSubject } from '@polkadot/x-rxjs';
|
||||
import type { KeyringSectionOption } from '../options/types';
|
||||
import type { KeyringJson, KeyringStore } from '../types';
|
||||
|
||||
|
||||
@@ -5,8 +5,9 @@ import type { SingleAddress } from '../observable/types';
|
||||
import type { KeyringStruct } from '../types';
|
||||
import type { KeyringOptionInstance, KeyringOptions, KeyringSectionOption, KeyringSectionOptions } from './types';
|
||||
|
||||
import { BehaviorSubject } from 'rxjs';
|
||||
|
||||
import { assert } from '@polkadot/util';
|
||||
import { BehaviorSubject } from '@polkadot/x-rxjs';
|
||||
|
||||
import { obervableAll } from '../observable';
|
||||
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Auto-generated by @polkadot/dev, do not edit
|
||||
|
||||
export const packageInfo = { name: '@polkadot/ui-keyring', version: '0.77.1' };
|
||||
export const packageInfo = { name: '@polkadot/ui-keyring', version: '0.86.6' };
|
||||
|
||||
@@ -13,7 +13,8 @@ export class BrowserStore implements KeyringStore {
|
||||
}
|
||||
|
||||
public get (key: string, cb: (value: KeyringJson) => void): void {
|
||||
cb(store.get(key));
|
||||
// eslint-disable-next-line node/no-callback-literal
|
||||
cb(store.get(key) as KeyringJson);
|
||||
}
|
||||
|
||||
public remove (key: string, cb?: () => void): void {
|
||||
|
||||
@@ -1,17 +1,25 @@
|
||||
{
|
||||
"name": "@polkadot/ui-settings",
|
||||
"version": "0.77.1",
|
||||
"type": "module",
|
||||
"description": "Manages app settings",
|
||||
"main": "index.js",
|
||||
"sideEffects": false,
|
||||
"author": "Jaco Greeff <jacogr@gmail.com>",
|
||||
"maintainers": [],
|
||||
"bugs": "https://github.com/polkadot-js/ui/issues",
|
||||
"contributors": [],
|
||||
"description": "Manages app settings",
|
||||
"homepage": "https://github.com/polkadot-js/ui/tree/master/packages/ui-settings#readme",
|
||||
"license": "Apache-2.0",
|
||||
"maintainers": [],
|
||||
"name": "@polkadot/ui-settings",
|
||||
"repository": {
|
||||
"directory": "packages/ui-settings",
|
||||
"type": "git",
|
||||
"url": "https://github.com/polkadot-js/ui.git"
|
||||
},
|
||||
"sideEffects": false,
|
||||
"type": "module",
|
||||
"version": "0.86.6",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.14.0",
|
||||
"@polkadot/networks": "^6.5.1",
|
||||
"@polkadot/util": "^6.5.1",
|
||||
"@babel/runtime": "^7.16.3",
|
||||
"@polkadot/networks": "^7.9.1",
|
||||
"@polkadot/util": "^7.9.1",
|
||||
"eventemitter3": "^4.0.7",
|
||||
"store": "^2.0.12"
|
||||
},
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
// Copyright 2017-2021 @polkadot/ui-settings authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Option, SettingsStruct } from './types';
|
||||
import type { Endpoint, EndpointType, Option, SettingsStruct } from './types';
|
||||
|
||||
import EventEmitter from 'eventemitter3';
|
||||
import store from 'store';
|
||||
|
||||
import { isUndefined } from '@polkadot/util';
|
||||
|
||||
import { CAMERA, CAMERA_DEFAULT, CRYPTOS, CRYPTOS_ETH, CRYPTOS_LEDGER, ENDPOINT_DEFAULT, ENDPOINTS, ICON_DEFAULT, ICONS, LANGUAGE_DEFAULT, LEDGER_CONN, LEDGER_CONN_DEFAULT, LOCKING, LOCKING_DEFAULT, PREFIX_DEFAULT, PREFIXES, UIMODE_DEFAULT, UIMODES, UITHEME_DEFAULT, UITHEMES } from './defaults';
|
||||
import { CAMERA, CAMERA_DEFAULT, CRYPTOS, CRYPTOS_ETH, CRYPTOS_LEDGER, ENDPOINT_DEFAULT, ENDPOINTS, ICON_DEFAULT, ICONS, LANGUAGE_DEFAULT, LEDGER_CONN, LEDGER_CONN_DEFAULT, LOCKING, LOCKING_DEFAULT, NOTIFICATION_DEFAULT, PREFIX_DEFAULT, PREFIXES, UIMODE_DEFAULT, UIMODES, UITHEME_DEFAULT, UITHEMES } from './defaults';
|
||||
|
||||
type ChangeCallback = (settings: SettingsStruct) => void;
|
||||
type OnTypes = 'change';
|
||||
@@ -24,6 +24,9 @@ function withDefault (options: Option[], option: string | undefined, fallback: s
|
||||
export class Settings implements SettingsStruct {
|
||||
readonly #emitter: EventEmitter;
|
||||
|
||||
#apiType: Endpoint;
|
||||
|
||||
// will become deprecated for supporting substrate connect light clients. apiType structure should be used instead
|
||||
#apiUrl: string;
|
||||
|
||||
#camera: string;
|
||||
@@ -42,12 +45,16 @@ export class Settings implements SettingsStruct {
|
||||
|
||||
#uiTheme: string;
|
||||
|
||||
#notification: string;
|
||||
|
||||
constructor () {
|
||||
const settings = (store.get('settings') as SettingsStruct) || {};
|
||||
|
||||
this.#emitter = new EventEmitter();
|
||||
|
||||
this.#apiUrl = (typeof settings.apiUrl === 'string' && settings.apiUrl) || process.env.WS_URL || (ENDPOINT_DEFAULT.value as string);
|
||||
// will become deprecated for supporting substrate connect light clients. apiType structure should be used instead
|
||||
this.#apiUrl = (typeof settings.apiUrl === 'string' && settings.apiUrl) || (process && process.env && process.env.WS_URL) || (ENDPOINT_DEFAULT.value as string);
|
||||
this.#apiType = { param: this.#apiUrl, type: 'json-rpc' as EndpointType };
|
||||
this.#camera = withDefault(CAMERA, settings.camera, CAMERA_DEFAULT);
|
||||
this.#ledgerConn = withDefault(LEDGER_CONN, settings.ledgerConn, LEDGER_CONN_DEFAULT);
|
||||
this.#i18nLang = settings.i18nLang || LANGUAGE_DEFAULT;
|
||||
@@ -56,12 +63,17 @@ export class Settings implements SettingsStruct {
|
||||
this.#prefix = isUndefined(settings.prefix) ? PREFIX_DEFAULT : settings.prefix;
|
||||
this.#uiMode = settings.uiMode || UIMODE_DEFAULT;
|
||||
this.#uiTheme = settings.uiTheme || UITHEME_DEFAULT;
|
||||
this.#notification = settings.notification || NOTIFICATION_DEFAULT;
|
||||
}
|
||||
|
||||
public get camera (): string {
|
||||
return this.#camera;
|
||||
}
|
||||
|
||||
public get apiType (): Endpoint {
|
||||
return this.#apiType;
|
||||
}
|
||||
|
||||
public get apiUrl (): string {
|
||||
return this.#apiUrl;
|
||||
}
|
||||
@@ -74,6 +86,10 @@ export class Settings implements SettingsStruct {
|
||||
return this.#icon;
|
||||
}
|
||||
|
||||
public get notification (): string {
|
||||
return this.#notification;
|
||||
}
|
||||
|
||||
public get ledgerConn (): string {
|
||||
return this.#ledgerConn;
|
||||
}
|
||||
@@ -140,12 +156,14 @@ export class Settings implements SettingsStruct {
|
||||
|
||||
public get (): SettingsStruct {
|
||||
return {
|
||||
apiType: this.#apiType,
|
||||
apiUrl: this.#apiUrl,
|
||||
camera: this.#camera,
|
||||
i18nLang: this.#i18nLang,
|
||||
icon: this.#icon,
|
||||
ledgerConn: this.#ledgerConn,
|
||||
locking: this.#locking,
|
||||
notification: this.#notification,
|
||||
prefix: this.#prefix,
|
||||
uiMode: this.#uiMode,
|
||||
uiTheme: this.#uiTheme
|
||||
@@ -153,12 +171,14 @@ export class Settings implements SettingsStruct {
|
||||
}
|
||||
|
||||
public set (settings: Partial<SettingsStruct>): void {
|
||||
this.#apiType = settings.apiType || this.#apiType;
|
||||
this.#apiUrl = settings.apiUrl || this.#apiUrl;
|
||||
this.#camera = settings.camera || this.#camera;
|
||||
this.#ledgerConn = settings.ledgerConn || this.#ledgerConn;
|
||||
this.#i18nLang = settings.i18nLang || this.#i18nLang;
|
||||
this.#icon = settings.icon || this.#icon;
|
||||
this.#locking = settings.locking || this.#locking;
|
||||
this.#notification = settings.notification || this.#notification;
|
||||
this.#prefix = isUndefined(settings.prefix) ? this.#prefix : settings.prefix;
|
||||
this.#uiMode = settings.uiMode || this.#uiMode;
|
||||
this.#uiTheme = settings.uiTheme || this.#uiTheme;
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
// Copyright 2017-2021 @polkadot/ui-settings authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import { Settings, settings } from './Settings';
|
||||
|
||||
export { ENDPOINT_DEFAULT, ICON_DEFAULT, ICON_DEFAULT_HOST, LANGUAGE_DEFAULT, LOCKING_DEFAULT, PREFIX_DEFAULT, UIMODE_DEFAULT, UITHEME_DEFAULT } from './defaults';
|
||||
export { chains } from './defaults/chains';
|
||||
export { packageInfo } from './packageInfo';
|
||||
|
||||
export { settings, Settings };
|
||||
@@ -1,12 +1,13 @@
|
||||
// Copyright 2017-2021 @polkadot/ui-settings authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import known from '@polkadot/networks';
|
||||
import { selectableNetworks } from '@polkadot/networks';
|
||||
import { objectSpread } from '@polkadot/util';
|
||||
|
||||
type ChainDef = string[];
|
||||
|
||||
const chains: Record <string, ChainDef> = known
|
||||
const chains: Record <string, ChainDef> = selectableNetworks
|
||||
.filter((n) => n.genesisHash.length)
|
||||
.reduce((chains, { genesisHash, network }) => ({ ...chains, [network]: genesisHash }), {});
|
||||
.reduce((chains, { genesisHash, network }) => objectSpread(chains, { [network]: genesisHash }), {});
|
||||
|
||||
export { chains };
|
||||
|
||||
@@ -7,7 +7,7 @@ import { CRYPTOS, CRYPTOS_ETH, CRYPTOS_LEDGER } from './crypto';
|
||||
import { ENDPOINT_DEFAULT, ENDPOINTS } from './endpoints';
|
||||
import { LEDGER_CONN, LEDGER_CONN_DEFAULT } from './ledger';
|
||||
import { PREFIX_DEFAULT, PREFIXES } from './ss58';
|
||||
import { ICON_DEFAULT, ICON_DEFAULT_HOST, ICONS, UIMODE_DEFAULT, UIMODES, UITHEME_DEFAULT, UITHEMES } from './ui';
|
||||
import { ICON_DEFAULT, ICON_DEFAULT_HOST, ICONS, NOTIFICATION_DEFAULT, UIMODE_DEFAULT, UIMODES, UITHEME_DEFAULT, UITHEMES } from './ui';
|
||||
|
||||
const CAMERA_DEFAULT = 'off';
|
||||
|
||||
@@ -57,6 +57,7 @@ export {
|
||||
LEDGER_CONN,
|
||||
LOCKING_DEFAULT,
|
||||
LOCKING,
|
||||
NOTIFICATION_DEFAULT,
|
||||
PREFIX_DEFAULT,
|
||||
PREFIXES,
|
||||
UIMODE_DEFAULT,
|
||||
|
||||
@@ -19,7 +19,12 @@ export const LEDGER_CONN: Option[] = [
|
||||
// },
|
||||
{
|
||||
info: 'webusb',
|
||||
text: 'Attach Ledger via WebUSB',
|
||||
text: 'Attach Ledger via WebUSB (Chrome, recommended)',
|
||||
value: 'webusb'
|
||||
},
|
||||
{
|
||||
info: 'hid',
|
||||
text: 'Attach Ledger via WebHID (Chrome, experimental)',
|
||||
value: 'hid'
|
||||
}
|
||||
];
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
import type { Option } from '../types';
|
||||
|
||||
import { available } from '@polkadot/networks';
|
||||
import { availableNetworks } from '@polkadot/networks';
|
||||
|
||||
export const PREFIX_DEFAULT = -1;
|
||||
|
||||
@@ -13,7 +13,7 @@ const defaultNetwork: Option = {
|
||||
value: -1
|
||||
};
|
||||
|
||||
const networks = available.map(({ displayName, network, prefix }) => ({
|
||||
const networks = availableNetworks.map(({ displayName, network, prefix }) => ({
|
||||
info: network,
|
||||
text: displayName,
|
||||
value: prefix
|
||||
|
||||
@@ -70,11 +70,14 @@ const ICONS: Option[] = [
|
||||
}
|
||||
];
|
||||
|
||||
const NOTIFICATION_DEFAULT = 'popup';
|
||||
|
||||
export {
|
||||
ICON_DEFAULT,
|
||||
ICON_DEFAULT_HOST,
|
||||
ICONS,
|
||||
LANGUAGE_DEFAULT,
|
||||
NOTIFICATION_DEFAULT,
|
||||
UIMODE_DEFAULT,
|
||||
UIMODES,
|
||||
UITHEME_DEFAULT,
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
// Copyright 2017-2021 @polkadot/ui-settings authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import { Settings, settings } from './Settings';
|
||||
import { settings } from './bundle';
|
||||
|
||||
export { ENDPOINT_DEFAULT, ICON_DEFAULT, ICON_DEFAULT_HOST, LANGUAGE_DEFAULT, LOCKING_DEFAULT, PREFIX_DEFAULT, UIMODE_DEFAULT, UITHEME_DEFAULT } from './defaults';
|
||||
export { packageInfo } from './packageInfo';
|
||||
|
||||
export { settings, Settings };
|
||||
export * from './bundle';
|
||||
|
||||
export default settings;
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Auto-generated by @polkadot/dev, do not edit
|
||||
|
||||
export const packageInfo = { name: '@polkadot/ui-settings', version: '0.77.1' };
|
||||
export const packageInfo = { name: '@polkadot/ui-settings', version: '0.86.6' };
|
||||
|
||||
@@ -9,12 +9,14 @@ export type Option = {
|
||||
}
|
||||
|
||||
export interface SettingsStruct {
|
||||
apiType: Endpoint;
|
||||
apiUrl: string;
|
||||
camera: string;
|
||||
i18nLang: string;
|
||||
icon: string;
|
||||
ledgerConn: string;
|
||||
locking: string;
|
||||
notification: string;
|
||||
prefix: number;
|
||||
uiMode: string;
|
||||
uiTheme: string;
|
||||
@@ -28,3 +30,10 @@ export interface NetworkSpecsStruct {
|
||||
title: string;
|
||||
unit: string;
|
||||
}
|
||||
|
||||
export interface Endpoint {
|
||||
type: EndpointType;
|
||||
param: string;
|
||||
}
|
||||
|
||||
export type EndpointType = 'json-rpc' | 'substrate-connect';
|
||||
|
||||
@@ -1,25 +1,33 @@
|
||||
{
|
||||
"name": "@polkadot/ui-shared",
|
||||
"version": "0.77.1",
|
||||
"type": "module",
|
||||
"description": "Shared logic that is usable accross all frameworks-specific areas",
|
||||
"main": "index.js",
|
||||
"sideEffects": false,
|
||||
"author": "Jaco Greeff <jacogr@gmail.com>",
|
||||
"maintainers": [],
|
||||
"bugs": "https://github.com/polkadot-js/ui/issues",
|
||||
"contributors": [],
|
||||
"description": "Shared logic that is usable accross all frameworks-specific areas",
|
||||
"homepage": "https://github.com/polkadot-js/ui/tree/master/packages/ui-shared#readme",
|
||||
"license": "Apache-2.0",
|
||||
"maintainers": [],
|
||||
"name": "@polkadot/ui-shared",
|
||||
"repository": {
|
||||
"directory": "packages/ui-shared",
|
||||
"type": "git",
|
||||
"url": "https://github.com/polkadot-js/ui.git"
|
||||
},
|
||||
"sideEffects": false,
|
||||
"type": "module",
|
||||
"version": "0.86.6",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.14.0",
|
||||
"color": "^3.1.3"
|
||||
"@babel/runtime": "^7.16.3",
|
||||
"color": "^3.2.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/util": "^7.9.1",
|
||||
"@polkadot/util-crypto": "^7.9.1",
|
||||
"@types/color": "^3.0.2",
|
||||
"@types/xmlserializer": "^0.6.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@polkadot/util": "*",
|
||||
"@polkadot/util-crypto": "*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/util": "^6.5.1",
|
||||
"@polkadot/util-crypto": "^6.5.1",
|
||||
"@types/color": "^3.0.1",
|
||||
"@types/xmlserializer": "^0.6.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Auto-generated by @polkadot/dev, do not edit
|
||||
|
||||
export const packageInfo = { name: '@polkadot/ui-shared', version: '0.77.1' };
|
||||
export const packageInfo = { name: '@polkadot/ui-shared', version: '0.86.6' };
|
||||
|
||||
@@ -1,29 +1,37 @@
|
||||
{
|
||||
"name": "@polkadot/vue-identicon",
|
||||
"version": "0.77.1",
|
||||
"type": "module",
|
||||
"description": "Renders an SVG picture representing an address",
|
||||
"author": "Jaco Greeff <jacogr@gmail.com>",
|
||||
"bugs": "https://github.com/polkadot-js/ui/issues",
|
||||
"contributors": [],
|
||||
"description": "Renders an SVG picture representing an address",
|
||||
"homepage": "https://github.com/polkadot-js/ui/tree/master/packages/vue-identicon#readme",
|
||||
"license": "Apache-2.0",
|
||||
"maintainers": [],
|
||||
"main": "index.js",
|
||||
"name": "@polkadot/vue-identicon",
|
||||
"repository": {
|
||||
"directory": "packages/vue-identicon",
|
||||
"type": "git",
|
||||
"url": "https://github.com/polkadot-js/ui.git"
|
||||
},
|
||||
"sideEffects": [
|
||||
"./detectPackage.js",
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"license": "Apache-2.0",
|
||||
"type": "module",
|
||||
"version": "0.86.6",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.14.0",
|
||||
"@polkadot/ui-shared": "0.77.1",
|
||||
"@polkadot/util": "^6.5.1",
|
||||
"@polkadot/util-crypto": "^6.5.1",
|
||||
"jdenticon": "3.1.0"
|
||||
"@babel/runtime": "^7.16.3",
|
||||
"@polkadot/ui-shared": "0.86.6",
|
||||
"@polkadot/util": "^7.9.1",
|
||||
"@polkadot/util-crypto": "^7.9.1",
|
||||
"jdenticon": "3.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"vue": "^2.6.14"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@polkadot/util": "*",
|
||||
"@polkadot/util-crypto": "*",
|
||||
"vue": "*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"vue": "^2.6.12"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ export const Identicon = Vue.extend({
|
||||
this.recodeAddress();
|
||||
},
|
||||
recodeAddress: function (): void {
|
||||
const { address, publicKey } = encodeAccount(this.value);
|
||||
const { address, publicKey } = encodeAccount(this.value as string);
|
||||
|
||||
this.address = address;
|
||||
this.publicKey = publicKey;
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
// Copyright 2017-2021 @polkadot/vue-identicon authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
export { Identicon } from './Identicon';
|
||||
|
||||
export { packageInfo } from './packageInfo';
|
||||
@@ -1,6 +1,8 @@
|
||||
// Copyright 2017-2021 @polkadot/vue-identicon authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Options } from '@polkadot/ui-shared/icons/types';
|
||||
|
||||
import Vue from 'vue';
|
||||
|
||||
import { beachballIcon } from '@polkadot/ui-shared';
|
||||
@@ -25,7 +27,7 @@ export const Beachball = Vue.extend({
|
||||
},
|
||||
methods: {
|
||||
createHtml: function (): void {
|
||||
this.html = beachballIcon(this.address, this.size).outerHTML;
|
||||
this.html = beachballIcon(this.address as string, this.size as Options).outerHTML;
|
||||
}
|
||||
},
|
||||
props: ['address', 'size'],
|
||||
|
||||
@@ -24,7 +24,7 @@ export const Jdenticon = Vue.extend({
|
||||
},
|
||||
methods: {
|
||||
createSvgHtml: function (): void {
|
||||
this.svgHtml = jdenticon.toSvg((this.publicKey as string).substr(2), this.size);
|
||||
this.svgHtml = jdenticon.toSvg((this.publicKey as string).substr(2), this.size as number);
|
||||
}
|
||||
},
|
||||
props: ['publicKey', 'size'],
|
||||
|
||||
@@ -30,7 +30,7 @@ export const Polkadot = Vue.extend({
|
||||
},
|
||||
methods: {
|
||||
createSvgHtml: function (): void {
|
||||
const circles = polkadotIcon(this.address, { isAlternative: (this as This).isAlternative || false }).map(({ cx, cy, fill, r }) =>
|
||||
const circles = polkadotIcon(this.address as string, { isAlternative: (this as This).isAlternative || false }).map(({ cx, cy, fill, r }) =>
|
||||
`<circle cx=${cx} cy=${cy} fill="${fill}" r=${r} />`
|
||||
).join('');
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
import './detectPackage';
|
||||
|
||||
import { Identicon } from './Identicon';
|
||||
import { Identicon } from './bundle';
|
||||
|
||||
export { packageInfo } from './packageInfo';
|
||||
export * from './bundle';
|
||||
|
||||
export default Identicon;
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Auto-generated by @polkadot/dev, do not edit
|
||||
|
||||
export const packageInfo = { name: '@polkadot/vue-identicon', version: '0.77.1' };
|
||||
export const packageInfo = { name: '@polkadot/vue-identicon', version: '0.86.6' };
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
// Copyright 2017-2021 @polkadot/ui authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import path from 'path';
|
||||
|
||||
import { createBundle } from '@polkadot/dev/config/rollup';
|
||||
|
||||
const pkgs = [
|
||||
'@polkadot/react-identicon',
|
||||
'@polkadot/react-qr',
|
||||
'@polkadot/ui-keyring',
|
||||
'@polkadot/ui-settings',
|
||||
'@polkadot/vue-identicon'
|
||||
];
|
||||
|
||||
const external = [
|
||||
...pkgs,
|
||||
'@polkadot/hw-ledger',
|
||||
'@polkadot/keyring',
|
||||
'@polkadot/util',
|
||||
'@polkadot/util-crypto',
|
||||
'react',
|
||||
'react-dom',
|
||||
'vue',
|
||||
'vue-router'
|
||||
];
|
||||
|
||||
const globals = {
|
||||
react: 'React',
|
||||
'react-dom': 'ReactDOM',
|
||||
vue: 'Vue',
|
||||
'vue-router': 'VueRouter'
|
||||
};
|
||||
|
||||
const entries = ['ui-shared'].reduce((all, p) => ({
|
||||
...all,
|
||||
[`@polkadot/${p}`]: path.resolve(process.cwd(), `packages/${p}/build`)
|
||||
}), {
|
||||
// re-exported in @polkadot/util-crypto, map directly
|
||||
'@polkadot/networks': '@polkadot/util-crypto'
|
||||
});
|
||||
|
||||
const overrides = {};
|
||||
|
||||
export default pkgs.map((pkg) => {
|
||||
const override = (overrides[pkg] || {});
|
||||
|
||||
return createBundle({
|
||||
external,
|
||||
globals,
|
||||
pkg,
|
||||
...override,
|
||||
entries: {
|
||||
...entries,
|
||||
...(override.entries || {})
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user