Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5f00d9f310 | ||
|
|
9393bb9b3f | ||
|
|
120fe69329 | ||
|
|
fd9fdf37d9 | ||
|
|
b857ce4614 | ||
|
|
78450918dc | ||
|
|
3b0b86c4b7 | ||
|
|
335296bc56 | ||
|
|
beca59750a | ||
|
|
a5dc09f7e7 | ||
|
|
2e892c00cd | ||
|
|
d168127e23 | ||
|
|
6ae99fa573 | ||
|
|
d7a30db878 |
@@ -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
@@ -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"
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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' };
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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' };
|
||||
|
||||
@@ -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"
|
||||
},
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -11,7 +11,7 @@ import { Identicon } from '.';
|
||||
const THEMES = ['beachball', 'polkadot', 'substrate'];
|
||||
|
||||
export default class Demo extends React.PureComponent {
|
||||
public render (): React.ReactNode {
|
||||
public override render (): React.ReactNode {
|
||||
const identities: string[] = [];
|
||||
|
||||
while (identities.length !== 50) {
|
||||
|
||||
@@ -58,7 +58,7 @@ const Wrapper = styled.div`
|
||||
`;
|
||||
|
||||
class BaseIcon extends React.PureComponent<Props, State> {
|
||||
public state: State = {
|
||||
public override state: State = {
|
||||
address: '',
|
||||
publicKey: '0x'
|
||||
};
|
||||
@@ -98,7 +98,7 @@ class BaseIcon extends React.PureComponent<Props, State> {
|
||||
}
|
||||
}
|
||||
|
||||
public render (): React.ReactNode {
|
||||
public override render (): React.ReactNode {
|
||||
const { address } = this.state;
|
||||
const wrapped = this.getWrapped(this.state, this.props);
|
||||
|
||||
|
||||
@@ -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' };
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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 (
|
||||
|
||||
@@ -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' };
|
||||
|
||||
@@ -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' };
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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' };
|
||||
|
||||
@@ -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"
|
||||
},
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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' };
|
||||
|
||||
@@ -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"
|
||||
},
|
||||
|
||||
@@ -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' };
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
|
||||
@@ -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' };
|
||||
|
||||
@@ -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": {
|
||||
|
||||
@@ -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' };
|
||||
|
||||
Reference in New Issue
Block a user