Compare commits

..
14 Commits
Author SHA1 Message Date
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
29 changed files with 647 additions and 652 deletions
+13
View File
@@ -1,5 +1,18 @@
# CHANGELOG
## 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:
+6 -6
View File
@@ -8,7 +8,7 @@
"packages/*"
],
"resolutions": {
"typescript": "^4.3.2"
"typescript": "^4.3.4"
},
"scripts": {
"build": "polkadot-dev-build-ts",
@@ -27,10 +27,10 @@
"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",
"@babel/core": "^7.14.6",
"@babel/runtime": "^7.14.6",
"@polkadot/dev": "^0.62.43",
"@polkadot/ts": "^0.4.1",
"@types/jest": "^26.0.23",
"babel-plugin-transform-vue-template": "^0.4.2",
"empty": "^0.10.1",
@@ -43,5 +43,5 @@
"webpack-cli": "^3.3.12",
"webpack-serve": "^3.2.0"
},
"version": "0.81.1"
"version": "0.82.1"
}
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "@polkadot/example-react",
"version": "0.81.1",
"version": "0.82.1",
"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.6"
}
}
+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.82.1' };
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "@polkadot/example-vue",
"version": "0.81.1",
"version": "0.82.1",
"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.6"
}
}
+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.82.1' };
+11 -11
View File
@@ -1,6 +1,6 @@
{
"name": "exampleReactNative",
"version": "0.81.1",
"version": "0.82.1",
"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": "^6.10.1",
"@polkadot/reactnative-identicon": "0.82.1",
"@polkadot/ui-keyring": "0.82.1",
"@polkadot/ui-settings": "0.82.1",
"@polkadot/util": "^6.10.1",
"@polkadot/util-crypto": "^6.10.1",
"@react-native-community/async-storage": "^1.12.1",
"fast-text-encoding": "^1.0.3",
"get-yarn-workspaces": "^1.0.2",
@@ -30,11 +30,11 @@
"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.6",
"@babel/runtime": "^7.14.6",
"@react-native-community/cli-platform-ios": "^5.0.1",
"@types/react-test-renderer": "17.0.1",
"babel-jest": "^27.0.2",
"babel-jest": "^27.0.5",
"metro-react-native-babel-preset": "^0.66.0",
"react-test-renderer": "17.0.2"
},
+8 -8
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/react-identicon",
"version": "0.81.1",
"version": "0.82.1",
"type": "module",
"description": "Renders an SVG picture representing an address",
"main": "index.js",
@@ -12,12 +12,12 @@
"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",
"@babel/runtime": "^7.14.6",
"@polkadot/keyring": "^6.10.1",
"@polkadot/ui-settings": "0.82.1",
"@polkadot/ui-shared": "0.82.1",
"@polkadot/util": "^6.10.1",
"@polkadot/util-crypto": "^6.10.1",
"color": "^3.1.3",
"ethereum-blockies-base64": "^1.0.2",
"jdenticon": "3.1.0",
@@ -35,7 +35,7 @@
},
"devDependencies": {
"@types/react-copy-to-clipboard": "^5.0.0",
"@types/react-dom": "^17.0.7",
"@types/react-dom": "^17.0.8",
"@types/styled-components": "^5.1.10",
"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);
+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.82.1' };
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/react-qr",
"version": "0.81.1",
"version": "0.82.1",
"type": "module",
"description": "Generates and reads QR codes",
"main": "index.js",
@@ -9,9 +9,9 @@
"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.6",
"@polkadot/util": "^6.10.1",
"@polkadot/util-crypto": "^6.10.1",
"qrcode-generator": "^1.4.4",
"react-qr-reader": "^2.2.1",
"styled-components": "^5.3.0"
+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.82.1' };
+5 -5
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/reactnative-identicon",
"version": "0.81.1",
"version": "0.82.1",
"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.6",
"@polkadot/ui-shared": "0.82.1",
"@polkadot/util": "^6.10.1",
"@polkadot/util-crypto": "^6.10.1",
"react-native-svg": "^12.1.1"
},
"peerDependencies": {
@@ -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.82.1' };
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "@polkadot/ui-assets",
"version": "0.81.1",
"version": "0.82.1",
"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.6"
}
}
+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.82.1' };
+7 -7
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/ui-keyring",
"version": "0.81.1",
"version": "0.82.1",
"type": "module",
"main": "index.js",
"sideEffects": [
@@ -13,12 +13,12 @@
"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.6",
"@polkadot/hw-ledger": "^6.10.1",
"@polkadot/keyring": "^6.10.1",
"@polkadot/ui-settings": "0.82.1",
"@polkadot/util": "^6.10.1",
"@polkadot/x-rxjs": "^6.10.1",
"mkdirp": "^1.0.4",
"store": "^2.0.12"
},
+2 -2
View File
@@ -7,7 +7,7 @@ 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 { 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);
}
}
+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.82.1' };
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/ui-settings",
"version": "0.81.1",
"version": "0.82.1",
"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.6",
"@polkadot/networks": "^6.10.1",
"@polkadot/util": "^6.10.1",
"eventemitter3": "^4.0.7",
"store": "^2.0.12"
},
+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.82.1' };
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/ui-shared",
"version": "0.81.1",
"version": "0.82.1",
"type": "module",
"description": "Shared logic that is usable accross all frameworks-specific areas",
"main": "index.js",
@@ -9,7 +9,7 @@
"maintainers": [],
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.14.5",
"@babel/runtime": "^7.14.6",
"color": "^3.1.3"
},
"peerDependencies": {
@@ -17,8 +17,8 @@
"@polkadot/util-crypto": "*"
},
"devDependencies": {
"@polkadot/util": "^6.9.1",
"@polkadot/util-crypto": "^6.9.1",
"@polkadot/util": "^6.10.1",
"@polkadot/util-crypto": "^6.10.1",
"@types/color": "^3.0.1",
"@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.82.1' };
+5 -5
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/vue-identicon",
"version": "0.81.1",
"version": "0.82.1",
"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.6",
"@polkadot/ui-shared": "0.82.1",
"@polkadot/util": "^6.10.1",
"@polkadot/util-crypto": "^6.10.1",
"jdenticon": "3.1.0"
},
"peerDependencies": {
+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.82.1' };
+539 -569
View File
File diff suppressed because it is too large Load Diff