Compare commits

..
38 Commits
Author SHA1 Message Date
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
52 changed files with 1416 additions and 1111 deletions
+3
View File
@@ -4,3 +4,6 @@
0.66.3
0.71.2
0.71.3
0.84.2
0.84.3
+50 -3
View File
@@ -1,6 +1,53 @@
# CHANGELOG
## 0.81.1, Jun 20, 2021
## 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:
@@ -13,14 +60,14 @@ Changes:
- Fix webpack demo import locations
## 0.80.1, Jun 14, 2021
## 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
## 0.79.1 Jun 6, 2021
Changes:
+9 -7
View File
@@ -8,11 +8,12 @@
"packages/*"
],
"resolutions": {
"typescript": "^4.3.2"
"typescript": "^4.3.5"
},
"scripts": {
"build": "polkadot-dev-build-ts",
"build:release": "polkadot-ci-ghact-build",
"build:rollup": "polkadot-exec-rollup --config",
"lint": "polkadot-dev-run-lint",
"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",
@@ -27,11 +28,12 @@
"test:one": "polkadot-dev-run-test"
},
"devDependencies": {
"@babel/core": "^7.14.5",
"@babel/runtime": "^7.14.5",
"@polkadot/dev": "^0.62.42",
"@polkadot/ts": "^0.3.90",
"@types/jest": "^26.0.23",
"@babel/core": "^7.14.8",
"@babel/runtime": "^7.14.8",
"@polkadot/dev": "^0.62.57",
"@polkadot/ts": "^0.4.4",
"@polkadot/x-bundle": "^7.1.1",
"@types/jest": "^26.0.24",
"babel-plugin-transform-vue-template": "^0.4.2",
"empty": "^0.10.1",
"react": "^17.0.2",
@@ -43,5 +45,5 @@
"webpack-cli": "^3.3.12",
"webpack-serve": "^3.2.0"
},
"version": "0.81.1"
"version": "0.84.3"
}
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "@polkadot/example-react",
"version": "0.81.1",
"version": "0.84.3",
"description": "A very basic example with ui-* & react-* packages",
"main": "index.js",
"author": "Jaco Greeff <jacogr@gmail.com>",
"maintainers": [],
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.14.5"
"@babel/runtime": "^7.14.8"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/example-react', version: '0.81.1' };
export const packageInfo = { name: '@polkadot/example-react', version: '0.84.3' };
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "@polkadot/example-vue",
"version": "0.81.1",
"version": "0.84.3",
"description": "A very basic example with ui-* & vue-* packages",
"main": "index.js",
"author": "Jaco Greeff <jacogr@gmail.com>",
"maintainers": [],
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.14.5"
"@babel/runtime": "^7.14.8"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/example-vue', version: '0.81.1' };
export const packageInfo = { name: '@polkadot/example-vue', version: '0.84.3' };
+12 -12
View File
@@ -1,6 +1,6 @@
{
"name": "exampleReactNative",
"version": "0.81.1",
"version": "0.84.3",
"private": true,
"scripts": {
"copy-workspace-packages": "yarn copy-identicon && yarn copy-ui-shared",
@@ -12,12 +12,12 @@
"test": "jest"
},
"dependencies": {
"@polkadot/keyring": "^6.9.1",
"@polkadot/reactnative-identicon": "0.81.1",
"@polkadot/ui-keyring": "0.81.1",
"@polkadot/ui-settings": "0.81.1",
"@polkadot/util": "^6.9.1",
"@polkadot/util-crypto": "^6.9.1",
"@polkadot/keyring": "^7.1.1",
"@polkadot/reactnative-identicon": "0.84.3",
"@polkadot/ui-keyring": "0.84.3",
"@polkadot/ui-settings": "0.84.3",
"@polkadot/util": "^7.1.1",
"@polkadot/util-crypto": "^7.1.1",
"@react-native-community/async-storage": "^1.12.1",
"fast-text-encoding": "^1.0.3",
"get-yarn-workspaces": "^1.0.2",
@@ -30,12 +30,12 @@
"stream-http": "^3.2.0"
},
"devDependencies": {
"@babel/core": "^7.14.5",
"@babel/runtime": "^7.14.5",
"@react-native-community/cli-platform-ios": "^5.0.1-alpha.2",
"@babel/core": "^7.14.8",
"@babel/runtime": "^7.14.8",
"@react-native-community/cli-platform-ios": "^5.0.1",
"@types/react-test-renderer": "17.0.1",
"babel-jest": "^27.0.2",
"metro-react-native-babel-preset": "^0.66.0",
"babel-jest": "^27.0.6",
"metro-react-native-babel-preset": "^0.66.2",
"react-test-renderer": "17.0.2"
},
"jest": {
+11 -11
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/react-identicon",
"version": "0.81.1",
"version": "0.84.3",
"type": "module",
"description": "Renders an SVG picture representing an address",
"main": "index.js",
@@ -12,13 +12,13 @@
"maintainers": [],
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.14.5",
"@polkadot/keyring": "^6.9.1",
"@polkadot/ui-settings": "0.81.1",
"@polkadot/ui-shared": "0.81.1",
"@polkadot/util": "^6.9.1",
"@polkadot/util-crypto": "^6.9.1",
"color": "^3.1.3",
"@babel/runtime": "^7.14.8",
"@polkadot/keyring": "^7.1.1",
"@polkadot/ui-settings": "0.84.3",
"@polkadot/ui-shared": "0.84.3",
"@polkadot/util": "^7.1.1",
"@polkadot/util-crypto": "^7.1.1",
"color": "^3.2.1",
"ethereum-blockies-base64": "^1.0.2",
"jdenticon": "3.1.0",
"react-copy-to-clipboard": "^5.0.3",
@@ -34,9 +34,9 @@
"styled-components": "*"
},
"devDependencies": {
"@types/react-copy-to-clipboard": "^5.0.0",
"@types/react-dom": "^17.0.7",
"@types/styled-components": "^5.1.10",
"@types/react-copy-to-clipboard": "^5.0.1",
"@types/react-dom": "^17.0.9",
"@types/styled-components": "^5.1.11",
"styled-components": "^5.3.0",
"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) {
+2 -2
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);
+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';
+2 -5
View File
@@ -3,11 +3,8 @@
import './detectPackage';
import { Identicon } from './Identicon';
import { Identicon } from './bundle';
export * from './icons';
export { packageInfo } from './packageInfo';
export { Identicon };
export * from './bundle';
export default Identicon;
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/react-identicon', version: '0.81.1' };
export const packageInfo = { name: '@polkadot/react-identicon', version: '0.84.3' };
+6 -6
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/react-qr",
"version": "0.81.1",
"version": "0.84.3",
"type": "module",
"description": "Generates and reads QR codes",
"main": "index.js",
@@ -9,16 +9,16 @@
"maintainers": [],
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.14.5",
"@polkadot/util": "^6.9.1",
"@polkadot/util-crypto": "^6.9.1",
"@babel/runtime": "^7.14.8",
"@polkadot/util": "^7.1.1",
"@polkadot/util-crypto": "^7.1.1",
"qrcode-generator": "^1.4.4",
"react-qr-reader": "^2.2.1",
"styled-components": "^5.3.0"
},
"devDependencies": {
"@types/react-qr-reader": "^2.1.3",
"@types/styled-components": "^5.1.10"
"@types/react-qr-reader": "^2.1.4",
"@types/styled-components": "^5.1.11"
},
"peerDependencies": {
"@polkadot/util": "*",
+18 -6
View File
@@ -30,24 +30,36 @@ function ScanAddress ({ className, isEthereum, onError, onScan, size, style }: P
(data: string | null): void => {
if (data) {
try {
const [prefix, content, genesisHash, ...name] = data.split(':');
const isValidPrefix = (prefix === (isEthereum ? 'ethereum' : 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, isEthereum]
[onScan, onError, isEthereum]
);
return (
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/react-qr', version: '0.81.1' };
export const packageInfo = { name: '@polkadot/react-qr', version: '0.84.3' };
+6 -6
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/reactnative-identicon",
"version": "0.81.1",
"version": "0.84.3",
"type": "module",
"description": "Renders an SVG picture representing an address",
"main": "index.js",
@@ -12,10 +12,10 @@
"maintainers": [],
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.14.5",
"@polkadot/ui-shared": "0.81.1",
"@polkadot/util": "^6.9.1",
"@polkadot/util-crypto": "^6.9.1",
"@babel/runtime": "^7.14.8",
"@polkadot/ui-shared": "0.84.3",
"@polkadot/util": "^7.1.1",
"@polkadot/util-crypto": "^7.1.1",
"react-native-svg": "^12.1.1"
},
"peerDependencies": {
@@ -25,6 +25,6 @@
"react-native": "*"
},
"devDependencies": {
"@types/react-native": "^0.64.10"
"@types/react-native": "^0.64.12"
}
}
@@ -33,7 +33,7 @@ const Components: Record<string, React.ComponentType<ComponentProps>> = {
};
export default class IdentityIcon extends React.PureComponent<Props, State> {
public state: State = {
public override state: State = {
address: '',
publicKey: '0x'
};
@@ -62,7 +62,7 @@ export default class IdentityIcon extends React.PureComponent<Props, State> {
}
}
public render (): React.ReactNode {
public override render (): React.ReactNode {
const { theme = DEFAULT_THEME, size = DEFAULT_SIZE } = this.props;
const { address, publicKey } = this.state;
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/reactnative-identicon', version: '0.81.1' };
export const packageInfo = { name: '@polkadot/reactnative-identicon', version: '0.84.3' };
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "@polkadot/ui-assets",
"version": "0.81.1",
"version": "0.84.3",
"description": "Static assets shared accross projects",
"main": "index.js",
"author": "Jaco Greeff <jacogr@gmail.com>",
"maintainers": [],
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.14.5"
"@babel/runtime": "^7.14.8"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/ui-assets', version: '0.81.1' };
export const packageInfo = { name: '@polkadot/ui-assets', version: '0.84.3' };
+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 () {
+8 -8
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/ui-keyring",
"version": "0.81.1",
"version": "0.84.3",
"type": "module",
"main": "index.js",
"sideEffects": [
@@ -13,17 +13,17 @@
"contributors": [],
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.14.5",
"@polkadot/hw-ledger": "^6.9.1",
"@polkadot/keyring": "^6.9.1",
"@polkadot/ui-settings": "0.81.1",
"@polkadot/util": "^6.9.1",
"@polkadot/x-rxjs": "^6.9.1",
"@babel/runtime": "^7.14.8",
"@polkadot/hw-ledger": "^7.1.1",
"@polkadot/keyring": "^7.1.1",
"@polkadot/ui-settings": "0.84.3",
"@polkadot/util": "^7.1.1",
"mkdirp": "^1.0.4",
"rxjs": "^7.2.0",
"store": "^2.0.12"
},
"devDependencies": {
"@types/mkdirp": "^1.0.1",
"@types/mkdirp": "^1.0.2",
"@types/store": "^2.0.2"
},
"peerDependencies": {
+3 -3
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';
@@ -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);
}
}
+2 -2
View File
@@ -8,8 +8,8 @@ import type { KeypairType } from '@polkadot/util-crypto/types';
import type { AddressSubject, SingleAddress } from './observable/types';
import type { CreateResult, KeyringAddress, KeyringAddressType, KeyringItemType, KeyringJson, KeyringJson$Meta, KeyringOptions, KeyringPairs$Json, KeyringStruct } from './types';
import { createPair } from '@polkadot/keyring/pair';
import { chains } from '@polkadot/ui-settings/defaults/chains';
import { createPair } from '@polkadot/keyring';
import { chains } from '@polkadot/ui-settings';
import { bnToBn, hexToU8a, isHex, isString, stringToU8a, u8aSorted, u8aToString } from '@polkadot/util';
import { base64Decode, createKeyMulti, jsonDecrypt, jsonEncrypt } from '@polkadot/util-crypto';
+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 };
+2 -7
View File
@@ -3,13 +3,8 @@
import './detectPackage';
import { Keyring } from './Keyring';
import { keyring } from './bundle';
export { Ledger } from '@polkadot/hw-ledger';
export { packageInfo } from './packageInfo';
const keyring = new Keyring();
export { Keyring, keyring };
export * from './bundle';
export default keyring;
+1 -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,7 @@ 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 { createOptionItem } from '../options/item';
import { env } from './env';
+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';
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/ui-keyring', version: '0.81.1' };
export const packageInfo = { name: '@polkadot/ui-keyring', version: '0.84.3' };
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/ui-settings",
"version": "0.81.1",
"version": "0.84.3",
"type": "module",
"description": "Manages app settings",
"main": "index.js",
@@ -9,9 +9,9 @@
"maintainers": [],
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.14.5",
"@polkadot/networks": "^6.9.1",
"@polkadot/util": "^6.9.1",
"@babel/runtime": "^7.14.8",
"@polkadot/networks": "^7.1.1",
"@polkadot/util": "^7.1.1",
"eventemitter3": "^4.0.7",
"store": "^2.0.12"
},
+10 -1
View File
@@ -8,7 +8,7 @@ import store from 'store';
import { isUndefined } from '@polkadot/util';
import { CAMERA, CAMERA_DEFAULT, CRYPTOS, CRYPTOS_ETH, CRYPTOS_LEDGER, ENDPOINT_DEFAULT, ENDPOINTS, ICON_DEFAULT, ICONS, LANGUAGE_DEFAULT, LEDGER_CONN, LEDGER_CONN_DEFAULT, LOCKING, LOCKING_DEFAULT, PREFIX_DEFAULT, PREFIXES, UIMODE_DEFAULT, UIMODES, UITHEME_DEFAULT, UITHEMES } from './defaults';
import { CAMERA, CAMERA_DEFAULT, CRYPTOS, CRYPTOS_ETH, CRYPTOS_LEDGER, ENDPOINT_DEFAULT, ENDPOINTS, ICON_DEFAULT, ICONS, LANGUAGE_DEFAULT, LEDGER_CONN, LEDGER_CONN_DEFAULT, LOCKING, LOCKING_DEFAULT, NOTIFICATION_DEFAULT, PREFIX_DEFAULT, PREFIXES, UIMODE_DEFAULT, UIMODES, UITHEME_DEFAULT, UITHEMES } from './defaults';
type ChangeCallback = (settings: SettingsStruct) => void;
type OnTypes = 'change';
@@ -45,6 +45,8 @@ export class Settings implements SettingsStruct {
#uiTheme: string;
#notification: string;
constructor () {
const settings = (store.get('settings') as SettingsStruct) || {};
@@ -61,6 +63,7 @@ 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 {
@@ -83,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;
}
@@ -156,6 +163,7 @@ export class Settings implements SettingsStruct {
icon: this.#icon,
ledgerConn: this.#ledgerConn,
locking: this.#locking,
notification: this.#notification,
prefix: this.#prefix,
uiMode: this.#uiMode,
uiTheme: this.#uiTheme
@@ -170,6 +178,7 @@ export class Settings implements SettingsStruct {
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 };
+2 -2
View File
@@ -1,11 +1,11 @@
// Copyright 2017-2021 @polkadot/ui-settings authors & contributors
// SPDX-License-Identifier: Apache-2.0
import known from '@polkadot/networks';
import { selectableNetworks } from '@polkadot/networks';
type ChainDef = string[];
const chains: Record <string, ChainDef> = known
const chains: Record <string, ChainDef> = selectableNetworks
.filter((n) => n.genesisHash.length)
.reduce((chains, { genesisHash, network }) => ({ ...chains, [network]: genesisHash }), {});
+2 -1
View File
@@ -7,7 +7,7 @@ import { CRYPTOS, CRYPTOS_ETH, CRYPTOS_LEDGER } from './crypto';
import { ENDPOINT_DEFAULT, ENDPOINTS } from './endpoints';
import { LEDGER_CONN, LEDGER_CONN_DEFAULT } from './ledger';
import { PREFIX_DEFAULT, PREFIXES } from './ss58';
import { ICON_DEFAULT, ICON_DEFAULT_HOST, ICONS, UIMODE_DEFAULT, UIMODES, UITHEME_DEFAULT, UITHEMES } from './ui';
import { ICON_DEFAULT, ICON_DEFAULT_HOST, ICONS, NOTIFICATION_DEFAULT, UIMODE_DEFAULT, UIMODES, UITHEME_DEFAULT, UITHEMES } from './ui';
const CAMERA_DEFAULT = 'off';
@@ -57,6 +57,7 @@ export {
LEDGER_CONN,
LOCKING_DEFAULT,
LOCKING,
NOTIFICATION_DEFAULT,
PREFIX_DEFAULT,
PREFIXES,
UIMODE_DEFAULT,
+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 -5
View File
@@ -1,11 +1,8 @@
// Copyright 2017-2021 @polkadot/ui-settings authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { Settings, settings } from './Settings';
import { settings } from './bundle';
export { ENDPOINT_DEFAULT, ICON_DEFAULT, ICON_DEFAULT_HOST, LANGUAGE_DEFAULT, LOCKING_DEFAULT, PREFIX_DEFAULT, UIMODE_DEFAULT, UITHEME_DEFAULT } from './defaults';
export { packageInfo } from './packageInfo';
export { settings, Settings };
export * from './bundle';
export default settings;
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/ui-settings', version: '0.81.1' };
export const packageInfo = { name: '@polkadot/ui-settings', version: '0.84.3' };
+1
View File
@@ -16,6 +16,7 @@ export interface SettingsStruct {
icon: string;
ledgerConn: string;
locking: string;
notification: string;
prefix: number;
uiMode: string;
uiTheme: string;
+6 -6
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/ui-shared",
"version": "0.81.1",
"version": "0.84.3",
"type": "module",
"description": "Shared logic that is usable accross all frameworks-specific areas",
"main": "index.js",
@@ -9,17 +9,17 @@
"maintainers": [],
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.14.5",
"color": "^3.1.3"
"@babel/runtime": "^7.14.8",
"color": "^3.2.1"
},
"peerDependencies": {
"@polkadot/util": "*",
"@polkadot/util-crypto": "*"
},
"devDependencies": {
"@polkadot/util": "^6.9.1",
"@polkadot/util-crypto": "^6.9.1",
"@types/color": "^3.0.1",
"@polkadot/util": "^7.1.1",
"@polkadot/util-crypto": "^7.1.1",
"@types/color": "^3.0.2",
"@types/xmlserializer": "^0.6.2"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/ui-shared', version: '0.81.1' };
export const packageInfo = { name: '@polkadot/ui-shared', version: '0.84.3' };
+5 -5
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/vue-identicon",
"version": "0.81.1",
"version": "0.84.3",
"type": "module",
"description": "Renders an SVG picture representing an address",
"author": "Jaco Greeff <jacogr@gmail.com>",
@@ -12,10 +12,10 @@
],
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.14.5",
"@polkadot/ui-shared": "0.81.1",
"@polkadot/util": "^6.9.1",
"@polkadot/util-crypto": "^6.9.1",
"@babel/runtime": "^7.14.8",
"@polkadot/ui-shared": "0.84.3",
"@polkadot/util": "^7.1.1",
"@polkadot/util-crypto": "^7.1.1",
"jdenticon": "3.1.0"
},
"peerDependencies": {
+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';
+2 -2
View File
@@ -3,8 +3,8 @@
import './detectPackage';
import { Identicon } from './Identicon';
import { Identicon } from './bundle';
export { packageInfo } from './packageInfo';
export * from './bundle';
export default Identicon;
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/vue-identicon', version: '0.81.1' };
export const packageInfo = { name: '@polkadot/vue-identicon', version: '0.84.3' };
+58
View File
@@ -0,0 +1,58 @@
// Copyright 2017-2021 @polkadot/ui authors & contributors
// SPDX-License-Identifier: Apache-2.0
import path from 'path';
import { createBundle } from '@polkadot/dev/config/rollup';
const pkgs = [
'@polkadot/react-identicon',
'@polkadot/react-qr',
'@polkadot/ui-keyring',
'@polkadot/ui-settings',
'@polkadot/vue-identicon'
];
const external = [
...pkgs,
'@polkadot/hw-ledger',
'@polkadot/keyring',
'@polkadot/util',
'@polkadot/util-crypto',
'react',
'react-dom',
'vue',
'vue-router'
];
const globals = {
react: 'React',
'react-dom': 'ReactDOM',
vue: 'Vue',
'vue-router': 'VueRouter'
};
const entries = ['ui-shared'].reduce((all, p) => ({
...all,
[`@polkadot/${p}`]: path.resolve(process.cwd(), `packages/${p}/build`)
}), {
// re-exported in @polkadot/util-crypto, map directly
'@polkadot/networks': '@polkadot/util-crypto'
});
const overrides = {};
export default pkgs.map((pkg) => {
const override = (overrides[pkg] || {});
return createBundle({
external,
globals,
pkg,
...override,
entries: {
...entries,
...(override.entries || {})
}
});
});
+1123 -977
View File
File diff suppressed because it is too large Load Diff