Compare commits

...
158 Commits
Author SHA1 Message Date
github-actions[bot] 994fdeed5d [CI Skip] release/stable 2.8.2
skip-checks: true
2022-07-10 09:07:57 +00:00
Jaco e1b7f8cdcd 2.8.2 (#664)
* 2.8.2

* Bump dev
2022-07-10 12:05:27 +03:00
github-actions[bot] 0b2e8e1bbe [CI Skip] release/stable 2.8.1
skip-checks: true
2022-07-09 07:28:32 +00:00
Jaco 951a745d0f 2.8.1 (#663)
* 2.8.1

* trigger
2022-07-09 10:26:03 +03:00
github-actions[bot] c9afdacb89 [CI Skip] bump/beta 2.7.3-0-x
skip-checks: true
2022-07-06 11:05:03 +00:00
Jaco f909cf9bbf Adjust issue template (#662)
* Adjust issue template

* isolated export
2022-07-06 14:02:23 +03:00
github-actions[bot] a1ea61688e [CI Skip] release/stable 2.7.2
skip-checks: true
2022-07-04 06:43:00 +00:00
Jaco a3b0e3607f 2.7.2 (#660) 2022-07-04 09:40:43 +03:00
github-actions[bot] c802f71617 [CI Skip] release/stable 2.7.1
skip-checks: true
2022-07-01 17:51:56 +00:00
Jaco 525ace3f52 2.7.1 (#659) 2022-07-01 20:49:24 +03:00
Derek Colley 42f1b3a6c3 Remove redundant div wrappers in vue-identicon (#643)
* Remove redundant `div` wrappers in vue-identicon

* Delete console.debug statememt

* remove redundant declarations

* fix lint errors

* refactor for codeclimate
2022-07-01 18:06:15 +03:00
github-actions[bot] 5ce56670d1 [CI Skip] release/stable 2.6.2
skip-checks: true
2022-06-25 06:02:24 +00:00
Jaco 414392e69b 2.6.2 (#657)
* 2.6.2

* CHANGELOG
2022-06-25 08:59:36 +03:00
github-actions[bot] ae5b64a75f [CI Skip] bump/beta 2.6.2-0-x
skip-checks: true
2022-06-23 14:27:01 +00:00
Jaco f2077dcab2 Bump dev deps (#656) 2022-06-23 17:24:01 +03:00
github-actions[bot] 75d03bb15a [CI Skip] release/stable 2.6.1
skip-checks: true
2022-06-23 09:01:27 +00:00
Jaco 269ec7adb7 2.6.1 (#655) 2022-06-23 11:58:22 +03:00
github-actions[bot] 03e6974c25 [CI Skip] release/beta 2.5.2-0
skip-checks: true
2022-06-21 04:49:38 +00:00
Jaco a31c524878 Bump TS to 4.7.4 (#654) 2022-06-21 07:47:19 +03:00
github-actions[bot] a057f0c279 [CI Skip] release/stable 2.5.1
skip-checks: true
2022-06-19 05:37:35 +00:00
Jaco 06dcc3bc5b 2.5.1 (#653) 2022-06-19 08:35:18 +03:00
github-actions[bot] fc3df455ef [CI Skip] release/beta 2.4.2-2
skip-checks: true
2022-06-12 08:14:09 +00:00
Jaco 121715231d Update issue template (#651) 2022-06-12 11:11:47 +03:00
github-actions[bot] a35c1f98e8 [CI Skip] release/beta 2.4.2-1
skip-checks: true
2022-06-11 05:44:34 +00:00
Jaco fbaf440766 Bump deps (& issue template) (#650) 2022-06-11 08:42:20 +03:00
github-actions[bot] 813c589752 [CI Skip] release/beta 2.4.2-0
skip-checks: true
2022-06-05 06:18:23 +00:00
Jaco 806ae4fe42 Bump deps (#649) 2022-06-05 09:16:01 +03:00
github-actions[bot] 75507c5fa7 [CI Skip] release/stable 2.4.1
skip-checks: true
2022-06-04 06:28:48 +00:00
Jaco d1c265130e 2.4.1 (#648) 2022-06-04 09:26:22 +03:00
github-actions[bot] 0eb4663442 [CI Skip] release/beta 2.3.2-1
skip-checks: true
2022-06-04 04:49:49 +00:00
Jaco 9e134ff95e Bump deps (#647) 2022-06-04 07:47:13 +03:00
github-actions[bot] c09d58bba1 [CI Skip] release/beta 2.3.2-0
skip-checks: true
2022-05-30 07:27:38 +00:00
Jaco fdc2b5011b Bump TS (#645) 2022-05-30 10:24:01 +03:00
github-actions[bot] 420ad06a7e [CI Skip] release/stable 2.3.1
skip-checks: true
2022-05-30 06:16:17 +00:00
Jaco 28988479c5 2.3.1 (#644) 2022-05-30 09:13:48 +03:00
github-actions[bot] 700b04e2ec [CI Skip] release/stable 2.2.1
skip-checks: true
2022-05-14 05:13:26 +00:00
Jaco b092fe8c6d 2.2.1 (#641) 2022-05-14 08:10:34 +03:00
github-actions[bot] b25f6e46d8 [CI Skip] release/stable 2.1.1
skip-checks: true
2022-04-30 05:52:47 +00:00
Jaco 62e934dba7 2.1.1 (#638) 2022-04-30 08:49:49 +03:00
github-actions[bot] cb073d755d [CI Skip] release/beta 2.0.2-2
skip-checks: true
2022-04-29 11:36:13 +00:00
Jaco c9cd6898fe Bump TS (#637) 2022-04-29 14:33:40 +03:00
github-actions[bot] 106f2aac72 [CI Skip] release/beta 2.0.2-1
skip-checks: true
2022-04-27 07:41:11 +00:00
Jaco 16dbecf0d2 Bump @polkadot/dev (#636)
* Bump @polkadot/dev

* Rebump dev

* Add crypto polyfill

* Adjust expectations
2022-04-27 10:38:13 +03:00
github-actions[bot] dc023fe2c6 [CI Skip] release/beta 2.0.2-0
skip-checks: true
2022-04-23 07:00:05 +00:00
Jaco 6c2d03a6c5 Remove jsx-runtime alias for React 18 (#635)
* Remove jsx-runtime alias for React 18

* Adjust override

* s/cb/fn/
2022-04-23 09:57:36 +03:00
github-actions[bot] e4787f1b25 [CI Skip] release/stable 2.0.1
skip-checks: true
2022-04-09 08:00:12 +00:00
Jaco 779fedd4ae 2.0.1 (#633) 2022-04-09 10:57:41 +03:00
github-actions[bot] 08d71f0675 [CI Skip] release/beta 1.4.2-2
skip-checks: true
2022-04-06 13:03:58 +00:00
Jaco e598c7bb42 Make icon generation more robust (#632)
* Make icon generation more robust

* Update packages/ui-shared/src/icons/polkadot.ts
2022-04-06 16:00:26 +03:00
github-actions[bot] fb360420e5 [CI Skip] release/beta 1.4.2-1
skip-checks: true
2022-04-06 12:51:35 +00:00
Jaco 2184bb5adc Bump deps (#631) 2022-04-06 15:48:56 +03:00
github-actions[bot] 854e812ef3 [CI Skip] release/beta 1.4.2-0
skip-checks: true
2022-04-05 06:34:05 +00:00
Jaco cc17aa3fc3 Bump @polkadot/dev (#630) 2022-04-05 09:31:31 +03:00
github-actions[bot] d57a700d40 [CI Skip] release/stable 1.4.1
skip-checks: true
2022-03-27 08:52:24 +00:00
Jaco 37c398b1a7 1.4.1 (#629) 2022-03-27 11:49:56 +03:00
github-actions[bot] 2f27f2bac9 [CI Skip] release/beta 1.3.2-1
skip-checks: true
2022-03-27 06:27:47 +00:00
Jaco 090218d0b9 Bump TypeScript (#628) 2022-03-27 09:24:50 +03:00
github-actions[bot] 4799a69823 [CI Skip] release/beta 1.3.2-0
skip-checks: true
2022-03-23 05:55:21 +00:00
Jaco 6548982bb5 Bump dev (#627) 2022-03-23 07:52:25 +02:00
github-actions[bot] d1fe833d0f [CI Skip] release/stable 1.3.1
skip-checks: true
2022-03-19 09:38:09 +00:00
Jaco 60c6168307 1.3.1 (#626) 2022-03-19 11:35:11 +02:00
github-actions[bot] d0b418f4c8 [CI Skip] release/beta 1.2.2-0
skip-checks: true
2022-03-17 05:38:29 +00:00
Jaco bce751eea1 Bump dev deps (#625) 2022-03-17 07:36:01 +02:00
github-actions[bot] 0029165ce2 [CI Skip] release/stable 1.2.1
skip-checks: true
2022-03-12 08:33:20 +00:00
Jaco c4be7219ae 1.2.1 (#624) 2022-03-12 10:30:52 +02:00
github-actions[bot] 4755cd9f64 [CI Skip] release/beta 1.1.2-10
skip-checks: true
2022-03-10 08:01:47 +00:00
Jaco 2f7fd73daf Bump deps (#623) 2022-03-10 09:58:35 +02:00
github-actions[bot] 99337bebd4 [CI Skip] release/beta 1.1.2-9
skip-checks: true
2022-03-07 08:18:05 +00:00
Jaco 2331d7c92b Support bundlers where import.meta.url is undefined (#622) 2022-03-07 10:15:10 +02:00
github-actions[bot] ece28e79b4 [CI Skip] release/beta 1.1.2-8
skip-checks: true
2022-03-04 07:43:17 +00:00
Jaco 00538595c1 Adjust auto actions (#621)
* Adjust auto actions

* Adjust
2022-03-04 09:40:58 +02:00
github-actions[bot] b36d8ca632 [CI Skip] release/beta 1.1.2-7
skip-checks: true
2022-03-03 09:31:14 +00:00
Jaco f4f815434f Remove checkout from auto-{approve, merge} actions (#620) 2022-03-03 11:28:04 +02:00
github-actions[bot] a1f64b8ac6 [CI Skip] release/beta 1.1.2-6
skip-checks: true
2022-03-02 05:23:28 +00:00
Jaco 2cd4e2d45e Replace mergify with action (#619) 2022-03-02 07:20:49 +02:00
github-actions[bot] f622b77400 [CI Skip] release/beta 1.1.2-5
skip-checks: true
2022-03-01 10:17:36 +00:00
Jaco 5616acf038 Bump TS (#618) 2022-03-01 10:14:37 +00:00
github-actions[bot] ca64769cd1 [CI Skip] release/beta 1.1.2-4
skip-checks: true
2022-02-28 07:08:22 +00:00
Jaco edbb65f1a5 Adjust approve workflow (#617)
* Adjust approve workflow

* Update .github/workflows/approve.yml
2022-02-28 07:05:56 +00:00
github-actions[bot] 7b7cd6a32a [CI Skip] release/beta 1.1.2-3
skip-checks: true
2022-02-23 10:36:23 +00:00
Jaco 278fb511f0 Skip job on non-local repo 2022-02-23 12:33:49 +02:00
github-actions[bot] 8604939a2f [CI Skip] release/beta 1.1.2-2
skip-checks: true
2022-02-23 10:03:02 +00:00
Jaco e6f5b3f161 Use jacogr/action-approve (#616) 2022-02-23 12:00:07 +02:00
github-actions[bot] e9fec39840 [CI Skip] release/beta 1.1.2-1
skip-checks: true
2022-02-16 07:17:13 +00:00
Jaco 3d925abc02 Bump deps (#615) 2022-02-16 07:14:11 +00:00
github-actions[bot] 84baf9e8cc [CI Skip] release/beta 1.1.2-0
skip-checks: true
2022-02-15 07:26:41 +00:00
Jaco f8e4de56d2 Add mergify (#614) 2022-02-15 09:24:20 +02:00
github-actions[bot] 1205cebcf9 [CI Skip] release/stable 1.1.1
skip-checks: true
2022-02-14 08:00:15 +00:00
Jaco 6e20fbf5ac 1.1.1 (#613) 2022-02-14 09:57:22 +02:00
github-actions[bot] 3ee4e229c4 [CI Skip] release/beta 1.0.2-3
skip-checks: true
2022-02-13 12:52:50 +00:00
Jaco 35d14ce9ed Don't run scripts on CI (#612)
* Don't run scripts on CI

* Bump deps
2022-02-13 14:50:19 +02:00
github-actions[bot] d4947f0408 [CI Skip] release/beta 1.0.2-2
skip-checks: true
2022-02-10 05:23:52 +00:00
Jaco a85419a50f Bump dev deps (#610) 2022-02-10 07:20:48 +02:00
github-actions[bot] 44b7a41948 [CI Skip] release/beta 1.0.2-1
skip-checks: true
2022-02-01 07:42:12 +00:00
Jaco cd936ed89c timerDelay property to QR display for frame timing (#608)
* timerDelay property to QR display for frame timing

* Bump deps
2022-02-01 09:39:41 +02:00
github-actions[bot] 184a6293cc [CI Skip] release/beta 1.0.2-0
skip-checks: true
2022-02-01 07:07:44 +00:00
Jaco 6a279beff3 Adjust QR state/timeout ordering (#607)
* Adjust QR state/timeout ordering

* CHANGELOG
2022-02-01 09:05:09 +02:00
Jaco 35c8535be1 Cleanup webpack example configs (#606)
* Remove Buffer/process plugins

* Adjust

* Cleanup README
2022-01-29 11:54:55 +02:00
github-actions[bot] 7a04464686 [CI Skip] release/stable 1.0.1
skip-checks: true
2022-01-29 07:07:50 +00:00
Jaco ebac0cda56 1.0.1 (#605) 2022-01-29 09:05:20 +02:00
github-actions[bot] 6cef850c7b [CI Skip] release/beta 0.89.4-1
skip-checks: true
2022-01-29 06:39:44 +00:00
Jaco 4ab2b3fea6 Remove Ledger export in ui-keyring (#604) 2022-01-29 08:37:10 +02:00
github-actions[bot] c03cfde36b [CI Skip] release/beta 0.89.4-0
skip-checks: true
2022-01-28 05:58:22 +00:00
Jaco be0c446248 Bump deps (#603) 2022-01-28 07:55:47 +02:00
github-actions[bot] 8951958a18 [CI Skip] release/stable 0.89.3
skip-checks: true
2022-01-23 06:50:44 +00:00
Jaco 0d8151f34c 0.89.3 (#601) 2022-01-23 08:48:00 +02:00
github-actions[bot] 05fb9e5a74 [CI Skip] release/beta 0.89.3-1
skip-checks: true
2022-01-22 11:56:43 +00:00
Jaco 6505e28bed Bump deps (#600) 2022-01-22 13:54:05 +02:00
github-actions[bot] c3f102304e [CI Skip] release/beta 0.89.3-0
skip-checks: true
2022-01-19 12:23:39 +00:00
Jaco c2eab17f1e Bump 3rd party deps (#599)
* Bump 3rd party deps

* Rebump dev
2022-01-19 14:20:12 +02:00
github-actions[bot] ac6322ba9d [CI Skip] release/stable 0.89.2
skip-checks: true
2022-01-15 11:19:46 +00:00
Jaco dcd3d3ece3 0.89.2 (#598) 2022-01-15 13:16:55 +02:00
github-actions[bot] f78632ee47 [CI Skip] release/beta 0.89.2-6
skip-checks: true
2022-01-15 11:09:23 +00:00
Jaco ba5348857d @polkadot/util 8.3.2 (incl. all from common repo) (#597) 2022-01-15 13:06:03 +02:00
github-actions[bot] d933007065 [CI Skip] release/beta 0.89.2-5
skip-checks: true
2022-01-14 10:20:26 +00:00
Jaco 8429133ad1 Manual format of tsconfig.build.json (#596) 2022-01-14 12:17:51 +02:00
github-actions[bot] 3d4aed84ae [CI Skip] release/beta 0.89.2-4
skip-checks: true
2022-01-14 05:35:26 +00:00
Jaco 2db0a2156c Bump dependencies (#595) 2022-01-14 07:32:17 +02:00
github-actions[bot] 785582716c [CI Skip] release/beta 0.89.2-3
skip-checks: true
2022-01-13 08:10:55 +00:00
Jaco a08209f745 Update .mailmap 2022-01-13 10:07:31 +02:00
github-actions[bot] 910ea2be7f [CI Skip] release/beta 0.89.2-2
skip-checks: true
2022-01-12 09:19:27 +00:00
Jaco 1c9b7d7f36 Align tsconfig.build.json with other polkadot-js (#594) 2022-01-12 11:16:18 +02:00
github-actions[bot] b5c6468f17 [CI Skip] release/beta 0.89.2-1
skip-checks: true
2022-01-12 05:33:43 +00:00
Jaco 8e2ae1f5d9 Bump dev (w/ contrib update) (#593) 2022-01-12 07:30:22 +02:00
github-actions[bot] cc35de0536 [CI Skip] release/beta 0.89.2-0
skip-checks: true
2022-01-11 07:06:25 +00:00
Jaco 3951fa7499 Add tsconfig.build (#591) 2022-01-11 09:03:28 +02:00
github-actions[bot] 5caa168bf7 [CI Skip] release/stable 0.89.1
skip-checks: true
2022-01-09 06:49:55 +00:00
Jaco 89de8d44d3 0.89.1 (#589) 2022-01-09 08:47:11 +02:00
github-actions[bot] aa38aadec7 [CI Skip] release/beta 0.88.2-4
skip-checks: true
2022-01-07 11:07:20 +00:00
Jaco 2ca72741a5 Bump util* (#588) 2022-01-07 13:04:38 +02:00
github-actions[bot] 34ec0a54f7 [CI Skip] release/beta 0.88.2-3
skip-checks: true
2022-01-06 06:08:00 +00:00
Jaco 61600fcf26 Bump dev (w/ detectPackage) (#587) 2022-01-06 08:04:39 +02:00
github-actions[bot] c29242a872 [CI Skip] release/beta 0.88.2-2
skip-checks: true
2022-01-05 07:01:18 +00:00
Jaco 3208f02cf5 Bump dev (#586) 2022-01-05 08:58:39 +02:00
github-actions[bot] 85b41503fe [CI Skip] release/beta 0.88.2-1
skip-checks: true
2022-01-04 10:21:43 +00:00
Jaco ff9d8680c3 fetch-depth 0 (#585) 2022-01-04 12:18:38 +02:00
github-actions[bot] 6467ab8791 [CI Skip] release/beta 0.88.2-0
skip-checks: true
2022-01-02 17:14:29 +00:00
Jaco dcd9b1b691 Remove lint rule overrides (#583)
* Remove lint rule overrides

* Swap to base rules
2022-01-02 19:11:06 +02:00
github-actions[bot] 81b8116742 [CI Skip] release/stable 0.88.1
skip-checks: true
2022-01-02 07:36:11 +00:00
Jaco cbbe125da9 0.88.1 (#582)
* 0.88.1

* Apply bundle where missing
2022-01-02 09:33:26 +02:00
github-actions[bot] ea29793d8d [CI Skip] release/beta 0.87.8-8
skip-checks: true
2022-01-01 16:31:23 +00:00
Jaco 6f423bb250 2022 (#581) 2022-01-01 18:28:21 +02:00
github-actions[bot] c814d719a1 [CI Skip] release/beta 0.87.8-7
skip-checks: true
2022-01-01 08:48:01 +00:00
Jaco a5e321f78f Bump dev (#580) 2022-01-01 10:45:20 +02:00
github-actions[bot] 4c3b99c9c6 [CI Skip] release/beta 0.87.8-6
skip-checks: true
2022-01-01 07:29:56 +00:00
Jaco b06e35bd03 2022 (#579) 2022-01-01 09:26:28 +02:00
github-actions[bot] bbc5916770 [CI Skip] release/beta 0.87.8-5
skip-checks: true
2021-12-31 15:27:24 +00:00
Jaco 2275440f87 Introduce detectOther (#578) 2021-12-31 17:24:48 +02:00
github-actions[bot] f48ba44a88 [CI Skip] release/beta 0.87.8-4
skip-checks: true
2021-12-31 13:10:19 +00:00
Jaco 0467c16bee Mock __dirname via cjs import (#577)
* Mock __dirname via cjs import

* CHANGELOG
2021-12-31 15:07:43 +02:00
github-actions[bot] 757b138977 [CI Skip] release/beta 0.87.8-3
skip-checks: true
2021-12-31 07:58:58 +00:00
Jaco cfc85f7aa4 Bump babel (#576) 2021-12-31 09:56:15 +02:00
github-actions[bot] 8d18f1d131 [CI Skip] release/beta 0.87.8-2
skip-checks: true
2021-12-30 10:17:10 +00:00
Jaco 0570a776b9 Adjust keyring load with additional hashes (#574) 2021-12-30 12:14:18 +02:00
github-actions[bot] 597b9ae61f [CI Skip] release/beta 0.87.8-1
skip-checks: true
2021-12-29 05:29:12 +00:00
Jaco aff8ae42ad Bump deps (#573) 2021-12-29 07:26:05 +02:00
github-actions[bot] 0729402ef6 [CI Skip] release/beta 0.87.8-0
skip-checks: true
2021-12-28 07:32:19 +00:00
Jaco 2904beb171 Support for multi genesisHash in keyring accounts (#481)
* Support for multi genesisHash in keyring accounts

* genesis

* Only single in keyring
2021-12-28 09:29:03 +02:00
191 changed files with 4784 additions and 5027 deletions
+1
View File
@@ -0,0 +1 @@
2.8.2
+11 -4
View File
@@ -1,10 +1,11 @@
2
0.57.20.57.3
3
0.57.2
0.57.3
0.66.2
0.66.3
0.71.2
0.71.3
0.84.2
0.84.3
0.85.2
@@ -22,4 +23,10 @@
0.87.4
0.87.5
0.87.6
0.87.7
0.87.7
0.89.2
0.89.3
2.6.2
2.7.2
2.8.2
+19
View File
@@ -0,0 +1,19 @@
// Copyright 2017-2022 @polkadot/ui authors & contributors
// SPDX-License-Identifier: Apache-2.0
const base = require('@polkadot/dev/config/eslint.cjs');
module.exports = {
...base,
ignorePatterns: [
...base.ignorePatterns,
'jest/**/*',
'**/*.d.ts'
],
parserOptions: {
...base.parserOptions,
project: [
'./tsconfig.eslint.json'
]
}
};
-27
View File
@@ -1,27 +0,0 @@
// Copyright 2017-2021 @polkadot/ui authors & contributors
// SPDX-License-Identifier: Apache-2.0
const base = require('@polkadot/dev/config/eslint.cjs');
module.exports = {
...base,
ignorePatterns: [
...base.ignorePatterns,
'**/*.d.ts'
],
parserOptions: {
...base.parserOptions,
project: [
'./tsconfig.eslint.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
@@ -0,0 +1,86 @@
<!--
For general support, howto, coding and bundling questions, please
use the Substrate & Polkadot StackExchange at
https://substrate.stackexchange.com/
and get other ecosystem developers involved. This issues in this
repository are meant for the tracking of feature requests and bug
reports.
While all issues are looked at non-bug and non-features would take
quite a bit longer to get to and may yield less than satisfactory
responses in this format.
Additionally, please ensure you have done a search on the existing
and closed issues before logging a new request. This saves time on
all sides.
-->
* **I'm submitting a ...**
<!---
REQUIRED:
Classify the type of report your are submitting
-->
- [ ] Bug report
- [ ] Feature request
- [ ] Support request
- [ ] Other
* **What is the current behavior and expected behavior?**
<!---
REQUIRED:
If you're describing a bug, tell us what should happen. If you're
suggesting a change/improvement, tell us how it should work.
-->
* **What is the motivation for changing the behavior?**
<!---
OPTIONAL:
Suggest a motivation for the request or ideas how to implement the
addition or change
-->
* **Please tell us about your environment:**
<!---
REQUIRED:
Include as many relevant details about the environment in which you
experienced the issue. Also ensure that you have tested against the
latest stable releases if you believe this to be a bug
-->
- Version:
- Environment:
- [ ] Node.js
- [ ] Browser
- [ ] Other (limited support for other environments)
- Language:
- [ ] JavaScript
- [ ] TypeScript (include tsc --version)
- [ ] Other
+16
View File
@@ -0,0 +1,16 @@
name: bot
on:
pull_request:
types: [labeled]
jobs:
approve:
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: jacogr/action-approve@master
with:
authors: jacogr
labels: -auto
token: ${{ secrets.GH_PAT_BOT }}
+16
View File
@@ -0,0 +1,16 @@
name: bot
on:
pull_request:
types: [labeled]
jobs:
merge:
runs-on: ubuntu-latest
steps:
- uses: jacogr/action-merge@master
with:
checks: build,lint,test
labels: -auto
strategy: squash
token: ${{ secrets.GH_PAT_BOT }}
+2
View File
@@ -7,6 +7,8 @@ on:
jobs:
lock:
runs-on: ubuntu-latest
env:
YARN_ENABLE_SCRIPTS: false
steps:
- uses: dessant/lock-threads@v2
with:
+2
View File
@@ -8,6 +8,8 @@ jobs:
step: ['lint', 'test', 'build']
name: ${{ matrix.step }}
runs-on: ubuntu-latest
env:
YARN_ENABLE_SCRIPTS: false
steps:
- uses: actions/checkout@v2
- name: ${{ matrix.step }}
+7 -5
View File
@@ -12,16 +12,18 @@ jobs:
step: ['build:release']
name: ${{ matrix.step }}
runs-on: ubuntu-latest
env:
YARN_ENABLE_SCRIPTS: false
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
GH_PAT: ${{ secrets.GH_PAT }}
GH_RELEASE_GITHUB_API_TOKEN: ${{ secrets.GH_PAT }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
token: ${{ secrets.GH_PAT }}
- name: ${{ matrix.step }}
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
GH_PAT: ${{ secrets.GH_PAT }}
GH_RELEASE_GITHUB_API_TOKEN: ${{ secrets.GH_PAT }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
yarn install --immutable | grep -v 'YN0013'
yarn ${{ matrix.step }}
+2
View File
@@ -9,6 +9,8 @@ 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
env:
YARN_ENABLE_SCRIPTS: false
steps:
- uses: actions/checkout@v2
- uses: returntocorp/semgrep-action@v1
+2
View File
@@ -6,6 +6,8 @@ on:
jobs:
stale:
runs-on: ubuntu-latest
env:
YARN_ENABLE_SCRIPTS: false
steps:
- uses: actions/stale@v3
with:
+2
View File
@@ -1,4 +1,6 @@
build/
build-cjs/
build-esm/
build-docs/
coverage/
node_modules/
+3
View File
@@ -0,0 +1,3 @@
Jaco <jacogr@gmail.com>
github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> <action@github.com>
github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Github Actions <action@github.com>
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/ui authors & contributors
// Copyright 2017-2022 @polkadot/ui authors & contributors
// SPDX-License-Identifier: Apache-2.0
module.exports = require('@polkadot/dev/config/prettier.cjs');
-768
View File
File diff suppressed because one or more lines are too long
+785
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -10,4 +10,4 @@ plugins:
- path: .yarn/plugins/@yarnpkg/plugin-version.cjs
spec: "@yarnpkg/plugin-version"
yarnPath: .yarn/releases/yarn-3.1.1.cjs
yarnPath: .yarn/releases/yarn-3.2.0.cjs
+166
View File
@@ -1,5 +1,171 @@
# CHANGELOG
## 2.8.2 Jul 10, 2022
Changes:
- Bump to `@polkadot/util` 10.0.2
## 2.8.1 Jul 9, 2022
Changes:
- Bump to `@polkadot/util` 10.0.1
## 2.7.2 Jul 4, 2022
Changes:
- Bump to `@polkadot/util-crypto` 9.7.2 (w/ `@polkadot/wasm-crypto` 6.2.2)
## 2.7.1 Jul 1, 2022
Contributed:
- Remove extra div wrappers in `vue-identicon` (Thanks to https://github.com/dcolley)
Changes:
- Upgrade to `@polkadot/{hw-ledger, keyring, util, util-crypto}` 9.7.1
## 2.6.2 Jun 25, 2022
Changes:
- Upgrade to `@polkadot/{hw-ledger, keyring, util, util-crypto}` 9.6.2
## 2.6.1 Jun 23, 2022
Changes:
- Upgrade to `@polkadot/{hw-ledger, keyring, util, util-crypto}` 9.6.1
- Upgrade libs to latest stable versions
## 2.5.1 Jun 19, 2022
Changes:
- Upgrade to `@polkadot/{hw-ledger, keyring, util, util-crypto}` 9.5.1
- Upgrade libs to latest stable versions
## 2.4.1 Jun 4, 2022
Changes:
- Upgrade to `@polkadot/{hw-ledger, keyring, util, util-crypto}` 9.4.1
## 2.3.1 May 30, 2022
Changes:
- Upgrade to `@polkadot/{hw-ledger, keyring, util, util-crypto}` 9.3.1
## 2.2.1 May 14, 2022
Changes:
- Upgrade to `@polkadot/{hw-ledger, keyring, util, util-crypto}` 9.2.1
## 2.1.1 Apr 30, 2022
Changes:
- Upgrade to `@polkadot/{hw-ledger, keyring, util, util-crypto}` 9.1.1
- Adjust Jest test init for latest `@polkadot/dev`
## 2.0.1 Apr 9, 2022
- **Breaking change** In this major version the commonjs outputs are moved to a sub-folder. Since the export map and main field in package.json does reflect this change, there should be no usage changes. However the packages here will all need to be on the same version for internal linkage.
Changes:
- Adjust Polkadot icon generation with lazy init
- Output commonjs files under the `cjs/**` root
- Upgrade to `@polkadot/{hw-ledger, keyring, util, util-crypto}` 9.0.1
## 1.4.1 Mar 27, 2022
Changes:
- Updated to `@polkadot/{hw-ledger, keyring, util, util-crypto}` 8.7.1
## 1.3.1 Mar 19, 2022
Changes:
- Updated to `@polkadot/{hw-ledger, keyring, util, util-crypto}` 8.6.1
- Additional workaround for Vite bundling
## 1.2.1 Mar 12, 2022
Changes:
- Adjust for bundlers where `import.meta.url` is undefined
- Updated to `@polkadot/{hw-ledger, keyring, util, util-crypto}` 8.5.1
## 1.1.1 Feb 14, 2022
Changes:
- Adjust ordering in state & timeouts for QR display
- Add `timerDelay` property to QR display to control frame timeouts
- Adjust webpack example config (cleanups, remove unneeded plugins)
- Updated to `@polkadot/{hw-ledger, keyring, util, util-crypto}` 8.4.1
## 1.0.1 Jan 29, 2022
**Breaking change** The `Ledger` export from `@polkadot/ui-keyring` has been removed. For users of this class, import it directly from `@polkadot/hw-ledger`
**Important** This is the first release in the long-outstanding `1.x` range. Apart from the notable breaking changes, it has no functional differences to the previous versions.
Changes:
- Remove `Ledger` export in `ui-keyring`
## 0.89.3 Jan 23, 2022
Changes:
- Updated to `@polkadot/{hw-ledger, keyring, util, util-crypto}` 8.3.3
## 0.89.2 Jan 15, 2022
Changes:
- Updated to `@polkadot/{hw-ledger, keyring, util, util-crypto}` 8.3.2
## 0.89.1 Jan 9, 2022
Changes:
- Updated to `@polkadot/{hw-ledger, keyring, util, util-crypto}` 8.3.1
## 0.88.1 Jan 2, 2022
- Allow for loading of accounts on additional genesisHashes
- Ensure package path is availble under ESM & CJS
## 0.87.7 Dec 27, 2021
Changes:
+34
View File
@@ -0,0 +1,34 @@
628 Jaco 2.8.2 (#664)
7 YJ fix #224: decrease frame size to 1024, set multipart bool (#225)
4 Antoine Estienne Refactor logic to better use prefix (#491)
4 kwingram25 fix ff api url issue (#289)
4 Thibaut Sardan store hardware wallets (#431)
3 Luke Sugiura remove language options (#244)
3 Stefanie Doll Replace isUndefined util with explicit typeof check (#107)
2 Drew Stone Add Edgeware testnet and mainnet updated endpoints (#274)
2 Hanwen Cheng allow qr to scan seed qr (#330)
2 Nikos Kontakis Fix undefined process error that may appear when using ui (#524)
2 Vlad Proshchavaiev Add Subsocial to ss58 defaults (#358)
2 Xiliang Chen Update UNfrastructure node label (#160)
2 雪霁 Batch export patch up (#455)
1 Adam Dossa Add Polymesh Ledger Integration (#427)
1 Alex Siman Fix typo in README: stiorage -> storage (#69)
1 Alexander Krupenkin Added ECDSA crypto type (#313)
1 Andrei Eres Fix raising error if process has not defined yet (#548)
1 Axel Chalon Simplify KeyringAddress interface (#144)
1 Cameron Franz react-native example app port (#223)
1 carumusan Add kulupu (#342)
1 Derek Colley Remove redundant `div` wrappers in vue-identicon (#643)
1 Harry Liu Update README.md (#166)
1 Jake Naviasky Add Edgeware chain prefix to settings. (#317)
1 Logan Saether Propose W3F node (#188)
1 Lovesh Harchandani Allow Ledger support for Dock (#425)
1 Luke Schoen Fix typo in heading (#114)
1 Nantian fix bigint type (#510)
1 Nikhil Ranjan Updated to valid javascript (#271)
1 Shawn Tabrizi Add a new `notification` setting (#498)
1 Wei Tang Add Kulupu to the network selection list (#254)
1 WoeOm add darwinia ss58 (#379)
1 yuhui1208 [Stores] make FileStroe read key safely (#338)
1 Yuri Add webpack 5 support (#557)
1 菩提 fix some bugs (#260)
-1
View File
@@ -30,5 +30,4 @@ Additionally some shared libraries, that is not dependent on any framework -
In addition to the above packages, there are examples available for intergation of `ui-keyring`, `ui-settings` & the relevant `*-identicon` package. These are
- [example-react](packages/example-react) - start with `yarn example:react` and view on `http://localhost:8080`
- [example-reactnative](packages/exampleReactNative) - start with `yarn example:rn:packager` to start the packager service and then either `yarn example:rn:android` or `yarn example:rn:ios` in another terminal
- [example-vue](packages/example-vue) - start with `yarn example:vue` and view on `http://localhost:8080`
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/ui authors & contributors
// Copyright 2017-2022 @polkadot/ui authors & contributors
// SPDX-License-Identifier: Apache-2.0
const base = require('@polkadot/dev/config/babel-config-cjs.cjs');
+2 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/ui authors & contributors
// Copyright 2017-2022 @polkadot/ui authors & contributors
// SPDX-License-Identifier: Apache-2.0
const config = require('@polkadot/dev/config/jest.cjs');
@@ -12,5 +12,6 @@ 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'
},
setupFilesAfterEnv: ['<rootDir>/jest/setupEnv.js'],
testEnvironment: 'jsdom'
};
+10
View File
@@ -0,0 +1,10 @@
// Copyright 2017-2022 @polkadot/ui authors & contributors
// SPDX-License-Identifier: Apache-2.0
const nodeCrypto = require('crypto');
window.crypto = {
getRandomValues: function (buffer) {
return nodeCrypto.randomFillSync(buffer);
}
};
+19 -23
View File
@@ -2,15 +2,16 @@
"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",
"license": "Apache-2.0",
"packageManager": "yarn@3.2.0",
"private": true,
"repository": {
"type": "git",
"url": "https://github.com/polkadot-js/ui.git"
},
"sideEffects": false,
"version": "0.87.7",
"type": "module",
"version": "2.8.2",
"workspaces": [
"packages/*"
],
@@ -19,39 +20,34 @@
"build:release": "polkadot-ci-ghact-build",
"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: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",
"example:react": "yarn build && cd packages/example-react && webpack --config webpack.config.cjs",
"example:vue": "yarn build && cd packages/example-vue && webpack --config webpack.config.cjs",
"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.16.5",
"@babel/runtime": "^7.16.5",
"@polkadot/dev": "^0.64.22",
"@polkadot/x-bundle": "^8.2.2",
"@types/jest": "^27.0.3",
"babel-loader": "^8.2.3",
"@babel/core": "^7.18.6",
"@babel/runtime": "^7.18.6",
"@polkadot/dev": "^0.67.68",
"@polkadot/x-bundle": "^10.0.2",
"@types/jest": "^28.1.4",
"babel-loader": "^8.2.5",
"babel-plugin-transform-vue-template": "^0.4.2",
"empty": "^0.10.1",
"process": "^0.11.10",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-is": "^17.0.2",
"react-native": "^0.66.4",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-is": "^18.2.0",
"react-native": "^0.69.1",
"stream-browserify": "^3.0.0",
"vue-template-compiler": "^2.6.14",
"webpack": "^5.65.0",
"webpack-cli": "^4.9.1",
"webpack": "^5.73.0",
"webpack-cli": "^4.10.0",
"webpack-serve": "^4.0.0"
},
"resolutions": {
"typescript": "^4.5.3"
"typescript": "^4.7.4"
}
}
+2 -2
View File
@@ -14,9 +14,9 @@
"url": "https://github.com/polkadot-js/ui.git"
},
"sideEffects": false,
"version": "0.87.7",
"version": "2.8.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.16.5"
"@babel/runtime": "^7.18.6"
}
}
@@ -0,0 +1,6 @@
// Copyright 2017-2022 @polkadot/example-react authors & contributors
// SPDX-License-Identifier: Apache-2.0
// Empty template, auto-generated by @polkadot/dev
export default [];
@@ -0,0 +1,11 @@
// Copyright 2017-2022 @polkadot/example-react authors & contributors
// SPDX-License-Identifier: Apache-2.0
// Do not edit, auto-generated by @polkadot/dev
import { detectPackage } from '@polkadot/util';
import others from './detectOther';
import { packageInfo } from './packageInfo';
detectPackage(packageInfo, null, others);
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/example-react authors & contributors
// Copyright 2017-2022 @polkadot/example-react authors & contributors
// SPDX-License-Identifier: Apache-2.0
import React, { useCallback, useEffect, useState } from 'react';
+3 -3
View File
@@ -1,6 +1,6 @@
// Copyright 2017-2021 @polkadot/example-react authors & contributors
// Copyright 2017-2022 @polkadot/example-react authors & contributors
// SPDX-License-Identifier: Apache-2.0
// Auto-generated by @polkadot/dev, do not edit
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/example-react', version: '0.87.7' };
export const packageInfo = { name: '@polkadot/example-react', path: 'auto', type: 'auto', version: '2.8.2' };
@@ -6,7 +6,7 @@
"rootDir": "./src"
},
"references": [
{ "path": "../react-identicon" },
{ "path": "../ui-keyring" }
{ "path": "../react-identicon/tsconfig.build.json" },
{ "path": "../ui-keyring/tsconfig.build.json" }
]
}
@@ -1,9 +1,8 @@
// Copyright 2017-2021 @polkadot/example-react authors & contributors
// Copyright 2017-2022 @polkadot/example-react authors & contributors
// SPDX-License-Identifier: Apache-2.0
const path = require('path');
const { WebpackPluginServe } = require('webpack-plugin-serve');
const webpack = require('webpack');
module.exports = {
context: __dirname,
@@ -37,12 +36,6 @@ module.exports = {
port: 8080,
progress: false, // since we have hmr off, disable
static: __dirname
}),
new webpack.ProvidePlugin({
Buffer: ['buffer', 'Buffer']
}),
new webpack.ProvidePlugin({
process: 'process/browser'
})
],
resolve: {
@@ -50,15 +43,11 @@ module.exports = {
'@polkadot/react-identicon': path.resolve(__dirname, '../react-identicon/build'),
'@polkadot/ui-keyring': path.resolve(__dirname, '../ui-keyring/build'),
'@polkadot/ui-settings': path.resolve(__dirname, '../ui-settings/build'),
'@polkadot/ui-shared': path.resolve(__dirname, '../ui-shared/build'),
'process/browser': require.resolve('process/browser'),
'react/jsx-runtime': require.resolve('react/jsx-runtime')
'@polkadot/ui-shared': path.resolve(__dirname, '../ui-shared/build')
},
extensions: ['.js', '.ts', '.tsx'],
fallback: {
buffer: require.resolve('buffer'),
stream: require.resolve('stream-browserify')
}
fallback: {}
},
target: 'web',
watch: true
};
+2 -2
View File
@@ -14,9 +14,9 @@
"url": "https://github.com/polkadot-js/ui.git"
},
"sideEffects": false,
"version": "0.87.7",
"version": "2.8.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.16.5"
"@babel/runtime": "^7.18.6"
}
}
+6
View File
@@ -0,0 +1,6 @@
// Copyright 2017-2022 @polkadot/example-vue authors & contributors
// SPDX-License-Identifier: Apache-2.0
// Empty template, auto-generated by @polkadot/dev
export default [];
+11
View File
@@ -0,0 +1,11 @@
// Copyright 2017-2022 @polkadot/example-vue authors & contributors
// SPDX-License-Identifier: Apache-2.0
// Do not edit, auto-generated by @polkadot/dev
import { detectPackage } from '@polkadot/util';
import others from './detectOther';
import { packageInfo } from './packageInfo';
detectPackage(packageInfo, null, others);
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/example-vue authors & contributors
// Copyright 2017-2022 @polkadot/example-vue authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Prefix } from '@polkadot/util-crypto/address/types';
+3 -3
View File
@@ -1,6 +1,6 @@
// Copyright 2017-2021 @polkadot/example-vue authors & contributors
// Copyright 2017-2022 @polkadot/example-vue authors & contributors
// SPDX-License-Identifier: Apache-2.0
// Auto-generated by @polkadot/dev, do not edit
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/example-vue', version: '0.87.7' };
export const packageInfo = { name: '@polkadot/example-vue', path: 'auto', type: 'auto', version: '2.8.2' };
@@ -6,7 +6,7 @@
"rootDir": "./src"
},
"references": [
{ "path": "../ui-shared" },
{ "path": "../ui-settings" }
{ "path": "../ui-keyring/tsconfig.build.json" },
{ "path": "../vue-identicon/tsconfig.build.json" }
]
}
@@ -1,10 +1,8 @@
// Copyright 2017-2021 @polkadot/example-vue authors & contributors
// Copyright 2017-2022 @polkadot/example-vue authors & contributors
// SPDX-License-Identifier: Apache-2.0
const path = require('path');
const VueLoaderPlugin = require('vue-loader/lib/plugin');
const { WebpackPluginServe } = require('webpack-plugin-serve');
const webpack = require('webpack');
module.exports = {
context: __dirname,
@@ -22,10 +20,6 @@ module.exports = {
options: require('../../babel.config.cjs')
}
]
},
{
loader: 'vue-loader',
test: /\.vue$/
}
]
},
@@ -42,13 +36,6 @@ module.exports = {
port: 8080,
progress: false, // since we have hmr off, disable
static: __dirname
}),
new VueLoaderPlugin(),
new webpack.ProvidePlugin({
Buffer: ['buffer', 'Buffer']
}),
new webpack.ProvidePlugin({
process: 'process/browser'
})
],
resolve: {
@@ -56,10 +43,10 @@ module.exports = {
'@polkadot/ui-keyring': path.resolve(__dirname, '../ui-keyring/build'),
'@polkadot/ui-settings': path.resolve(__dirname, '../ui-settings/build'),
'@polkadot/ui-shared': path.resolve(__dirname, '../ui-shared/build'),
'@polkadot/vue-identicon': path.resolve(__dirname, '../vue-identicon/build'),
'process/browser': require.resolve('process/browser')
'@polkadot/vue-identicon': path.resolve(__dirname, '../vue-identicon/build')
},
extensions: ['.js', '.ts', '.tsx']
},
target: 'web',
watch: true
};
+12 -12
View File
@@ -17,26 +17,26 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "0.87.7",
"version": "2.8.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.16.5",
"@polkadot/keyring": "^8.2.2",
"@polkadot/ui-settings": "0.87.7",
"@polkadot/ui-shared": "0.87.7",
"@polkadot/util": "^8.2.2",
"@polkadot/util-crypto": "^8.2.2",
"@babel/runtime": "^7.18.6",
"@polkadot/keyring": "^10.0.2",
"@polkadot/ui-settings": "2.8.2",
"@polkadot/ui-shared": "2.8.2",
"@polkadot/util": "^10.0.2",
"@polkadot/util-crypto": "^10.0.2",
"color": "^3.2.1",
"ethereum-blockies-base64": "^1.0.2",
"jdenticon": "3.1.1",
"react-copy-to-clipboard": "^5.0.4",
"styled-components": "^5.3.3"
"react-copy-to-clipboard": "^5.1.0",
"styled-components": "^5.3.5"
},
"devDependencies": {
"@types/react-copy-to-clipboard": "^5.0.2",
"@types/react-dom": "^17.0.11",
"@types/styled-components": "^5.1.19",
"styled-components": "^5.3.3",
"@types/react-dom": "^18.0.6",
"@types/styled-components": "^5.1.25",
"styled-components": "^5.3.5",
"xmlserializer": "^0.6.1"
},
"peerDependencies": {
-54
View File
@@ -1,54 +0,0 @@
// Copyright 2017-2021 @polkadot/react-identicon authors & contributors
// SPDX-License-Identifier: Apache-2.0
import React from 'react';
import ReactDOM from 'react-dom';
import { encodeAddress, randomAsU8a } from '@polkadot/util-crypto';
import { Identicon } from '.';
const THEMES = ['beachball', 'polkadot', 'substrate'];
export default class Demo extends React.PureComponent {
public override render (): React.ReactNode {
const identities: string[] = [];
while (identities.length !== 50) {
identities.push(
encodeAddress(randomAsU8a(32))
);
}
return (
<div>
<div>
{identities.map((value, index): React.ReactNode => (
<Identicon
key={value.toString()}
theme={THEMES[index % THEMES.length] as 'empty'}
value={value}
/>
))}
</div>
<div>
{THEMES.map((theme): React.ReactNode => (
<Identicon
key={theme}
theme={theme as 'empty'}
value='5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY'
/>
))}
</div>
</div>
);
}
}
const rootElement = document.getElementById('demo');
if (!rootElement) {
throw new Error('Unable to find element with id \'demo\'');
}
ReactDOM.render(<Demo />, rootElement);
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/react-identicon authors & contributors
// Copyright 2017-2022 @polkadot/react-identicon authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Prefix } from '@polkadot/util-crypto/address/types';
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/react-identicon authors & contributors
// Copyright 2017-2022 @polkadot/react-identicon authors & contributors
// SPDX-License-Identifier: Apache-2.0
export * from './icons';
@@ -0,0 +1,7 @@
// Copyright 2017-2022 @polkadot/react-identicon authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { packageInfo as settingsInfo } from '@polkadot/ui-settings/packageInfo';
import { packageInfo as sharedInfo } from '@polkadot/ui-shared/packageInfo';
export default [settingsInfo, sharedInfo];
@@ -1,10 +1,11 @@
// Copyright 2017-2021 @polkadot/react-identicon authors & contributors
// Copyright 2017-2022 @polkadot/react-identicon authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { packageInfo as settingsInfo } from '@polkadot/ui-settings/packageInfo';
import { packageInfo as sharedInfo } from '@polkadot/ui-shared/packageInfo';
// Do not edit, auto-generated by @polkadot/dev
import { detectPackage } from '@polkadot/util';
import others from './detectOther';
import { packageInfo } from './packageInfo';
detectPackage(packageInfo, typeof __dirname !== 'undefined' && __dirname, [settingsInfo, sharedInfo]);
detectPackage(packageInfo, null, others);
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/react-identicon authors & contributors
// Copyright 2017-2022 @polkadot/react-identicon authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Props } from '../types';
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/react-identicon authors & contributors
// Copyright 2017-2022 @polkadot/react-identicon authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Props } from '../types';
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/react-identicon authors & contributors
// Copyright 2017-2022 @polkadot/react-identicon authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Props } from '../types';
@@ -1,18 +1,21 @@
// Copyright 2017-2021 @polkadot/react-identicon authors & contributors
// Copyright 2017-2022 @polkadot/react-identicon authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Props } from '../types';
import * as jdenticon from 'jdenticon';
import React from 'react';
import React, { useMemo } from 'react';
function Identicon ({ className = '', publicKey, size, style }: Props): React.ReactElement<Props> {
const html = useMemo(
() => ({ __html: jdenticon.toSvg(publicKey.substr(2), size) }),
[publicKey, size]
);
return (
<div
className={className}
dangerouslySetInnerHTML={{
__html: jdenticon.toSvg(publicKey.substr(2), size)
}}
dangerouslySetInnerHTML={html}
style={style}
/>
);
@@ -1,4 +1,4 @@
// Copyright 2018-2021 @polkadot/react-identicon authors & contributors
// Copyright 2018-2022 @polkadot/react-identicon authors & contributors
// SPDX-License-Identifier: Apache-2.0
// Copyright 2018 Paritytech via paritytech/oo7/polkadot-identicon
@@ -19,7 +19,7 @@
import type { Circle } from '@polkadot/ui-shared/icons/types';
import type { Props } from '../types';
import React from 'react';
import React, { useMemo } from 'react';
import { polkadotIcon } from '@polkadot/ui-shared';
@@ -36,6 +36,11 @@ function renderCircle ({ cx, cy, fill, r }: Circle, key: number): React.ReactNod
}
function Identicon ({ address, className = '', isAlternative = false, size, style }: Props): React.ReactElement<Props> {
const circles = useMemo(
() => polkadotIcon(address, { isAlternative }),
[address, isAlternative]
);
return (
<svg
className={className}
@@ -46,7 +51,7 @@ function Identicon ({ address, className = '', isAlternative = false, size, styl
viewBox='0 0 64 64'
width={size}
>
{polkadotIcon(address, { isAlternative }).map(renderCircle)}
{circles.map(renderCircle)}
</svg>
);
}
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/react-identicon authors & contributors
// Copyright 2017-2022 @polkadot/react-identicon authors & contributors
// SPDX-License-Identifier: Apache-2.0
export { Beachball } from './Beachball';
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/react-identicon authors & contributors
// Copyright 2017-2022 @polkadot/react-identicon authors & contributors
// SPDX-License-Identifier: Apache-2.0
import './detectPackage';
+3 -3
View File
@@ -1,6 +1,6 @@
// Copyright 2017-2021 @polkadot/react-identicon authors & contributors
// Copyright 2017-2022 @polkadot/react-identicon authors & contributors
// SPDX-License-Identifier: Apache-2.0
// Auto-generated by @polkadot/dev, do not edit
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/react-identicon', version: '0.87.7' };
export const packageInfo = { name: '@polkadot/react-identicon', path: 'auto', type: 'auto', version: '2.8.2' };
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2018-2021 @polkadot/react-identicon authors & contributors
// Copyright 2018-2022 @polkadot/react-identicon authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Prefix } from '@polkadot/util-crypto/address/types';
@@ -6,7 +6,7 @@
"rootDir": "./src"
},
"references": [
{ "path": "../ui-keyring" },
{ "path": "../vue-identicon" }
{ "path": "../ui-shared/tsconfig.build.json" },
{ "path": "../ui-settings/tsconfig.build.json" }
]
}
@@ -1,45 +0,0 @@
// Copyright 2017-2021 @polkadot/react-identicon authors & contributors
// SPDX-License-Identifier: Apache-2.0
const path = require('path');
const webpack = require('webpack');
const ENV = process.env.NODE_ENV || 'development';
const isProd = ENV === 'production';
module.exports = {
context: __dirname,
devtool: isProd ? 'source-map' : 'eval-cheap-source-map',
entry: './src/Demo.tsx',
mode: ENV,
module: {
rules: [
{
exclude: /(node_modules)/,
test: /\.(js|ts|tsx)$/,
use: [
'babel-loader'
]
}
]
},
output: {
filename: './Demo.js',
path: path.join(__dirname, 'build')
},
plugins: [
new webpack.ProvidePlugin({
Buffer: ['buffer', 'Buffer']
}),
new webpack.ProvidePlugin({
process: 'process/browser'
})
],
resolve: {
alias: {
'@polkadot/ui-settings': path.resolve(__dirname, '../ui-settings/build'),
'@polkadot/ui-shared': path.resolve(__dirname, '../ui-shared/build'),
'process/browser': require.resolve('process/browser')
},
extensions: ['.js', '.jsx', '.ts', '.tsx']
}
};
+11 -8
View File
@@ -12,22 +12,25 @@
"type": "git",
"url": "https://github.com/polkadot-js/ui.git"
},
"sideEffects": false,
"sideEffects": [
"./detectPackage.js",
"./detectPackage.cjs"
],
"type": "module",
"version": "0.87.7",
"version": "2.8.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.16.5",
"@polkadot/ui-settings": "0.87.7",
"@polkadot/util": "^8.2.2",
"@polkadot/util-crypto": "^8.2.2",
"@babel/runtime": "^7.18.6",
"@polkadot/ui-settings": "2.8.2",
"@polkadot/util": "^10.0.2",
"@polkadot/util-crypto": "^10.0.2",
"qrcode-generator": "^1.4.4",
"react-qr-reader": "^2.2.1",
"styled-components": "^5.3.3"
"styled-components": "^5.3.5"
},
"devDependencies": {
"@types/react-qr-reader": "^2.1.4",
"@types/styled-components": "^5.1.19"
"@types/styled-components": "^5.1.25"
},
"peerDependencies": {
"@polkadot/util": "*",
+12 -8
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/react-qr authors & contributors
// Copyright 2017-2022 @polkadot/react-qr authors & contributors
// SPDX-License-Identifier: Apache-2.0
import React, { useEffect, useMemo, useRef, useState } from 'react';
@@ -15,6 +15,7 @@ interface Props {
size?: string | number;
skipEncoding?: boolean;
style?: React.CSSProperties;
timerDelay?: number;
value: Uint8Array;
}
@@ -30,7 +31,7 @@ interface TimerState {
timerId: number | null;
}
const FRAME_DELAY = 2500;
const DEFAULT_FRAME_DELAY = 2750;
const TIMER_INC = 500;
function getDataUrl (value: Uint8Array): string {
@@ -44,9 +45,9 @@ function getDataUrl (value: Uint8Array): string {
return qr.createDataURL(16, 0);
}
function Display ({ className, size, skipEncoding, style, value }: Props): React.ReactElement<Props> | null {
function Display ({ className, size, skipEncoding, style, timerDelay = DEFAULT_FRAME_DELAY, value }: Props): React.ReactElement<Props> | null {
const [{ image }, setFrameState] = useState<FrameState>({ frameIdx: 0, frames: [], image: null, valueHash: null });
const timerRef = useRef<TimerState>({ timerDelay: FRAME_DELAY, timerId: null });
const timerRef = useRef<TimerState>({ timerDelay, timerId: null });
const containerStyle = useMemo(
() => createImgSize(size),
@@ -69,18 +70,21 @@ function Display ({ className, size, skipEncoding, style, value }: Props): React
timerRef.current.timerDelay = timerRef.current.timerDelay + TIMER_INC;
}
timerRef.current.timerId = setTimeout(nextFrame, timerRef.current.timerDelay);
// 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 objectSpread({}, state, {
const newState = objectSpread<FrameState>({}, state, {
frameIdx,
image: getDataUrl(state.frames[frameIdx])
});
// set the new timer last
timerRef.current.timerId = setTimeout(nextFrame, timerRef.current.timerDelay);
return newState;
});
timerRef.current.timerId = window.setTimeout(nextFrame, FRAME_DELAY);
timerRef.current.timerId = window.setTimeout(nextFrame, timerRef.current.timerDelay);
return (): void => {
// eslint-disable-next-line react-hooks/exhaustive-deps
+4 -2
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/react-qr authors & contributors
// Copyright 2017-2022 @polkadot/react-qr authors & contributors
// SPDX-License-Identifier: Apache-2.0
import React, { useMemo } from 'react';
@@ -12,9 +12,10 @@ interface Props {
className?: string;
size?: string | number;
style?: React.CSSProperties;
timerDelay?: number;
}
function DisplayAddress ({ address, className, genesisHash, size, style }: Props): React.ReactElement<Props> | null {
function DisplayAddress ({ address, className, genesisHash, size, style, timerDelay }: Props): React.ReactElement<Props> | null {
const data = useMemo(
() => createAddressPayload(address, genesisHash),
[address, genesisHash]
@@ -30,6 +31,7 @@ function DisplayAddress ({ address, className, genesisHash, size, style }: Props
size={size}
skipEncoding
style={style}
timerDelay={timerDelay}
value={data}
/>
);
+5 -2
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/react-qr authors & contributors
// Copyright 2017-2022 @polkadot/react-qr authors & contributors
// SPDX-License-Identifier: Apache-2.0
import React, { useMemo } from 'react';
@@ -10,13 +10,15 @@ interface Props {
address: string;
className?: string;
cmd: number;
delay?: number;
genesisHash: Uint8Array | string;
payload: Uint8Array;
size?: string | number;
style?: React.CSSProperties;
timerDelay?: number;
}
function DisplayPayload ({ address, className, cmd, genesisHash, payload, size, style }: Props): React.ReactElement<Props> | null {
function DisplayPayload ({ address, className, cmd, genesisHash, payload, size, style, timerDelay }: Props): React.ReactElement<Props> | null {
const data = useMemo(
() => createSignPayload(address, cmd, payload, genesisHash),
[address, cmd, payload, genesisHash]
@@ -31,6 +33,7 @@ function DisplayPayload ({ address, className, cmd, genesisHash, payload, size,
className={className}
size={size}
style={style}
timerDelay={timerDelay}
value={data}
/>
);
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/react-qr authors & contributors
// Copyright 2017-2022 @polkadot/react-qr authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { NetworkSpecsStruct } from '@polkadot/ui-settings/types';
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/react-qr authors & contributors
// Copyright 2017-2022 @polkadot/react-qr authors & contributors
// SPDX-License-Identifier: Apache-2.0
import React, { useCallback, useMemo } from 'react';
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/react-qr authors & contributors
// Copyright 2017-2022 @polkadot/react-qr authors & contributors
// SPDX-License-Identifier: Apache-2.0
import React, { useCallback } from 'react';
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/react-qr authors & contributors
// Copyright 2017-2022 @polkadot/react-qr authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { HexString } from '@polkadot/util/types';
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/react-qr authors & contributors
// Copyright 2017-2022 @polkadot/react-qr authors & contributors
// SPDX-License-Identifier: Apache-2.0
export { QrDisplayAddress } from './DisplayAddress';
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/react-qr authors & contributors
// Copyright 2017-2022 @polkadot/react-qr authors & contributors
// SPDX-License-Identifier: Apache-2.0
const ADDRESS_PREFIX = 'substrate';
+6
View File
@@ -0,0 +1,6 @@
// Copyright 2017-2022 @polkadot/react-qr authors & contributors
// SPDX-License-Identifier: Apache-2.0
// Empty template, auto-generated by @polkadot/dev
export default [];
+11
View File
@@ -0,0 +1,11 @@
// Copyright 2017-2022 @polkadot/react-qr authors & contributors
// SPDX-License-Identifier: Apache-2.0
// Do not edit, auto-generated by @polkadot/dev
import { detectPackage } from '@polkadot/util';
import others from './detectOther';
import { packageInfo } from './packageInfo';
detectPackage(packageInfo, null, others);
+6
View File
@@ -0,0 +1,6 @@
// Copyright 2017-2022 @polkadot/react-qr authors & contributors
// SPDX-License-Identifier: Apache-2.0
import './detectPackage';
export * from './bundle';
+3 -3
View File
@@ -1,6 +1,6 @@
// Copyright 2017-2021 @polkadot/react-qr authors & contributors
// Copyright 2017-2022 @polkadot/react-qr authors & contributors
// SPDX-License-Identifier: Apache-2.0
// Auto-generated by @polkadot/dev, do not edit
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/react-qr', version: '0.87.7' };
export const packageInfo = { name: '@polkadot/react-qr', path: 'auto', type: 'auto', version: '2.8.2' };
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/react-qr authors & contributors
// Copyright 2017-2022 @polkadot/react-qr authors & contributors
// SPDX-License-Identifier: Apache-2.0
import _qrcode from 'qrcode-generator';
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/react-qr authors & contributors
// Copyright 2017-2022 @polkadot/react-qr authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { u8aConcat, u8aToHex, u8aToString } from '@polkadot/util';
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/react-qr authors & contributors
// Copyright 2017-2022 @polkadot/react-qr authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { isString, u8aConcat, u8aToU8a } from '@polkadot/util';
@@ -6,6 +6,6 @@
"rootDir": "./src"
},
"references": [
{ "path": "../ui-shared" }
{ "path": "../ui-settings/tsconfig.build.json" }
]
}
+7 -7
View File
@@ -17,17 +17,17 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "0.87.7",
"version": "2.8.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.16.5",
"@polkadot/ui-shared": "0.87.7",
"@polkadot/util": "^8.2.2",
"@polkadot/util-crypto": "^8.2.2",
"react-native-svg": "^12.2.0"
"@babel/runtime": "^7.18.6",
"@polkadot/ui-shared": "2.8.2",
"@polkadot/util": "^10.0.2",
"@polkadot/util-crypto": "^10.0.2",
"react-native-svg": "^12.3.0"
},
"devDependencies": {
"@types/react-native": "^0.66.10"
"@types/react-native": "^0.69.2"
},
"peerDependencies": {
"@polkadot/util": "*",
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/reactnative-identicon authors & contributors
// Copyright 2017-2022 @polkadot/reactnative-identicon authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Prefix } from '@polkadot/util-crypto/address/types';
@@ -0,0 +1,5 @@
// Copyright 2017-2022 @polkadot/reactnative-identicon authors & contributors
// SPDX-License-Identifier: Apache-2.0
export * from './icons';
export { packageInfo } from './packageInfo';
@@ -0,0 +1,6 @@
// Copyright 2017-2022 @polkadot/reactnative-identicon authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { packageInfo as sharedInfo } from '@polkadot/ui-shared/packageInfo';
export default [sharedInfo];
@@ -1,9 +1,11 @@
// Copyright 2017-2021 @polkadot/reactnative-identicon authors & contributors
// Copyright 2017-2022 @polkadot/reactnative-identicon authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { packageInfo as sharedInfo } from '@polkadot/ui-shared/packageInfo';
// Do not edit, auto-generated by @polkadot/dev
import { detectPackage } from '@polkadot/util';
import others from './detectOther';
import { packageInfo } from './packageInfo';
detectPackage(packageInfo, typeof __dirname !== 'undefined' && __dirname, [sharedInfo]);
detectPackage(packageInfo, null, others);
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/reactnative-identicon authors & contributors
// Copyright 2017-2022 @polkadot/reactnative-identicon authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Props } from '../types';
@@ -1,10 +1,10 @@
// Copyright 2018-2021 @polkadot/reactnative-identicon authors & contributors
// Copyright 2018-2022 @polkadot/reactnative-identicon authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Circle as CircleType } from '@polkadot/ui-shared/icons/types';
import type { Props } from '../types';
import React from 'react';
import React, { useMemo } from 'react';
import { View } from 'react-native';
import Svg, { Circle as SvgCircle } from 'react-native-svg';
@@ -23,6 +23,11 @@ function renderCircle ({ cx, cy, fill, r }: CircleType, key: number): React.Reac
}
export default function Identicon ({ address, isAlternative = false, size }: Props): React.ReactElement<Props> {
const circles = useMemo(
() => polkadotIcon(address, { isAlternative }),
[address, isAlternative]
);
return (
<View>
<Svg
@@ -31,7 +36,7 @@ export default function Identicon ({ address, isAlternative = false, size }: Pro
viewBox='0 0 64 64'
width={size}
>
{polkadotIcon(address, { isAlternative }).map(renderCircle)}
{circles.map(renderCircle)}
</Svg>
</View>
);
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/reactnative-identicon authors & contributors
// Copyright 2017-2022 @polkadot/reactnative-identicon authors & contributors
// SPDX-License-Identifier: Apache-2.0
export { default as Empty } from './Empty';
+2 -3
View File
@@ -1,11 +1,10 @@
// Copyright 2017-2021 @polkadot/reactnative-identicon authors & contributors
// Copyright 2017-2022 @polkadot/reactnative-identicon authors & contributors
// SPDX-License-Identifier: Apache-2.0
import './detectPackage';
import Identicon from './Identicon';
export * from './icons';
export { packageInfo } from './packageInfo';
export * from './bundle';
export default Identicon;
@@ -1,6 +1,6 @@
// Copyright 2017-2021 @polkadot/reactnative-identicon authors & contributors
// Copyright 2017-2022 @polkadot/reactnative-identicon authors & contributors
// SPDX-License-Identifier: Apache-2.0
// Auto-generated by @polkadot/dev, do not edit
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/reactnative-identicon', version: '0.87.7' };
export const packageInfo = { name: '@polkadot/reactnative-identicon', path: 'auto', type: 'auto', version: '2.8.2' };
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2018-2021 @polkadot/reactnative-identicon authors & contributors
// Copyright 2018-2022 @polkadot/reactnative-identicon authors & contributors
// SPDX-License-Identifier: Apache-2.0
export interface Props {
@@ -6,6 +6,6 @@
"rootDir": "./src"
},
"references": [
{ "path": "../ui-settings" }
{ "path": "../ui-shared/tsconfig.build.json" }
]
}
+3 -2
View File
@@ -13,9 +13,10 @@
"url": "https://github.com/polkadot-js/ui.git"
},
"sideEffects": false,
"version": "0.87.7",
"version": "2.8.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.16.5"
"@babel/runtime": "^7.18.6",
"@polkadot/util": "^10.0.2"
}
}
+6
View File
@@ -0,0 +1,6 @@
// Copyright 2017-2022 @polkadot/ui-assets authors & contributors
// SPDX-License-Identifier: Apache-2.0
// Empty template, auto-generated by @polkadot/dev
export default [];
+11
View File
@@ -0,0 +1,11 @@
// Copyright 2017-2022 @polkadot/ui-assets authors & contributors
// SPDX-License-Identifier: Apache-2.0
// Do not edit, auto-generated by @polkadot/dev
import { detectPackage } from '@polkadot/util';
import others from './detectOther';
import { packageInfo } from './packageInfo';
detectPackage(packageInfo, null, others);
+2 -2
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/ui-assets authors & contributors
// Copyright 2017-2022 @polkadot/ui-assets authors & contributors
// SPDX-License-Identifier: Apache-2.0
// empty
export {};
+3 -3
View File
@@ -1,6 +1,6 @@
// Copyright 2017-2021 @polkadot/ui-assets authors & contributors
// Copyright 2017-2022 @polkadot/ui-assets authors & contributors
// SPDX-License-Identifier: Apache-2.0
// Auto-generated by @polkadot/dev, do not edit
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/ui-assets', version: '0.87.7' };
export const packageInfo = { name: '@polkadot/ui-assets', path: 'auto', type: 'auto', version: '2.8.2' };
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/ui-assets authors & contributors
// Copyright 2017-2022 @polkadot/ui-assets authors & contributors
// SPDX-License-Identifier: Apache-2.0
declare module '*.svg' {
+7 -8
View File
@@ -16,17 +16,16 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "0.87.7",
"version": "2.8.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.16.5",
"@polkadot/hw-ledger": "^8.2.2",
"@polkadot/keyring": "^8.2.2",
"@polkadot/ui-settings": "0.87.7",
"@polkadot/util": "^8.2.2",
"@polkadot/util-crypto": "^8.2.2",
"@babel/runtime": "^7.18.6",
"@polkadot/keyring": "^10.0.2",
"@polkadot/ui-settings": "2.8.2",
"@polkadot/util": "^10.0.2",
"@polkadot/util-crypto": "^10.0.2",
"mkdirp": "^1.0.4",
"rxjs": "^7.4.0",
"rxjs": "^7.5.5",
"store": "^2.0.12"
},
"devDependencies": {
+10 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/ui-keyring authors & contributors
// Copyright 2017-2022 @polkadot/ui-keyring authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { KeyringInstance, KeyringPair } from '@polkadot/keyring/types';
@@ -28,6 +28,8 @@ export class Base {
protected _genesisHash?: string;
protected _genesisHashAdd: string[] = [];
constructor () {
this.#accounts = accounts;
this.#addresses = addresses;
@@ -59,6 +61,12 @@ export class Base {
return this._genesisHash;
}
public get genesisHashes (): string[] {
return this._genesisHash
? [this._genesisHash, ...this._genesisHashAdd]
: [...this._genesisHashAdd];
}
public decodeAddress = (key: string | Uint8Array, ignoreChecksum?: boolean, ss58Format?: Prefix): Uint8Array => {
return this.keyring.decodeAddress(key, ignoreChecksum, ss58Format);
};
@@ -115,6 +123,7 @@ export class Base {
? options.genesisHash.toString()
: options.genesisHash.toHex()
);
this._genesisHashAdd = options.genesisHashAdd || [];
this._store = options.store || this._store;
this.addAccountPairs();
+7 -8
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/ui-keyring authors & contributors
// Copyright 2017-2022 @polkadot/ui-keyring authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { KeyringPair, KeyringPair$Json, KeyringPair$Meta } from '@polkadot/keyring/types';
@@ -10,7 +10,7 @@ import type { CreateResult, KeyringAddress, KeyringAddressType, KeyringItemType,
import { createPair } from '@polkadot/keyring';
import { chains } from '@polkadot/ui-settings';
import { bnToBn, hexToU8a, isHex, isString, objectSpread, stringToU8a, u8aSorted, u8aToString } from '@polkadot/util';
import { bnToBn, hexToU8a, isFunction, isHex, isString, objectSpread, stringify, stringToU8a, u8aSorted, u8aToString } from '@polkadot/util';
import { base64Decode, createKeyMulti, jsonDecrypt, jsonEncrypt } from '@polkadot/util-crypto';
import { env } from './observable/env';
@@ -185,7 +185,7 @@ export class Keyring extends Base implements KeyringStruct {
.filter(([, { json: { meta: { contract } } }]): boolean =>
!!contract && contract.genesisHash === this.genesisHash
)
.map(([address]): KeyringAddress => this.getContract(address) as KeyringAddress);
.map(([address]) => this.getContract(address) as KeyringAddress);
}
private rewriteKey (json: KeyringJson, key: string, hexAddr: string, creator: (addr: string) => string): void {
@@ -199,7 +199,6 @@ export class Keyring extends Base implements KeyringStruct {
private loadAccount (json: KeyringJson, key: string): void {
if (!json.meta.isTesting && (json as KeyringPair$Json).encoded) {
// FIXME Just for the transition period (ignoreChecksum)
const pair = this.keyring.addFromJson(json as KeyringPair$Json, true);
this.accounts.add(this._store, pair.address, json, pair.type);
@@ -266,7 +265,7 @@ export class Keyring extends Base implements KeyringStruct {
) || [this.genesisHash];
if (json.meta.genesisHash) {
return hashes.includes(json.meta.genesisHash);
return hashes.includes(json.meta.genesisHash) || this.genesisHashes.includes(json.meta.genesisHash);
} else if (json.meta.contract) {
return hashes.includes(json.meta.contract.genesisHash);
}
@@ -279,7 +278,7 @@ export class Keyring extends Base implements KeyringStruct {
super.initKeyring(options);
this._store.all((key: string, json: KeyringJson): void => {
if (options.filter ? options.filter(json) : true) {
if (!isFunction(options.filter) || options.filter(json)) {
try {
if (this.allowGenesis(json)) {
if (accountRegex.test(key)) {
@@ -291,7 +290,7 @@ export class Keyring extends Base implements KeyringStruct {
}
}
} catch (error) {
// ignore
console.warn(`Keyring: Unable to load ${key}:${stringify(json)}`);
}
}
});
@@ -301,7 +300,7 @@ export class Keyring extends Base implements KeyringStruct {
try {
this.loadInjected(account.address, account.meta, account.type);
} catch (error) {
// ignore
console.warn(`Keyring: Unable to inject ${stringify(account)}`);
}
}
});
+1 -2
View File
@@ -1,9 +1,8 @@
// Copyright 2017-2021 @polkadot/ui-keyring authors & contributors
// Copyright 2017-2022 @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();
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/ui-keyring authors & contributors
// Copyright 2017-2022 @polkadot/ui-keyring authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { decodeAddress } from '@polkadot/keyring';
+6
View File
@@ -0,0 +1,6 @@
// Copyright 2017-2022 @polkadot/ui-keyring authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { packageInfo as settingsInfo } from '@polkadot/ui-settings/packageInfo';
export default [settingsInfo];
+5 -3
View File
@@ -1,9 +1,11 @@
// Copyright 2017-2021 @polkadot/ui-keyring authors & contributors
// Copyright 2017-2022 @polkadot/ui-keyring authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { packageInfo as settingsInfo } from '@polkadot/ui-settings/packageInfo';
// Do not edit, auto-generated by @polkadot/dev
import { detectPackage } from '@polkadot/util';
import others from './detectOther';
import { packageInfo } from './packageInfo';
detectPackage(packageInfo, typeof __dirname !== 'undefined' && __dirname, [settingsInfo]);
detectPackage(packageInfo, null, others);

Some files were not shown because too many files have changed in this diff Show More