Compare commits

..
262 Commits
Author SHA1 Message Date
github-actions[bot] eec754cd66 [CI Skip] release/stable 0.87.6
skip-checks: true
2021-12-19 07:49:03 +00:00
Jaco a77ef34b54 0.87.6 2021-12-19 09:46:39 +02:00
github-actions[bot] f6cfacdd91 [CI Skip] release/beta 0.87.6-3
skip-checks: true
2021-12-19 07:42:49 +00:00
Jaco e0862e715c 0.87.6 (#564)
* 0.87.6

* Update CHANGELOG.md
2021-12-19 09:40:21 +02:00
github-actions[bot] d974650abe [CI Skip] release/beta 0.87.6-2
skip-checks: true
2021-12-14 06:31:49 +00:00
Jaco cab6086826 Use tsconfig references (#561)
* Use tsconfig references

* Adjust

* tesconfig.eslint.json

* Bumps
2021-12-14 08:28:51 +02:00
github-actions[bot] 1cc9fb245f [CI Skip] release/beta 0.87.6-1
skip-checks: true
2021-12-13 06:45:39 +00:00
Jaco fd86a2136f Update yarn.lock (#560) 2021-12-13 08:42:20 +02:00
Jaco 0961a69b34 Align codeclimate.yml (#556) 2021-12-13 08:30:10 +02:00
YuriandJaco 6a515a1c53 Add webpack 5 support (#557)
* Add webpack 5 support

* Update packages/example-react/webpack.config.js

* lint

* Update yarn.lock

Co-authored-by: Jaco <jacogr@gmail.com>
2021-12-13 08:29:38 +02:00
Jaco 8fbea71039 Add tsconfig.base (#559)
* Add tsconfig.base

* Adjust tsconfig
2021-12-13 08:16:37 +02:00
github-actions[bot] 16210ebde2 [CI Skip] release/beta 0.87.6-0
skip-checks: true
2021-12-12 09:28:39 +00:00
Jaco 67779821d1 Bump tsc (#558) 2021-12-12 11:25:38 +02:00
github-actions[bot] 22e1fa2bed [CI Skip] release/stable 0.87.5
skip-checks: true
2021-12-05 11:54:19 +00:00
Jaco 4f0388a413 0.87.5 (#554) 2021-12-05 13:51:45 +02:00
github-actions[bot] 2e08877383 [CI Skip] release/stable 0.87.4
skip-checks: true
2021-12-05 09:14:56 +00:00
Jaco 285b9ba97a 0.87.4 (#553) 2021-12-05 11:12:22 +02:00
github-actions[bot] e03f41f43b [CI Skip] release/beta 0.87.4-0
skip-checks: true
2021-12-01 08:00:05 +00:00
Jaco a066b6af74 Fix stale cron (#552)
* Fix stale cron

* every 3 hours
2021-12-01 09:57:38 +02:00
github-actions[bot] 7fe6171240 [CI Skip] release/stable 0.87.3
skip-checks: true
2021-12-01 07:45:42 +00:00
Jaco b900371690 Bump common (#551)
* Bump common

* 0.87.3, CHANGELOG

* CHANGELOG
2021-12-01 09:43:25 +02:00
github-actions[bot] 5637875344 [CI Skip] release/beta 0.87.3-0
skip-checks: true
2021-11-30 15:38:12 +00:00
Jaco e0ad510e97 Use hasProcess for process check (#550) 2021-11-30 17:35:03 +02:00
github-actions[bot] 266307fbc2 [CI Skip] release/stable 0.87.2
skip-checks: true
2021-11-30 06:27:26 +00:00
Jaco 3f131a58c8 0.87.2 (#549) 2021-11-30 08:25:15 +02:00
github-actions[bot] 7d195211c1 [CI Skip] release/beta 0.87.2-0
skip-checks: true
2021-11-29 13:59:41 +00:00
Andrei Eres 5d402a56da Fix raising error if process has not defined yet (#548) 2021-11-29 15:57:18 +02:00
github-actions[bot] f6a46f2d33 [CI Skip] release/stable 0.87.1
skip-checks: true
2021-11-28 05:23:43 +00:00
Jaco 2b71f0164c Bump common (#547)
* Bump common

* 0.87.1
2021-11-28 07:21:18 +02:00
Github Actions 6381e571cf [CI Skip] release/beta 0.86.8-0
skip-checks: true
2021-11-24 14:59:58 +00:00
Jaco d5bbee2bad Adjust stale schedule (#546) 2021-11-24 16:57:26 +02:00
Github Actions e8df066f50 [CI Skip] release/stable 0.86.7
skip-checks: true
2021-11-22 05:27:30 +00:00
Jaco b3bef159dd 0.86.7 (#545) 2021-11-22 07:25:20 +02:00
Github Actions 2f28f04b22 [CI Skip] release/stable 0.86.6
skip-checks: true
2021-11-21 06:43:01 +00:00
Jaco 0a96372186 0.86.6 (#544) 2021-11-21 08:40:38 +02:00
Github Actions 41edf711ec [CI Skip] release/beta 0.86.6-0
skip-checks: true
2021-11-18 12:46:10 +00:00
Jaco d38a8dfd96 Bump deps (#543) 2021-11-18 14:43:31 +02:00
Github Actions 465152698d [CI Skip] release/stable 0.86.5
skip-checks: true
2021-11-07 07:42:47 +00:00
Jaco 84a18f3c0b 0.86.5 (#540) 2021-11-07 09:40:23 +02:00
Github Actions f222cbb6c0 [CI Skip] release/stable 0.86.4
skip-checks: true
2021-11-06 12:00:07 +00:00
Jaco 6ceb397c87 0.86.4 (#539) 2021-11-06 13:57:13 +02:00
Github Actions bd7fa3db34 [CI Skip] release/beta 0.86.4-1
skip-checks: true
2021-11-05 04:29:57 +00:00
Jaco f6e6c83950 Use objectSpread as applicable (#538)
* Use objectSpread as applicable

* Updates

* Add objectSpread import
2021-11-05 06:27:07 +02:00
Github Actions 2910128399 [CI Skip] release/beta 0.86.4-0
skip-checks: true
2021-11-03 16:16:42 +00:00
Jaco 58ad6efadb Correct Qr signature type (#537) 2021-11-03 18:13:33 +02:00
Github Actions 5c0f70a4a2 [CI Skip] release/stable 0.86.3
skip-checks: true
2021-11-01 11:39:31 +00:00
Jaco 921bb0a4a0 0.86.3 (#536) 2021-11-01 13:37:11 +02:00
Github Actions 10450a350b [CI Skip] release/beta 0.86.3-3
skip-checks: true
2021-10-26 11:29:54 +00:00
Jaco 60bce7c0fa Add .skip-npm for examples 2021-10-26 14:26:51 +03:00
Github Actions aa36e56ff6 [CI Skip] release/beta 0.86.3-2
skip-checks: true
2021-10-26 11:16:09 +00:00
Jaco 653a4a8f39 Bump dev (#535) 2021-10-26 14:13:40 +03:00
Github Actions 9b9fa77bc8 [CI Skip] release/beta 0.86.3-1
skip-checks: true
2021-10-25 11:31:41 +00:00
Jaco 0427f8e2af Bump dev (#534) 2021-10-25 14:28:54 +03:00
Github Actions 7b45a86daa [CI Skip] release/beta 0.86.3-0
skip-checks: true
2021-10-25 09:34:02 +00:00
Jaco c94427d150 Reorder package.json fields (#533) 2021-10-25 12:31:38 +03:00
Github Actions b9179a391e [CI Skip] release/stable 0.86.2
skip-checks: true
2021-10-24 17:37:13 +00:00
Jaco ade03fcc7e 0.86.2 (#532) 2021-10-24 20:34:35 +03:00
Github Actions dc2c83d21c [CI Skip] release/beta 0.86.2-1
skip-checks: true
2021-10-19 05:06:57 +00:00
Jaco 9c012e02d2 Bump deps (#531) 2021-10-19 08:04:18 +03:00
Github Actions 47576d50e0 [CI Skip] release/beta 0.86.2-0
skip-checks: true
2021-10-18 04:23:33 +00:00
Jaco 782f87fc17 Bump dev (w/ eslint 8 & fixes) (#530) 2021-10-18 07:21:06 +03:00
Github Actions bc4b5090b4 [CI Skip] release/stable 0.86.1
skip-checks: true
2021-10-16 06:46:49 +00:00
Jaco 24dc52741b 0.86.1 (#525) 2021-10-16 09:44:31 +03:00
Github Actions 725feb2528 [CI Skip] release/beta 0.85.6-0
skip-checks: true
2021-10-13 15:41:53 +00:00
Nikos Kontakis 196e851fa3 Fix undefined process error that may appear when using ui (#524) 2021-10-13 18:38:49 +03:00
Github Actions 633ca5fd2e [CI Skip] release/stable 0.85.5
skip-checks: true
2021-10-10 06:57:50 +00:00
Jaco 5f0c9889c5 0.85.5 (#523)
* 0.85.5

* Bump
2021-10-10 09:55:19 +03:00
Github Actions 1e95898bd5 [CI Skip] release/stable 0.85.4
skip-checks: true
2021-09-17 14:43:02 +00:00
Jaco f069f4997a 0.85.4 (#521) 2021-09-17 16:40:33 +02:00
Github Actions 4451c5e984 [CI Skip] release/beta 0.85.4-3
skip-checks: true
2021-09-14 11:51:26 +00:00
Jaco 1830a32e77 Bump deps (#520) 2021-09-14 13:48:33 +02:00
Github Actions b910a2e335 [CI Skip] release/beta 0.85.4-2
skip-checks: true
2021-09-05 08:24:41 +00:00
Jaco 4ae5d9495f Bump deps (#519) 2021-09-05 10:22:23 +02:00
Github Actions 2aa64b62a9 [CI Skip] release/beta 0.85.4-1
skip-checks: true
2021-09-01 16:45:48 +00:00
Jaco c8f2f119f0 Jest config cleanup (#518)
* Jest config cleanup

* Bump
2021-09-01 18:43:01 +02:00
Github Actions eeca1f8f50 [CI Skip] release/stable 0.85.3
skip-checks: true
2021-08-29 20:53:34 +00:00
Jaco b74034a809 0.85.3 (#517)
* 0.85.3

* CHANGELOG
2021-08-29 22:50:42 +02:00
Github Actions b356f26e08 [CI Skip] release/stable 0.85.2
skip-checks: true
2021-08-28 06:46:45 +00:00
Jaco c9c3011441 0.85.2 (#515) 2021-08-28 08:43:52 +02:00
Github Actions d2fcebd84a [CI Skip] release/beta 0.85.2-1
skip-checks: true
2021-08-26 08:32:22 +00:00
Jaco 9c47628233 Bump dev (w/ jsx linting) (#514) 2021-08-26 10:29:23 +02:00
Github Actions 28956664cc [CI Skip] release/beta 0.85.2-0
skip-checks: true
2021-08-17 07:41:09 +00:00
Jaco 994f303064 Bump dev (#513) 2021-08-17 09:38:23 +02:00
Github Actions 52a09f4364 [CI Skip] release/stable 0.85.1
skip-checks: true
2021-08-15 11:01:23 +00:00
Jaco 6abb0f79b6 0.85.1 (#512) 2021-08-15 12:58:46 +02:00
Github Actions 2afd941483 [CI Skip] release/beta 0.84.4-2
skip-checks: true
2021-08-13 11:52:10 +00:00
Jaco Greeff fd43c16853 bump berry 2021-08-13 14:49:13 +03:00
Github Actions c27f971878 [CI Skip] release/beta 0.84.4-1
skip-checks: true
2021-08-13 11:19:06 +00:00
Jaco e48115c557 Bump dev (#511)
* Bump dev

* CHANGELOG

* Bump common
2021-08-13 13:15:45 +02:00
Nantian 3f0c2d82e8 fix bigint type (#510) 2021-08-13 13:08:59 +02:00
Github Actions 544fbb5e6d [CI Skip] release/beta 0.84.4-0
skip-checks: true
2021-08-10 09:36:20 +00:00
Jaco dfde4d7989 Bump deps (#509) 2021-08-10 11:33:42 +02:00
Github Actions d80f0ce906 [CI Skip] release/stable 0.84.3
skip-checks: true
2021-08-02 09:24:07 +00:00
Jaco 6a6a247b1f 0.84.3 (#507) 2021-08-02 11:21:03 +02:00
Github Actions b7c5a9a509 [CI Skip] release/stable 0.84.2
skip-checks: true
2021-07-26 07:00:30 +00:00
Jaco 8694cb45e3 0.84.2 (#506) 2021-07-26 08:57:35 +02:00
Github Actions c075950e93 [CI Skip] release/stable 0.84.1
skip-checks: true
2021-07-11 10:28:38 +00:00
Jaco 3e555546cd 0.84 (#505) 2021-07-11 12:25:29 +02:00
Github Actions 63440d051f [CI Skip] release/beta 0.83.2-5
skip-checks: true
2021-07-09 15:22:27 +00:00
Jaco 0cd16ee2d7 Bundle adjust (#504)
* Bundle adjust

* Bumps
2021-07-09 17:19:48 +02:00
Github Actions 3803286251 [CI Skip] release/beta 0.83.2-4
skip-checks: true
2021-07-09 13:32:55 +00:00
Jaco 2d801b535e Browser bundle build (incomplete) (#503)
* Browser bundle build (incomplete)

* globals
2021-07-09 15:30:05 +02:00
Github Actions f2189f3780 [CI Skip] release/beta 0.83.2-3
skip-checks: true
2021-07-09 12:47:08 +00:00
Jaco be251919d6 Add bundle.ts files for browser bundling (#502) 2021-07-09 14:44:16 +02:00
Github Actions bdec479885 [CI Skip] release/beta 0.83.2-2
skip-checks: true
2021-07-09 12:37:29 +00:00
Jaco ed56f21bcb Bump common (#501) 2021-07-09 14:34:42 +02:00
Github Actions 76e1248c5f [CI Skip] release/beta 0.83.2-1
skip-checks: true
2021-07-07 07:40:29 +00:00
Jaco Greeff b6f12ba822 Bump common 2021-07-07 10:37:54 +03:00
Github Actions 0892532f5c [CI Skip] release/beta 0.83.2-0
skip-checks: true
2021-07-07 07:29:00 +00:00
Jaco 99ea536891 Bump common (#500)
* Bump common

* CHANGELOG

* Direct rxjs import
2021-07-07 09:26:09 +02:00
Github Actions ad59098b70 [CI Skip] release/stable 0.83.1
skip-checks: true
2021-07-05 09:39:00 +00:00
Jaco 8f4e839d21 0.83 (#499) 2021-07-05 11:35:43 +02:00
Github Actions 994e0f1ee4 [CI Skip] release/beta 0.82.2-1
skip-checks: true
2021-07-03 06:25:36 +00:00
Shawn TabriziandJaco d0016d6672 Add a new notification setting (#498)
* add notification type to ui_settings

* notificationType -> notification

* Update packages/ui-settings/src/Settings.ts

* Update packages/ui-settings/src/Settings.ts

Co-authored-by: Jaco <jacogr@gmail.com>
2021-07-03 09:22:39 +03:00
Github Actions 3c3cd43bf6 [CI Skip] release/beta 0.82.2-0
skip-checks: true
2021-07-02 07:17:24 +00:00
Jaco 4cb7e0e239 Bump TS (#497) 2021-07-02 09:14:03 +02:00
Github Actions 5f00d9f310 [CI Skip] release/stable 0.82.1
skip-checks: true
2021-06-26 08:09:33 +00:00
Jaco 9393bb9b3f 0.82 (#496) 2021-06-26 10:06:47 +02:00
Github Actions 120fe69329 [CI Skip] release/beta 0.81.2-5
skip-checks: true
2021-06-25 11:34:16 +00:00
Jaco fd9fdf37d9 Bump deps (#495) 2021-06-25 13:31:05 +02:00
Github Actions b857ce4614 [CI Skip] release/beta 0.81.2-4
skip-checks: true
2021-06-25 09:23:16 +00:00
Antoine Estienne 78450918dc Refactor logic to better use prefix (#491)
* refactor logic to better use prefix

* lint
2021-06-25 11:20:19 +02:00
Github Actions 3b0b86c4b7 [CI Skip] release/beta 0.81.2-3
skip-checks: true
2021-06-25 09:10:31 +00:00
Jaco 335296bc56 Fix ss58 0 set (#494) 2021-06-25 11:07:20 +02:00
Github Actions beca59750a [CI Skip] release/beta 0.81.2-2
skip-checks: true
2021-06-24 12:13:31 +00:00
Jaco a5dc09f7e7 Bump keyring (w/ Ethereum address allowance) (#492) 2021-06-24 14:10:59 +02:00
Github Actions 2e892c00cd [CI Skip] release/beta 0.81.2-1
skip-checks: true
2021-06-23 09:18:06 +00:00
Jaco d168127e23 Bump deps (#490) 2021-06-23 11:15:29 +02:00
Github Actions 6ae99fa573 [CI Skip] release/beta 0.81.2-0
skip-checks: true
2021-06-21 14:22:46 +00:00
Antoine EstienneandJaco d7a30db878 use onError in ScanAddress (#488)
* use onError in ScanAddress

* Update packages/react-qr/src/ScanAddress.tsx

Co-authored-by: Jaco <jacogr@gmail.com>

* lint

Co-authored-by: Jaco <jacogr@gmail.com>
2021-06-21 16:19:50 +02:00
Github Actions 8acd7d49a8 [CI Skip] release/stable 0.81.1
skip-checks: true
2021-06-20 05:16:02 +00:00
Jaco c65e7a28c7 0.81 (#489) 2021-06-20 07:13:03 +02:00
Github Actions 106784d5b4 [CI Skip] release/beta 0.80.2-2
skip-checks: true
2021-06-17 06:54:17 +00:00
Jaco bcbfa193f5 Update babel config require (#486) 2021-06-17 08:51:53 +02:00
Github Actions 0fb6b0a21a [CI Skip] release/beta 0.80.2-1
skip-checks: true
2021-06-16 16:52:01 +00:00
Antoine Estienne 26e0ecbbd1 Aadd isEthereum props to ScanAddress to import eth addresses (#484)
* add isEthereum props to ScanAddress to import eth addresses

* fix missing seed
2021-06-16 19:49:32 +03:00
Github Actions 4c097c5001 [CI Skip] release/beta 0.80.2-0
skip-checks: true
2021-06-15 10:28:41 +00:00
Nikos KontakisandJaco 851c452782 add new type in api - settings in order to support different types of… (#476)
* add new type in api - settings in order to support different types of 'urls' - json-rpc and substrate-connect; This makes the previous used apiURL deprecated

* Alter name from apiTypeUrl to apiType

* export types of possible endpoints

* minor fix on sequence of vars

* Fix lint error concerning imports

* Fix lint error concerning imports

* Fix PR comments: import types instead of import; seperate types from settings

* fix lint error

* Update packages/ui-settings/src/types.ts

Co-authored-by: Jaco <jacogr@gmail.com>

Co-authored-by: Jaco <jacogr@gmail.com>
2021-06-15 12:25:57 +02:00
Github Actions f345a70b9f [CI Skip] release/stable 0.80.1
skip-checks: true
2021-06-14 07:17:52 +00:00
Jaco 8866703ad2 0.80 (#483) 2021-06-14 09:15:25 +02:00
Github Actions 0adac5f9fa [CI Skip] release/beta 0.79.2-2
skip-checks: true
2021-06-08 15:09:06 +00:00
Jaco Greeff b19e20c82a .prettierignore 2021-06-08 18:05:39 +03:00
Github Actions eef76f5734 [CI Skip] release/beta 0.79.2-1
skip-checks: true
2021-06-07 14:03:47 +00:00
Jaco Greeff 6e3243cde7 Adjust cron locks 2021-06-07 17:00:33 +03:00
Github Actions 48292b06d8 [CI Skip] release/beta 0.79.2-0
skip-checks: true
2021-06-06 19:28:14 +00:00
Jaco Greeff da1203125e Adjust semgrep check 2021-06-06 22:25:17 +03:00
Github Actions e0fcfd2d1d [CI Skip] release/stable 0.79.1
skip-checks: true
2021-06-06 17:47:50 +00:00
Jaco b02a3ba421 0.79 (#482) 2021-06-06 19:44:47 +02:00
Github Actions f41c1516ed [CI Skip] release/beta 0.78.2-17
skip-checks: true
2021-06-05 11:10:33 +00:00
Jaco Greeff f7d9737950 No semgrep.yml on forks 2021-06-05 14:07:44 +03:00
Github Actions 6ab36a36c5 [CI Skip] release/beta 0.78.2-16
skip-checks: true
2021-06-05 06:41:00 +00:00
Jaco Greeff 640065171b push-master.yml adjust skip 2021-06-05 09:38:00 +03:00
Github Actions b9ac67f6a8 [CI Skip] release/beta 0.78.2-15
skip-checks: true
2021-06-05 06:22:23 +00:00
Jaco Greeff def168928c semgrep.yml on PR 2021-06-05 09:20:03 +03:00
Github Actions db67cf32b1 [CI Skip] release/beta 0.78.2-14
skip-checks: true
2021-06-04 15:01:28 +00:00
Jaco Greeff e134e707c9 semgrep.yml update 2021-06-04 17:58:07 +03:00
Github Actions f174bb188e [CI Skip] release/beta 0.78.2-13
skip-checks: true
2021-06-04 10:42:20 +00:00
Jaco c487a0acf4 Bump deps (#480) 2021-06-04 13:39:54 +03:00
Github Actions d152a182f3 [CI Skip] release/beta 0.78.2-12
skip-checks: true
2021-06-04 08:42:06 +00:00
Jaco Greeff 660f65dab6 semgrep on master only 2021-06-04 11:38:52 +03:00
Github Actions 841d44180f [CI Skip] release/beta 0.78.2-11
skip-checks: true
2021-06-04 05:39:04 +00:00
Jaco Greeff 7c64e75648 semgrep only for non-forked 2021-06-04 08:36:03 +03:00
Github Actions b6ac318e95 [CI Skip] release/beta 0.78.2-10
skip-checks: true
2021-06-03 08:29:14 +00:00
Jaco b99c316fe0 BN type imports (#479) 2021-06-03 10:26:36 +02:00
Github Actions b069b69bcf [CI Skip] release/beta 0.78.2-9
skip-checks: true
2021-06-03 05:11:13 +00:00
Jaco 805c2088aa WebHID as experimental (#478) 2021-06-03 07:08:03 +02:00
Github Actions baf6c58280 [CI Skip] release/beta 0.78.2-8
skip-checks: true
2021-06-03 05:05:06 +00:00
Jaco dd21ee2eb4 WebHid selection (#477) 2021-06-03 07:02:42 +02:00
Github Actions d3e5ba557d [CI Skip] release/beta 0.78.2-7
skip-checks: true
2021-06-02 16:06:38 +00:00
Jaco Greeff 8d10679cac Merge branch 'master' of github.com:polkadot-js/ui 2021-06-02 19:04:07 +03:00
Jaco Greeff 8eab5c731e fix stale.yml 2021-06-02 19:03:55 +03:00
Github Actions 93107eb800 [CI Skip] release/beta 0.78.2-6
skip-checks: true
2021-06-02 07:11:24 +00:00
Jaco Greeff 7c17d9a304 cron workflows 2021-06-02 10:07:43 +03:00
Github Actions 3cb7b9ec17 [CI Skip] release/beta 0.78.2-5
skip-checks: true
2021-06-01 10:01:04 +00:00
Jaco Greeff 9fed78b350 semgrep.yml 2021-06-01 12:58:22 +03:00
Github Actions c01135f515 [CI Skip] release/beta 0.78.2-4
skip-checks: true
2021-06-01 06:07:00 +00:00
Jaco Greeff 6bf0c428d5 cron daily only 2021-06-01 09:04:04 +03:00
Github Actions 0dbcd23747 [CI Skip] release/beta 0.78.2-3
skip-checks: true
2021-05-31 20:19:04 +00:00
Jaco Greeff fdc1834491 cron locks 2021-05-31 23:15:53 +03:00
Github Actions b684af3f50 [CI Skip] release/beta 0.78.2-2
skip-checks: true
2021-05-31 07:49:09 +00:00
Jaco 24b76e63f8 Update .123trigger 2021-05-31 09:46:12 +02:00
Github Actions d7fd57c431 [CI Skip] release/beta 0.78.2-1
skip-checks: true
2021-05-31 07:44:43 +00:00
Jaco Greeff 7da91dba9b Bump dev 2021-05-31 10:41:29 +03:00
Jaco b8e78ccb99 Bump dev (#475) 2021-05-31 09:17:00 +02:00
Jaco Greeff 8b7494699a lock.yml 2021-05-30 22:23:36 +03:00
Github Actions 3b221f7a5a [CI Skip] release/beta 0.78.2-1
skip-checks: true
2021-05-30 09:45:30 +00:00
Jaco ab5ae15257 Bump berry (#474) 2021-05-30 11:42:46 +02:00
Github Actions 9f2921791d [CI Skip] release/beta 0.78.2-0
skip-checks: true
2021-05-29 08:22:16 +00:00
Jaco Greeff 200f12803a Update stale.yml 2021-05-29 11:19:15 +03:00
Github Actions a8e6f90fbf [CI Skip] release/stable 0.78.1
skip-checks: true
2021-05-29 07:44:19 +00:00
Jaco 8f6ad2fc5e 0.78 (#473) 2021-05-29 09:40:54 +02:00
Github Actions 4c24f08e73 [CI Skip] release/beta 0.77.2-2
skip-checks: true
2021-05-28 08:42:55 +00:00
Jaco Greeff c1c185fc25 Update stale.yml 2021-05-28 11:39:46 +03:00
Github Actions 325217736e [CI Skip] release/beta 0.77.2-1
skip-checks: true
2021-05-28 08:18:39 +00:00
Jaco 71b16b5036 Add stale.yml (#472) 2021-05-28 10:15:42 +02:00
Github Actions abc50b3e30 [CI Skip] release/beta 0.77.2-0
skip-checks: true
2021-05-26 08:06:51 +00:00
Jaco 44690ffe3b Bump dev (fixup jest tests) (#471) 2021-05-26 10:03:44 +02:00
Github Actions 153852c87b [CI Skip] release/stable 0.77.1
skip-checks: true
2021-05-25 05:19:24 +00:00
Jaco cfc219702c 0.77 (#470) 2021-05-25 07:16:35 +02:00
Jaco 623a264cbe Bump deps (#469) 2021-05-25 07:10:12 +02:00
Github Actions a616ee7146 [CI Skip] release/stable 0.76.1
skip-checks: true
2021-05-16 18:22:51 +00:00
Jaco e3719881e7 0.76 (#468) 2021-05-16 20:19:53 +02:00
Github Actions 1cbad7a0df [CI Skip] release/beta 0.75.2-4
skip-checks: true
2021-05-12 13:10:57 +00:00
Jaco a3beb29c82 Bump common (#467) 2021-05-12 15:07:51 +02:00
Github Actions d4882d8add [CI Skip] release/beta 0.75.2-3
skip-checks: true
2021-05-11 13:41:17 +00:00
Jaco 56969e32cb Bump deps (#466) 2021-05-11 15:37:59 +02:00
Github Actions 1015b30a22 [CI Skip] release/beta 0.75.2-2
skip-checks: true
2021-05-11 13:16:42 +00:00
Antoine EstienneandJaco 99ee4afaf8 Add types to injected accounts in keyring load functions (#464)
* add types to injected accounts

* Update packages/ui-keyring/src/Keyring.ts

Co-authored-by: Jaco <jacogr@gmail.com>

* Update packages/ui-keyring/src/Keyring.ts

Co-authored-by: Jaco <jacogr@gmail.com>

Co-authored-by: Jaco <jacogr@gmail.com>
2021-05-11 15:13:13 +02:00
Github Actions db2647aada [CI Skip] release/beta 0.75.2-1
skip-checks: true
2021-05-07 12:30:42 +00:00
Jaco 3543bd1d24 Bump common (#465) 2021-05-07 14:27:38 +02:00
Github Actions da7e070261 [CI Skip] release/beta 0.75.2-0
skip-checks: true
2021-04-30 05:56:13 +00:00
Jaco b107e72459 Bump deps (#463) 2021-04-30 07:53:34 +02:00
Github Actions 95bfbfcab9 [CI Skip] release/stable 0.75.1
skip-checks: true
2021-04-25 05:32:06 +00:00
Jaco 887fb80d83 0.75 (#462) 2021-04-25 07:28:52 +02:00
Github Actions efa068c189 [CI Skip] release/beta 0.74.2-0
skip-checks: true
2021-04-22 06:44:41 +00:00
Jaco f368fa077e Bump deps (#461) 2021-04-22 08:41:38 +02:00
Github Actions 4b6e7678ad [CI Skip] release/stable 0.74.1
skip-checks: true
2021-04-18 09:24:47 +00:00
Jaco e1b31afafd Bump common (#460)
* Bump common

* Bumps

* 0.74
2021-04-18 11:21:54 +02:00
Github Actions f875934459 [CI Skip] release/beta 0.73.2-0
skip-checks: true
2021-04-15 12:27:26 +00:00
Jaco e9ab4e1186 Bump common (#459) 2021-04-15 14:24:02 +02:00
Github Actions 7278364873 [CI Skip] release/stable 0.73.1
skip-checks: true
2021-04-12 07:16:36 +00:00
Jaco Greeff 291a478290 0.73 (#458) 2021-04-12 09:13:37 +02:00
Github Actions 4768817661 [CI Skip] release/beta 0.72.2-0
skip-checks: true
2021-04-08 09:09:32 +00:00
Jaco Greeff ebf561f48c Bump deps (#457) 2021-04-08 11:06:28 +02:00
Github Actions 8bdfd18e1f [CI Skip] release/stable 0.72.1
skip-checks: true
2021-03-15 12:52:03 +00:00
Jaco Greeff 5e48c1036f 0.72 (#456) 2021-03-15 13:48:52 +01:00
Github Actions 4370e87fea [CI Skip] release/beta 0.71.4-2
skip-checks: true
2021-03-11 18:28:10 +00:00
雪霁 0864aef698 Batch export patch up (#455)
* .

* .

* fix lint

* .

* change on request

* .
2021-03-11 19:25:04 +01:00
Github Actions b898dff53f [CI Skip] release/beta 0.71.4-1
skip-checks: true
2021-03-10 13:15:39 +00:00
Jaco Greeff 15056a5a6c Bump deps (#454) 2021-03-10 14:12:32 +01:00
Github Actions 2f5df3e46f [CI Skip] release/beta 0.71.4-0
skip-checks: true
2021-03-09 18:58:41 +00:00
雪霁 fd3176c36e Batch export (#449)
* .

* .

* fix lint

* .

* change on request
2021-03-09 19:55:31 +01:00
Github Actions 942bd2baf5 [CI Skip] release/stable 0.71.3
skip-checks: true
2021-03-08 15:34:16 +00:00
Jaco Greeff db67b97b7a 0.71.3 (common deps) (#453)
* 0.71.3 (common deps)

* Update CHANGELOG.md
2021-03-08 16:31:52 +01:00
Github Actions c45d42f606 [CI Skip] release/stable 0.71.2
skip-checks: true
2021-03-07 15:48:27 +00:00
Jaco Greeff 401e55a7bd 0.71.2 (#452)
* 0.71.2

* Bumps
2021-03-07 16:46:07 +01:00
Github Actions 5a0158c372 [CI Skip] release/stable 0.71.1
skip-checks: true
2021-03-06 06:52:05 +00:00
Jaco Greeff 2509347330 0.71 (#451) 2021-03-06 07:48:44 +01:00
Github Actions a5bc4bc902 [CI Skip] release/beta 0.70.2-3
skip-checks: true
2021-03-05 16:08:03 +00:00
Jaco Greeff 7588f21b8f Bump util/util-crypto (#450) 2021-03-05 17:04:56 +01:00
Github Actions 78ca8b86a8 [CI Skip] release/beta 0.70.2-2
skip-checks: true
2021-03-03 09:25:24 +00:00
Jaco Greeff fc9cb7da9e Bump deps (& berry) (#448) 2021-03-03 10:22:44 +01:00
Github Actions 70dacc878c [CI Skip] release/beta 0.70.2-1
skip-checks: true
2021-03-02 20:46:35 +00:00
Jaco Greeff 0eebd52577 Default to type: module (#447) 2021-03-02 21:43:36 +01:00
Github Actions 100f22bcfe [CI Skip] release/beta 0.70.2-0
skip-checks: true
2021-03-01 20:50:00 +00:00
Jaco Greeff 36d479380f Bump deps (#446) 2021-03-01 21:47:02 +01:00
Github Actions aff728dd5e [CI Skip] release/stable 0.70.1
skip-checks: true
2021-02-28 13:19:40 +00:00
Jaco Greeff a0c8fa1a84 0.70 (#445)
* 0.70

* Correct util versions
2021-02-28 14:17:02 +01:00
Github Actions a88990cc73 [CI Skip] release/beta 0.69.2-3
skip-checks: true
2021-02-28 10:26:09 +00:00
Jaco Greeff 15c03c0aff Detection for mismatched monorepo deps (#444)
* Detection for mismatched monorepo deps

* Bump common
2021-02-28 11:23:11 +01:00
Github Actions aa3d6803f7 [CI Skip] release/beta 0.69.2-2
skip-checks: true
2021-02-26 08:11:45 +00:00
Jaco Greeff 0bf8b0a35b Bump common (#443) 2021-02-26 09:09:02 +01:00
Github Actions 3fd29ee299 [CI Skip] release/beta 0.69.2-1
skip-checks: true
2021-02-16 12:30:22 +00:00
Jaco Greeff 1fb62d2964 Bump deps (& use packageInfo detection) (#441) 2021-02-16 13:27:29 +01:00
Github Actions 756af81132 [CI Skip] release/beta 0.69.2-0
skip-checks: true
2021-02-08 16:53:33 +00:00
Jaco Greeff 0ebce80650 Bump util (#439) 2021-02-08 17:50:38 +01:00
Github Actions 743311ec19 [CI Skip] release/stable 0.69.1
skip-checks: true
2021-02-07 13:58:22 +00:00
Jaco Greeff d8237f0687 0.69 (#438)
* 0.69

* Adjust

* Adjust

* Update CHANGELOG.md
2021-02-07 14:55:32 +01:00
Github Actions 68f3d13d09 [CI Skip] release/stable 0.68.1
skip-checks: true
2021-02-01 08:32:18 +00:00
Jaco Greeff b9194310a9 0.68 (#437) 2021-02-01 09:29:46 +01:00
Github Actions 670078158c [CI Skip] release/beta 0.67.2-0
skip-checks: true
2021-01-28 14:13:00 +00:00
Jaco Greeff 0f0bea2624 ed25519 w/ bip44 option (#436)
* ed25519 w/ bip44 option

* naming

* Rename Ledger option (no bip32-ed25519 compatible)
2021-01-28 15:10:03 +01:00
109 changed files with 7577 additions and 6680 deletions
+22 -2
View File
@@ -1,4 +1,24 @@
1
2
0.57.20.57.3
0.66.2
0.66.3
0.66.3
0.71.2
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.86.7
0.87.2
0.87.3
0.87.4
0.87.5
0.87.6
+14
View File
@@ -1,3 +1,17 @@
checks:
argument-count:
config:
threshold: 5
method-complexity:
config:
threshold: 7
method-count:
config:
threshold: 25
method-lines:
config:
threshold: 30
exclude_patterns:
- "**/*.spec.js"
- "**/*.spec.ts"
+2 -8
View File
@@ -6,19 +6,13 @@ const base = require('@polkadot/dev/config/eslint.cjs');
module.exports = {
...base,
ignorePatterns: [
'.eslintrc.js',
'.github/**',
'.vscode/**',
'.yarn/**',
'**/build/*',
'**/coverage/*',
'**/node_modules/*',
...base.ignorePatterns,
'**/*.d.ts'
],
parserOptions: {
...base.parserOptions,
project: [
'./tsconfig.json'
'./tsconfig.eslint.json'
]
},
rules: {
+23
View File
@@ -0,0 +1,23 @@
name: 'Lock Threads'
on:
schedule:
- cron: '25 2/3 * * *'
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.
+1 -8
View File
@@ -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"
+18
View File
@@ -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
+17
View File
@@ -0,0 +1,17 @@
name: 'Close stale issues and PRs'
on:
schedule:
- cron: '40 2/3 * * *'
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
+2
View File
@@ -3,6 +3,7 @@ build-docs/
coverage/
node_modules/
tmp/
.idea
.DS_Store
.env.local
.env.development.local
@@ -16,5 +17,6 @@ tmp/
cc-test-reporter
package-lock.json
npm-debug.log*
tsconfig.*buildinfo
yarn-debug.log*
yarn-error.log*
-1
View File
@@ -1 +0,0 @@
12
+3
View File
@@ -0,0 +1,3 @@
build
coverage
packages
+4
View File
@@ -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');
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
-55
View File
File diff suppressed because one or more lines are too long
+631
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-2.4.0.cjs
yarnPath: .yarn/releases/yarn-3.0.1.cjs
+314
View File
@@ -1,5 +1,319 @@
# CHANGELOG
## 0.87.6 Dec 19, 2021
Changes:
- Updated to `@polkadot/{hw-ledger, keyring, util, util-crypto}` 8.2.2
## 0.87.5 Dec 5, 2021
Changes:
- Updated to `@polkadot/{hw-ledger, keyring, util, util-crypto}` 8.1.2
## 0.87.4 Dec 5, 2021
Changes:
- Updated to `@polkadot/{hw-ledger, keyring, util, util-crypto}` 8.1.1
## 0.87.3 Dec 1, 2021
Changes:
- Use `hasProcess` check from `@polkadot/util`
- Updated to `@polkadot/{hw-ledger, keyring, util, util-crypto}` 8.0.5
## 0.87.2 Nov 30, 2021
Contributed:
- Correct check for `process` variable (Thanks to https://github.com/AndreiEres)
Changes:
- Updated to `@polkadot/{hw-ledger, keyring, util, util-crypto}` 8.0.4
## 0.87.1 Nov 28, 2021
Changes:
- Updated to `@polkadot/{hw-ledger, keyring, util, util-crypto}` 8.0.2
## 0.86.7 Nov 22, 2021
Changes:
- Updated to `@polkadot/{hw-ledger, keyring, util, util-crypto}` 7.9.2
## 0.86.6 Nov 21, 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:
- Updated to `@polkadot/{hw-ledger, keyring, util, util-crypto}` 6.5.1
## 0.76.1 May 16, 2021
Contributed:
- Pass through injected account types (Thanks to https://github.com/joelamouche)
Changes:
- Updated to `@polkadot/{hw-ledger, keyring, util, util-crypto}` 6.4.1
## 0.75.1 Apr 25, 2021
Changes:
- Updated to `@polkadot/{hw-ledger, keyring, util, util-crypto}` 6.3.1
## 0.74.1 Apr 18, 2021
Changes:
- Updated to `@polkadot/{hw-ledger, keyring, util, util-crypto}` 6.2.1
## 0.73.1 Apr 12, 2021
Changes:
- Updated to `@polkadot/{hw-ledger, keyring, util, util-crypto}` 6.1.1
## 0.72.1 Mar 15, 2021
Contributed:
- Added support for batch import/export functionality (Thanks to https://github.com/BubbleBear)
## 0.71.3 Mar 8, 2021
Changes:
- Updated to `@polkadot/{hw-ledger, keyring, util, util-crypto}` 6.0.5
## 0.71.2 Mar 6, 2021
Changes:
- Updated to `@polkadot/{hw-ledger, keyring, util, util-crypto}` 6.0.4
## 0.71.1 Mar 6, 2021
Changes:
- Build to ESM by default (with cjs versions via export map)
- Updated to `@polkadot/{hw-ledger, keyring, util, util-crypto}` 6.0.3
## 0.70.1 Feb 28, 2021
Changes:
- Use `detectPackage` with `packageInfo` & check for monorepo dependencies
- Remove `mkdirp` resolution to ensure local views work with Webpack
- Updated to `@polkadot/{hw-ledger, keyring, util, util-crypto}` 5.9.2
## 0.69.1 Feb 7, 2021
Changes:
- Updated to `@polkadot/{hw-ledger, keyring, util, util-crypto}` 5.6.1
## 0.68.1 Feb 1, 2021
Changes:
- Updated to `@polkadot/{hw-ledger, keyring, util, util-crypto}` 5.5.1
- Added `ed25519-ledger` option for `hdLedger` from `@polkadot/util-crypto`
## 0.67.1 Jan 24, 2021
Contributed:
+4 -3
View File
@@ -3,7 +3,8 @@
const config = require('@polkadot/dev/config/jest.cjs');
module.exports = Object.assign({}, config, {
module.exports = {
...config,
moduleNameMapper: {
'@polkadot/react-(identicon|qr)(.*)$': '<rootDir>/packages/react-$1/src/$2',
'@polkadot/reactnative-(identicon)(.*)$': '<rootDir>/packages/reactnative-$1/src/$2',
@@ -11,5 +12,5 @@ module.exports = Object.assign({}, config, {
'\\.(css|less)$': 'empty/object',
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': 'empty/object'
},
resolver: '@polkadot/dev/config/jest-resolver.cjs'
});
testEnvironment: 'jsdom'
};
+34 -25
View File
@@ -1,49 +1,58 @@
{
"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.87.6",
"workspaces": [
"packages/*"
],
"resolutions": {
"eventemitter3": "^4.0.7",
"mkdirp": "^1.0.4",
"typescript": "^4.1.3"
},
"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.12.10",
"@babel/runtime": "^7.12.5",
"@polkadot/dev": "^0.61.24",
"@polkadot/ts": "^0.3.59",
"@types/jest": "^26.0.20",
"@babel/core": "^7.16.5",
"@babel/runtime": "^7.16.5",
"@polkadot/dev": "^0.64.5",
"@polkadot/ts": "^0.4.20",
"@polkadot/x-bundle": "^8.2.2",
"@types/jest": "^27.0.3",
"babel-loader": "^8.2.3",
"babel-plugin-transform-vue-template": "^0.4.2",
"empty": "^0.10.1",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-is": "^17.0.1",
"react-native": "^0.63.4",
"vue-template-compiler": "^2.6.12",
"webpack": "^4.44.2",
"webpack-cli": "^3.3.12",
"webpack-serve": "^3.2.0"
"process": "^0.11.10",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-is": "^17.0.2",
"react-native": "^0.66.4",
"stream-browserify": "^3.0.0",
"vue-template-compiler": "^2.6.14",
"webpack": "^5.65.0",
"webpack-cli": "^4.9.1",
"webpack-serve": "^4.0.0"
},
"version": "0.67.1"
"resolutions": {
"typescript": "^4.5.3"
}
}
View File
+16 -6
View File
@@ -1,12 +1,22 @@
{
"name": "@polkadot/example-react",
"version": "0.67.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.87.6",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.12.5"
"@babel/runtime": "^7.16.5"
}
}
@@ -0,0 +1,6 @@
// Copyright 2017-2021 @polkadot/example-react authors & contributors
// SPDX-License-Identifier: Apache-2.0
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/example-react', version: '0.87.6' };
+12
View File
@@ -0,0 +1,12 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"baseUrl": "..",
"outDir": "./build",
"rootDir": "./src"
},
"references": [
{ "path": "../react-identicon" },
{ "path": "../ui-keyring" }
]
}
+17 -4
View File
@@ -3,10 +3,11 @@
const path = require('path');
const { WebpackPluginServe } = require('webpack-plugin-serve');
const webpack = require('webpack');
module.exports = {
context: __dirname,
devtool: 'cheap-eval-source-map',
devtool: 'eval-cheap-source-map',
entry: './src/index.tsx',
mode: 'development',
module: {
@@ -17,7 +18,7 @@ module.exports = {
use: [
{
loader: 'babel-loader',
options: require('../../babel.config.js')
options: require('../../babel.config.cjs')
}
]
}
@@ -36,6 +37,12 @@ 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: {
@@ -43,9 +50,15 @@ 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')
'@polkadot/ui-shared': path.resolve(__dirname, '../ui-shared/build'),
'process/browser': require.resolve('process/browser'),
'react/jsx-runtime': require.resolve('react/jsx-runtime')
},
extensions: ['.js', '.ts', '.tsx']
extensions: ['.js', '.ts', '.tsx'],
fallback: {
buffer: require.resolve('buffer'),
stream: require.resolve('stream-browserify')
}
},
watch: true
};
View File
+16 -6
View File
@@ -1,12 +1,22 @@
{
"name": "@polkadot/example-vue",
"version": "0.67.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.87.6",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.12.5"
"@babel/runtime": "^7.16.5"
}
}
+6
View File
@@ -0,0 +1,6 @@
// Copyright 2017-2021 @polkadot/example-vue authors & contributors
// SPDX-License-Identifier: Apache-2.0
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/example-vue', version: '0.87.6' };
+12
View File
@@ -0,0 +1,12 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"baseUrl": "..",
"outDir": "./build",
"rootDir": "./src"
},
"references": [
{ "path": "../ui-keyring" },
{ "path": "../vue-identicon" }
]
}
+12 -4
View File
@@ -4,10 +4,11 @@
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,
devtool: 'cheap-eval-source-map',
devtool: 'eval-cheap-source-map',
entry: './src/index.ts',
mode: 'development',
module: {
@@ -18,7 +19,7 @@ module.exports = {
use: [
{
loader: 'babel-loader',
options: require('../../babel.config.js')
options: require('../../babel.config.cjs')
}
]
},
@@ -42,14 +43,21 @@ module.exports = {
progress: false, // since we have hmr off, disable
static: __dirname
}),
new VueLoaderPlugin()
new VueLoaderPlugin(),
new webpack.ProvidePlugin({
Buffer: ['buffer', 'Buffer']
}),
new webpack.ProvidePlugin({
process: 'process/browser'
})
],
resolve: {
alias: {
'@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')
'@polkadot/vue-identicon': path.resolve(__dirname, '../vue-identicon/build'),
'process/browser': require.resolve('process/browser')
},
extensions: ['.js', '.ts', '.tsx']
},
+18 -12
View File
@@ -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.
+27 -18
View File
@@ -1,6 +1,7 @@
{
"name": "exampleReactNative",
"version": "0.67.1",
"version": "0.87.6",
"license": "Apache-2.0",
"private": true,
"scripts": {
"copy-workspace-packages": "yarn copy-identicon && yarn copy-ui-shared",
@@ -11,32 +12,40 @@
"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": "^5.4.4",
"@polkadot/reactnative-identicon": "0.67.1",
"@polkadot/ui-keyring": "0.67.1",
"@polkadot/ui-settings": "0.67.1",
"@polkadot/util": "^5.4.4",
"@polkadot/util-crypto": "^5.4.4",
"@polkadot/keyring": "^8.2.2",
"@polkadot/reactnative-identicon": "0.87.6",
"@polkadot/ui-keyring": "0.87.6",
"@polkadot/ui-settings": "0.87.6",
"@polkadot/util": "^8.2.2",
"@polkadot/util-crypto": "^8.2.2",
"@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.1",
"react-native": "^0.63.4",
"react": "^17.0.2",
"react-native": "^0.66.4",
"react-native-crypto": "^2.2.0",
"react-native-randombytes": "^3.6.0",
"stream-http": "^3.1.1"
"react-native-randombytes": "^3.6.1",
"stream-http": "^3.2.0"
},
"devDependencies": {
"@babel/core": "^7.12.10",
"@babel/runtime": "^7.12.5",
"@react-native-community/cli-platform-ios": "^4.13.0",
"@types/react-test-renderer": "17.0.0",
"babel-jest": "^26.6.3",
"metro-react-native-babel-preset": "^0.64.0",
"react-test-renderer": "17.0.1"
"@babel/core": "^7.16.5",
"@babel/runtime": "^7.16.5",
"@react-native-community/cli-platform-ios": "^6.2.0",
"@types/react-test-renderer": "17.0.1",
"babel-jest": "^27.4.5",
"metro-react-native-babel-preset": "^0.66.2",
"react-test-renderer": "17.0.2"
},
"jest": {
"preset": "react-native",
+13
View File
@@ -0,0 +1,13 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"baseUrl": "..",
"outDir": "./build",
"rootDir": "."
},
"references": [
{ "path": "../reactnative-identicon" },
{ "path": "../ui-keyring" },
{ "path": "../ui-settings" }
]
}
+35 -23
View File
@@ -1,24 +1,43 @@
{
"name": "@polkadot/react-identicon",
"version": "0.67.1",
"description": "Renders an SVG picture representing an address",
"main": "index.js",
"sideEffects": false,
"author": "Jaco Greeff <jacogr@gmail.com>",
"maintainers": [],
"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/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"
],
"type": "module",
"version": "0.87.6",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.12.5",
"@polkadot/keyring": "^5.4.4",
"@polkadot/ui-settings": "0.67.1",
"@polkadot/ui-shared": "0.67.1",
"@polkadot/util": "^5.4.4",
"@polkadot/util-crypto": "^5.4.4",
"color": "^3.1.3",
"@babel/runtime": "^7.16.5",
"@polkadot/keyring": "^8.2.2",
"@polkadot/ui-settings": "0.87.6",
"@polkadot/ui-shared": "0.87.6",
"@polkadot/util": "^8.2.2",
"@polkadot/util-crypto": "^8.2.2",
"color": "^3.2.1",
"ethereum-blockies-base64": "^1.0.2",
"jdenticon": "3.1.0",
"react-copy-to-clipboard": "^5.0.3",
"styled-components": "^5.2.1"
"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.18",
"styled-components": "^5.3.3",
"xmlserializer": "^0.6.1"
},
"peerDependencies": {
"@polkadot/keyring": "*",
@@ -28,12 +47,5 @@
"react-dom": "*",
"react-is": "*",
"styled-components": "*"
},
"devDependencies": {
"@types/react-copy-to-clipboard": "^5.0.0",
"@types/react-dom": "^17.0.0",
"@types/styled-components": "^5.1.7",
"styled-components": "^5.2.1",
"xmlserializer": "^0.6.1"
}
}
+1 -1
View File
@@ -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) {
+3 -3
View File
@@ -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> {
+7
View File
@@ -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';
@@ -0,0 +1,10 @@
// Copyright 2017-2021 @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';
import { detectPackage } from '@polkadot/util';
import { packageInfo } from './packageInfo';
detectPackage(packageInfo, typeof __dirname !== 'undefined' && __dirname, [settingsInfo, sharedInfo]);
+3 -3
View File
@@ -1,10 +1,10 @@
// Copyright 2017-2021 @polkadot/react-identicon authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { Identicon } from './Identicon';
import './detectPackage';
export * from './icons';
import { Identicon } from './bundle';
export { Identicon };
export * from './bundle';
export default Identicon;
@@ -0,0 +1,6 @@
// Copyright 2017-2021 @polkadot/react-identicon authors & contributors
// SPDX-License-Identifier: Apache-2.0
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/react-identicon', version: '0.87.6' };
+12
View File
@@ -0,0 +1,12 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"baseUrl": "..",
"outDir": "./build",
"rootDir": "./src"
},
"references": [
{ "path": "../ui-shared" },
{ "path": "../ui-settings" }
]
}
+12 -4
View File
@@ -2,13 +2,13 @@
// 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' : 'cheap-eval-source-map',
devtool: isProd ? 'source-map' : 'eval-cheap-source-map',
entry: './src/Demo.tsx',
mode: ENV,
module: {
@@ -26,11 +26,19 @@ module.exports = {
filename: './Demo.js',
path: path.join(__dirname, 'build')
},
plugins: [],
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')
'@polkadot/ui-shared': path.resolve(__dirname, '../ui-shared/build'),
'process/browser': require.resolve('process/browser')
},
extensions: ['.js', '.jsx', '.ts', '.tsx']
}
+21 -12
View File
@@ -1,23 +1,32 @@
{
"name": "@polkadot/react-qr",
"version": "0.67.1",
"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.87.6",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.12.5",
"@polkadot/util": "^5.4.4",
"@polkadot/util-crypto": "^5.4.4",
"@babel/runtime": "^7.16.5",
"@polkadot/util": "^8.2.2",
"@polkadot/util-crypto": "^8.2.2",
"qrcode-generator": "^1.4.4",
"react-qr-reader": "^2.2.1",
"styled-components": "^5.2.1"
"styled-components": "^5.3.3"
},
"devDependencies": {
"@types/react-qr-reader": "^2.1.3",
"@types/styled-components": "^5.1.7"
"@types/react-qr-reader": "^2.1.4",
"@types/styled-components": "^5.1.18"
},
"peerDependencies": {
"@polkadot/util": "*",
+4 -5
View File
@@ -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);
+20 -7
View File
@@ -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 (
+3 -1
View File
@@ -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 {
+1
View File
@@ -6,3 +6,4 @@ export { QrDisplayPayload } from './DisplayPayload';
export { QrScanAddress } from './ScanAddress';
export { QrScanSignature } from './ScanSignature';
export { QrNetworkSpecs } from './NetworkSpecs';
export { packageInfo } from './packageInfo';
+6
View File
@@ -0,0 +1,6 @@
// Copyright 2017-2021 @polkadot/react-qr authors & contributors
// SPDX-License-Identifier: Apache-2.0
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/react-qr', version: '0.87.6' };
+11
View File
@@ -0,0 +1,11 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"baseUrl": "..",
"outDir": "./build",
"rootDir": "./src"
},
"references": [
{ "path": "../ui-settings" }
]
}
+26 -14
View File
@@ -1,26 +1,38 @@
{
"name": "@polkadot/reactnative-identicon",
"version": "0.67.1",
"description": "Renders an SVG picture representing an address",
"main": "index.js",
"sideEffects": false,
"author": "Jaco Greeff <jacogr@gmail.com>",
"maintainers": [],
"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/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"
],
"type": "module",
"version": "0.87.6",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.12.5",
"@polkadot/ui-shared": "0.67.1",
"@polkadot/util": "^5.4.4",
"@polkadot/util-crypto": "^5.4.4",
"react-native-svg": "^12.1.0"
"@babel/runtime": "^7.16.5",
"@polkadot/ui-shared": "0.87.6",
"@polkadot/util": "^8.2.2",
"@polkadot/util-crypto": "^8.2.2",
"react-native-svg": "^12.2.0"
},
"devDependencies": {
"@types/react-native": "^0.66.9"
},
"peerDependencies": {
"@polkadot/util": "*",
"@polkadot/util-crypto": "*",
"react": "*",
"react-native": "*"
},
"devDependencies": {
"@types/react-native": "^0.63.46"
}
}
@@ -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;
@@ -0,0 +1,9 @@
// Copyright 2017-2021 @polkadot/reactnative-identicon authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { packageInfo as sharedInfo } from '@polkadot/ui-shared/packageInfo';
import { detectPackage } from '@polkadot/util';
import { packageInfo } from './packageInfo';
detectPackage(packageInfo, typeof __dirname !== 'undefined' && __dirname, [sharedInfo]);
@@ -1,8 +1,11 @@
// Copyright 2017-2021 @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 default Identicon;
@@ -0,0 +1,6 @@
// Copyright 2017-2021 @polkadot/reactnative-identicon authors & contributors
// SPDX-License-Identifier: Apache-2.0
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/reactnative-identicon', version: '0.87.6' };
@@ -0,0 +1,11 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"baseUrl": "..",
"outDir": "./build",
"rootDir": "./src"
},
"references": [
{ "path": "../ui-shared" }
]
}
+15 -6
View File
@@ -1,12 +1,21 @@
{
"name": "@polkadot/ui-assets",
"version": "0.67.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.87.6",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.12.5"
"@babel/runtime": "^7.16.5"
}
}
+6
View File
@@ -0,0 +1,6 @@
// Copyright 2017-2021 @polkadot/ui-assets authors & contributors
// SPDX-License-Identifier: Apache-2.0
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/ui-assets', version: '0.87.6' };
+9
View File
@@ -0,0 +1,9 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"baseUrl": "..",
"outDir": "./build",
"rootDir": "./src"
},
"references": []
}
+1 -1
View File
@@ -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 () {
+22 -15
View File
@@ -1,28 +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.67.1",
"main": "index.js",
"repository": {
"directory": "packages/ui-keyring",
"type": "git",
"url": "https://github.com/polkadot-js/ui.git"
},
"sideEffects": [
"./detectPackage.js",
"./detectPackage.mjs"
"./detectPackage.cjs"
],
"repository": "github:polkadot-js/apps",
"author": "Jaco Greeff <jacogr@gmail.com>",
"maintainers": [],
"contributors": [],
"license": "Apache-2.0",
"type": "module",
"version": "0.87.6",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.12.5",
"@polkadot/hw-ledger": "^5.4.4",
"@polkadot/keyring": "^5.4.4",
"@polkadot/ui-settings": "0.67.1",
"@polkadot/util": "^5.4.4",
"@polkadot/x-rxjs": "^5.4.4",
"@babel/runtime": "^7.16.5",
"@polkadot/hw-ledger": "^8.2.2",
"@polkadot/keyring": "^8.2.2",
"@polkadot/ui-settings": "0.87.6",
"@polkadot/util": "^8.2.2",
"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": {
+5 -5
View File
@@ -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);
}
}
+47 -21
View File
@@ -1,17 +1,17 @@
// 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, KeyringStruct } from './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, u8aSorted } from '@polkadot/util';
import { base64Decode, createKeyMulti } from '@polkadot/util-crypto';
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';
import { Base } from './Base';
@@ -33,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),
@@ -42,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 {
@@ -82,8 +82,29 @@ export class Keyring extends Base implements KeyringStruct {
return pair.toJson(password);
}
public async backupAccounts (addresses: string[], password: string): Promise<KeyringPairs$Json> {
const accountPromises = addresses.map((address) => {
return new Promise<KeyringJson>((resolve) => {
this._store.get(accountKey(address), resolve);
});
});
const accounts = await Promise.all(accountPromises);
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 {
@@ -228,15 +249,12 @@ export class Keyring extends Base implements KeyringStruct {
this.rewriteKey(json, key, hexAddr, contractKey);
}
private loadInjected (address: string, meta: KeyringJson$Meta): void {
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);
const pair = this.keyring.addFromAddress(address, json.meta, null, type);
this.accounts.add(this._store, pair.address, json, pair.type);
}
@@ -257,7 +275,7 @@ export class Keyring extends Base implements KeyringStruct {
return true;
}
public loadAll (options: KeyringOptions, injected: { address: string; meta: KeyringJson$Meta }[] = []): void {
public loadAll (options: KeyringOptions, injected: { address: string; meta: KeyringJson$Meta, type?: KeypairType }[] = []): void {
super.initKeyring(options);
this._store.all((key: string, json: KeyringJson): void => {
@@ -281,7 +299,7 @@ export class Keyring extends Base implements KeyringStruct {
injected.forEach((account): void => {
if (this.allowGenesis(account)) {
try {
this.loadInjected(account.address, account.meta);
this.loadInjected(account.address, account.meta, account.type);
} catch (error) {
// ignore
}
@@ -295,7 +313,7 @@ export class Keyring extends Base implements KeyringStruct {
const cryptoType = Array.isArray(json.encoding.content) ? json.encoding.content[1] : 'ed25519';
const encType = Array.isArray(json.encoding.type) ? json.encoding.type : [json.encoding.type];
const pair = createPair(
{ toSS58: this.encodeAddress, type: cryptoType },
{ toSS58: this.encodeAddress, type: cryptoType as KeypairType },
{ publicKey: this.decodeAddress(json.address, true) },
json.meta,
isHex(json.encoded) ? hexToU8a(json.encoded) : base64Decode(json.encoded),
@@ -310,6 +328,14 @@ export class Keyring extends Base implements KeyringStruct {
return pair;
}
public restoreAccounts (json: EncryptedJson, password: string): void {
const accounts: KeyringJson[] = JSON.parse(u8aToString(jsonDecrypt(json, password))) as KeyringJson[];
accounts.forEach((account) => {
this.loadAccount(account, accountKey(account.address));
});
}
public saveAccount (pair: KeyringPair, password?: string): KeyringPair$Json {
this.addTimestamp(pair);
+11
View File
@@ -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 -19
View File
@@ -1,25 +1,9 @@
// Copyright 2017-2021 @polkadot/ui-keyring authors & contributors
// SPDX-License-Identifier: Apache-2.0
// For esm, this should be import.meta.url or to get the same behavior as __dirname, we can use
//
// new URL(import.meta.url).pathname)
//
// The issue is the WP4 has "some" issues with import.meta.url. So because of bundlers, we can't have
// nice things... In this case it is even worse since import.meta.url won't even make it compile, so
// there is a complete dead end with usage thereof
//
// When that is fixed, a solution is to have both .js & .mjs files, with the following content -
//
// cjs: util.detectPackage(packageInfo, () => __dirname);
// esm: detectPackage(packageInfo, () => import.meta.url);
//
// With the above we additionally need a .d.ts to just export the packageInfo
import { packageInfo as settingsInfo } from '@polkadot/ui-settings/packageInfo';
import { detectPackage } from '@polkadot/util';
import packageInfo from './package-info.json';
import { packageInfo } from './packageInfo';
detectPackage(packageInfo, typeof __dirname !== 'undefined' && __dirname);
export { packageInfo };
detectPackage(packageInfo, typeof __dirname !== 'undefined' && __dirname, [settingsInfo]);
+2 -6
View File
@@ -3,12 +3,8 @@
import './detectPackage';
import { Keyring } from './Keyring';
import { keyring } from './bundle';
export { Ledger } from '@polkadot/hw-ledger';
const keyring = new Keyring();
export { Keyring, keyring };
export * from './bundle';
export default keyring;
+1 -1
View File
@@ -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 -4
View File
@@ -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 -1
View File
@@ -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';
+2 -1
View File
@@ -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';
+6
View File
@@ -0,0 +1,6 @@
// Copyright 2017-2021 @polkadot/ui-keyring authors & contributors
// SPDX-License-Identifier: Apache-2.0
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/ui-keyring', version: '0.87.6' };
+2 -1
View File
@@ -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 {
+7
View File
@@ -2,6 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
import type { KeyringInstance as BaseKeyringInstance, KeyringOptions as KeyringOptionsBase, 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';
@@ -30,6 +31,10 @@ export interface KeyringJson {
meta: KeyringJson$Meta;
}
export interface KeyringPairs$Json extends EncryptedJson {
accounts: KeyringJson[];
}
export interface KeyringStore {
all: (cb: (key: string, value: KeyringJson) => void) => void;
get: (key: string, cb: (value: KeyringJson) => void) => void;
@@ -70,6 +75,7 @@ export interface KeyringStruct {
addPair: (pair: KeyringPair, password: string) => CreateResult;
addUri: (suri: string, password?: string, meta?: KeyringPair$Meta, type?: KeypairType) => CreateResult;
backupAccount: (pair: KeyringPair, password: string) => KeyringPair$Json;
backupAccounts: (addresses: string[], password: string) => Promise<KeyringPairs$Json>
createFromUri (suri: string, meta?: KeyringPair$Meta, type?: KeypairType): KeyringPair;
decodeAddress: (key: string | Uint8Array) => Uint8Array;
encodeAddress: (key: string | Uint8Array) => string;
@@ -89,6 +95,7 @@ export interface KeyringStruct {
isPassValid: (password: string) => boolean;
loadAll: (options: KeyringOptions) => void;
restoreAccount: (json: KeyringPair$Json, password: string) => KeyringPair;
restoreAccounts: (json: EncryptedJson, password: string) => void;
saveAccount: (pair: KeyringPair, password?: string) => KeyringPair$Json;
saveAccountMeta: (pair: KeyringPair, meta: KeyringPair$Meta) => void;
saveAddress: (address: string, meta: KeyringPair$Meta) => KeyringPair$Json;
+11
View File
@@ -0,0 +1,11 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"baseUrl": "..",
"outDir": "./build",
"rootDir": "./src"
},
"references": [
{ "path": "../ui-settings" }
]
}
+18 -9
View File
@@ -1,16 +1,25 @@
{
"name": "@polkadot/ui-settings",
"version": "0.67.1",
"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.87.6",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.12.5",
"@polkadot/networks": "^5.4.4",
"@polkadot/util": "^5.4.4",
"@babel/runtime": "^7.16.5",
"@polkadot/networks": "^8.2.2",
"@polkadot/util": "^8.2.2",
"eventemitter3": "^4.0.7",
"store": "^2.0.12"
},
+28 -4
View File
@@ -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 { hasProcess, isUndefined } from '@polkadot/util';
import { CAMERA, CAMERA_DEFAULT, CRYPTOS, CRYPTOS_ETH, 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) || (hasProcess && 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;
}
@@ -106,6 +122,10 @@ export class Settings implements SettingsStruct {
return CRYPTOS_ETH;
}
public get availableCryptosLedger (): Option[] {
return CRYPTOS_LEDGER;
}
public get availableIcons (): Option[] {
return ICONS;
}
@@ -136,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
@@ -149,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;
+10
View File
@@ -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 };
+5 -4
View File
@@ -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
.filter(({ genesisHash }) => genesisHash.length > 1)
.reduce((chains, { genesisHash, network }) => ({ ...chains, [network]: genesisHash }), {});
const chains: Record <string, ChainDef> = selectableNetworks
.filter((n) => n.genesisHash.length)
.reduce((chains, { genesisHash, network }) => objectSpread(chains, { [network]: genesisHash }), {});
export { chains };
@@ -28,3 +28,12 @@ export const CRYPTOS_ETH: Option[] = [
value: 'ethereum'
}
];
export const CRYPTOS_LEDGER: Option[] = [
...CRYPTOS,
{
info: 'ed25519-ledger',
text: 'Ledger (ed25519, BIP32 derivation)',
value: 'ed25519-ledger'
}
];
+4 -2
View File
@@ -3,11 +3,11 @@
import type { Option } from '../types';
import { CRYPTOS, CRYPTOS_ETH } from './crypto';
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';
@@ -46,6 +46,7 @@ export {
CAMERA,
CRYPTOS,
CRYPTOS_ETH,
CRYPTOS_LEDGER,
ENDPOINT_DEFAULT,
ENDPOINTS,
ICON_DEFAULT,
@@ -56,6 +57,7 @@ export {
LEDGER_CONN,
LOCKING_DEFAULT,
LOCKING,
NOTIFICATION_DEFAULT,
PREFIX_DEFAULT,
PREFIXES,
UIMODE_DEFAULT,
+6 -1
View File
@@ -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'
}
];
+2 -2
View File
@@ -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
+3
View File
@@ -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,
+2 -4
View File
@@ -1,10 +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 { settings, Settings };
export * from './bundle';
export default settings;
+6
View File
@@ -0,0 +1,6 @@
// Copyright 2017-2021 @polkadot/ui-settings authors & contributors
// SPDX-License-Identifier: Apache-2.0
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/ui-settings', version: '0.87.6' };
+9
View File
@@ -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';
+9
View File
@@ -0,0 +1,9 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"baseUrl": "..",
"outDir": "./build",
"rootDir": "./src"
},
"references": []
}
+23 -14
View File
@@ -1,24 +1,33 @@
{
"name": "@polkadot/ui-shared",
"version": "0.67.1",
"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.87.6",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.12.5",
"color": "^3.1.3"
"@babel/runtime": "^7.16.5",
"color": "^3.2.1"
},
"devDependencies": {
"@polkadot/util": "^8.2.2",
"@polkadot/util-crypto": "^8.2.2",
"@types/color": "^3.0.2",
"@types/xmlserializer": "^0.6.2"
},
"peerDependencies": {
"@polkadot/util": "*",
"@polkadot/util-crypto": "*"
},
"devDependencies": {
"@polkadot/util": "^5.4.4",
"@polkadot/util-crypto": "^5.4.4",
"@types/color": "^3.0.1",
"@types/xmlserializer": "^0.6.2"
}
}
+1
View File
@@ -2,3 +2,4 @@
// SPDX-License-Identifier: Apache-2.0
export * from './icons';
export { packageInfo } from './packageInfo';
+6
View File
@@ -0,0 +1,6 @@
// Copyright 2017-2021 @polkadot/ui-shared authors & contributors
// SPDX-License-Identifier: Apache-2.0
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/ui-shared', version: '0.87.6' };
+9
View File
@@ -0,0 +1,9 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"baseUrl": "..",
"outDir": "./build",
"rootDir": "./src"
},
"references": []
}
+26 -14
View File
@@ -1,25 +1,37 @@
{
"name": "@polkadot/vue-identicon",
"version": "0.67.1",
"description": "Renders an SVG picture representing an address",
"author": "Jaco Greeff <jacogr@gmail.com>",
"maintainers": [],
"main": "index.js",
"sideEffects": false,
"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": [],
"name": "@polkadot/vue-identicon",
"repository": {
"directory": "packages/vue-identicon",
"type": "git",
"url": "https://github.com/polkadot-js/ui.git"
},
"sideEffects": [
"./detectPackage.js",
"./detectPackage.cjs"
],
"type": "module",
"version": "0.87.6",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.12.5",
"@polkadot/ui-shared": "0.67.1",
"@polkadot/util": "^5.4.4",
"@polkadot/util-crypto": "^5.4.4",
"jdenticon": "3.1.0"
"@babel/runtime": "^7.16.5",
"@polkadot/ui-shared": "0.87.6",
"@polkadot/util": "^8.2.2",
"@polkadot/util-crypto": "^8.2.2",
"jdenticon": "3.1.1"
},
"devDependencies": {
"vue": "^2.6.14"
},
"peerDependencies": {
"@polkadot/util": "*",
"@polkadot/util-crypto": "*",
"vue": "*"
},
"devDependencies": {
"vue": "^2.6.12"
}
}
+1 -1
View File
@@ -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;
+6
View File
@@ -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';
@@ -0,0 +1,9 @@
// Copyright 2017-2021 @polkadot/vue-identicon authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { packageInfo as sharedInfo } from '@polkadot/ui-shared/packageInfo';
import { detectPackage } from '@polkadot/util';
import { packageInfo } from './packageInfo';
detectPackage(packageInfo, typeof __dirname !== 'undefined' && __dirname, [sharedInfo]);
@@ -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'],
+1 -1
View File
@@ -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('');

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