Compare commits

..
16 Commits
Author SHA1 Message Date
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
34 changed files with 1029 additions and 1003 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ name: 'Lock Threads'
on:
schedule:
- cron: '4 4 * * *'
- cron: '30 1/2 * * *'
jobs:
lock:
+1 -1
View File
@@ -7,7 +7,7 @@ on:
jobs:
check:
if: "! startsWith(github.event.head_commit.message, '[CI Skip]') && (!github.event.issue.pull_request || github.event.pull_request.head.repo.full_name == github.repository)"
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
+1 -1
View File
@@ -1,7 +1,7 @@
name: 'Close stale issues and PRs'
on:
schedule:
- cron: '2 2 * * *'
- cron: '30 2/2 * * *'
jobs:
stale:
+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');
+20
View File
@@ -1,5 +1,25 @@
# CHANGELOG
## 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:
+6 -6
View File
@@ -27,10 +27,10 @@
"test:one": "polkadot-dev-run-test"
},
"devDependencies": {
"@babel/core": "^7.14.3",
"@babel/runtime": "^7.14.0",
"@polkadot/dev": "^0.62.38",
"@polkadot/ts": "^0.3.86",
"@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-plugin-transform-vue-template": "^0.4.2",
"empty": "^0.10.1",
@@ -38,10 +38,10 @@
"react-dom": "^17.0.2",
"react-is": "^17.0.2",
"react-native": "^0.64.2",
"vue-template-compiler": "^2.6.13",
"vue-template-compiler": "^2.6.14",
"webpack": "^4.46.0",
"webpack-cli": "^3.3.12",
"webpack-serve": "^3.2.0"
},
"version": "0.79.1"
"version": "0.81.1"
}
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "@polkadot/example-react",
"version": "0.79.1",
"version": "0.81.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.0"
"@babel/runtime": "^7.14.5"
}
}
+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.79.1' };
export const packageInfo = { name: '@polkadot/example-react', version: '0.81.1' };
+1 -1
View File
@@ -17,7 +17,7 @@ module.exports = {
use: [
{
loader: 'babel-loader',
options: require('../../babel.config.js')
options: require('../../babel.config.cjs')
}
]
}
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "@polkadot/example-vue",
"version": "0.79.1",
"version": "0.81.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.0"
"@babel/runtime": "^7.14.5"
}
}
+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.79.1' };
export const packageInfo = { name: '@polkadot/example-vue', version: '0.81.1' };
+1 -1
View File
@@ -18,7 +18,7 @@ module.exports = {
use: [
{
loader: 'babel-loader',
options: require('../../babel.config.js')
options: require('../../babel.config.cjs')
}
]
},
+9 -9
View File
@@ -1,6 +1,6 @@
{
"name": "exampleReactNative",
"version": "0.79.1",
"version": "0.81.1",
"private": true,
"scripts": {
"copy-workspace-packages": "yarn copy-identicon && yarn copy-ui-shared",
@@ -12,12 +12,12 @@
"test": "jest"
},
"dependencies": {
"@polkadot/keyring": "^6.7.1",
"@polkadot/reactnative-identicon": "0.79.1",
"@polkadot/ui-keyring": "0.79.1",
"@polkadot/ui-settings": "0.79.1",
"@polkadot/util": "^6.7.1",
"@polkadot/util-crypto": "^6.7.1",
"@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",
"@react-native-community/async-storage": "^1.12.1",
"fast-text-encoding": "^1.0.3",
"get-yarn-workspaces": "^1.0.2",
@@ -30,8 +30,8 @@
"stream-http": "^3.2.0"
},
"devDependencies": {
"@babel/core": "^7.14.3",
"@babel/runtime": "^7.14.0",
"@babel/core": "^7.14.5",
"@babel/runtime": "^7.14.5",
"@react-native-community/cli-platform-ios": "^5.0.1-alpha.2",
"@types/react-test-renderer": "17.0.1",
"babel-jest": "^27.0.2",
+9 -9
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/react-identicon",
"version": "0.79.1",
"version": "0.81.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.0",
"@polkadot/keyring": "^6.7.1",
"@polkadot/ui-settings": "0.79.1",
"@polkadot/ui-shared": "0.79.1",
"@polkadot/util": "^6.7.1",
"@polkadot/util-crypto": "^6.7.1",
"@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",
"ethereum-blockies-base64": "^1.0.2",
"jdenticon": "3.1.0",
@@ -35,8 +35,8 @@
},
"devDependencies": {
"@types/react-copy-to-clipboard": "^5.0.0",
"@types/react-dom": "^17.0.6",
"@types/styled-components": "^5.1.9",
"@types/react-dom": "^17.0.7",
"@types/styled-components": "^5.1.10",
"styled-components": "^5.3.0",
"xmlserializer": "^0.6.1"
}
+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.79.1' };
export const packageInfo = { name: '@polkadot/react-identicon', version: '0.81.1' };
+5 -5
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/react-qr",
"version": "0.79.1",
"version": "0.81.1",
"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.0",
"@polkadot/util": "^6.7.1",
"@polkadot/util-crypto": "^6.7.1",
"@babel/runtime": "^7.14.5",
"@polkadot/util": "^6.9.1",
"@polkadot/util-crypto": "^6.9.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.9"
"@types/styled-components": "^5.1.10"
},
"peerDependencies": {
"@polkadot/util": "*",
+4 -3
View File
@@ -22,15 +22,16 @@ 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;
const isValidPrefix = (prefix === (isEthereum ? 'ethereum' : ADDRESS_PREFIX)) || (prefix === SEED_PREFIX);
assert(isValidPrefix, `Invalid prefix received, expected '${ADDRESS_PREFIX}/${SEED_PREFIX}' , found '${prefix}'`);
@@ -46,7 +47,7 @@ function ScanAddress ({ className, onError, onScan, size, style }: Props): React
}
}
},
[onScan]
[onScan, 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.79.1' };
export const packageInfo = { name: '@polkadot/react-qr', version: '0.81.1' };
+5 -5
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/reactnative-identicon",
"version": "0.79.1",
"version": "0.81.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.0",
"@polkadot/ui-shared": "0.79.1",
"@polkadot/util": "^6.7.1",
"@polkadot/util-crypto": "^6.7.1",
"@babel/runtime": "^7.14.5",
"@polkadot/ui-shared": "0.81.1",
"@polkadot/util": "^6.9.1",
"@polkadot/util-crypto": "^6.9.1",
"react-native-svg": "^12.1.1"
},
"peerDependencies": {
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/reactnative-identicon', version: '0.79.1' };
export const packageInfo = { name: '@polkadot/reactnative-identicon', version: '0.81.1' };
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "@polkadot/ui-assets",
"version": "0.79.1",
"version": "0.81.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.0"
"@babel/runtime": "^7.14.5"
}
}
+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.79.1' };
export const packageInfo = { name: '@polkadot/ui-assets', version: '0.81.1' };
+7 -7
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/ui-keyring",
"version": "0.79.1",
"version": "0.81.1",
"type": "module",
"main": "index.js",
"sideEffects": [
@@ -13,12 +13,12 @@
"contributors": [],
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.14.0",
"@polkadot/hw-ledger": "^6.7.1",
"@polkadot/keyring": "^6.7.1",
"@polkadot/ui-settings": "0.79.1",
"@polkadot/util": "^6.7.1",
"@polkadot/x-rxjs": "^6.7.1",
"@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",
"mkdirp": "^1.0.4",
"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-keyring', version: '0.79.1' };
export const packageInfo = { name: '@polkadot/ui-keyring', version: '0.81.1' };
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/ui-settings",
"version": "0.79.1",
"version": "0.81.1",
"type": "module",
"description": "Manages app settings",
"main": "index.js",
@@ -9,9 +9,9 @@
"maintainers": [],
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.14.0",
"@polkadot/networks": "^6.7.1",
"@polkadot/util": "^6.7.1",
"@babel/runtime": "^7.14.5",
"@polkadot/networks": "^6.9.1",
"@polkadot/util": "^6.9.1",
"eventemitter3": "^4.0.7",
"store": "^2.0.12"
},
+12 -1
View File
@@ -1,7 +1,7 @@
// 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';
@@ -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;
@@ -47,7 +50,9 @@ export class Settings implements SettingsStruct {
this.#emitter = new EventEmitter();
// will become deprecated for supporting substrate connect light clients. apiType structure should be used instead
this.#apiUrl = (typeof settings.apiUrl === 'string' && settings.apiUrl) || 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;
@@ -62,6 +67,10 @@ export class Settings implements SettingsStruct {
return this.#camera;
}
public get apiType (): Endpoint {
return this.#apiType;
}
public get apiUrl (): string {
return this.#apiUrl;
}
@@ -140,6 +149,7 @@ export class Settings implements SettingsStruct {
public get (): SettingsStruct {
return {
apiType: this.#apiType,
apiUrl: this.#apiUrl,
camera: this.#camera,
i18nLang: this.#i18nLang,
@@ -153,6 +163,7 @@ 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;
+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.79.1' };
export const packageInfo = { name: '@polkadot/ui-settings', version: '0.81.1' };
+8
View File
@@ -9,6 +9,7 @@ export type Option = {
}
export interface SettingsStruct {
apiType: Endpoint;
apiUrl: string;
camera: string;
i18nLang: string;
@@ -28,3 +29,10 @@ export interface NetworkSpecsStruct {
title: string;
unit: string;
}
export interface Endpoint {
type: EndpointType;
param: string;
}
export type EndpointType = 'json-rpc' | 'substrate-connect';
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/ui-shared",
"version": "0.79.1",
"version": "0.81.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.0",
"@babel/runtime": "^7.14.5",
"color": "^3.1.3"
},
"peerDependencies": {
@@ -17,8 +17,8 @@
"@polkadot/util-crypto": "*"
},
"devDependencies": {
"@polkadot/util": "^6.7.1",
"@polkadot/util-crypto": "^6.7.1",
"@polkadot/util": "^6.9.1",
"@polkadot/util-crypto": "^6.9.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.79.1' };
export const packageInfo = { name: '@polkadot/ui-shared', version: '0.81.1' };
+6 -6
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/vue-identicon",
"version": "0.79.1",
"version": "0.81.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.0",
"@polkadot/ui-shared": "0.79.1",
"@polkadot/util": "^6.7.1",
"@polkadot/util-crypto": "^6.7.1",
"@babel/runtime": "^7.14.5",
"@polkadot/ui-shared": "0.81.1",
"@polkadot/util": "^6.9.1",
"@polkadot/util-crypto": "^6.9.1",
"jdenticon": "3.1.0"
},
"peerDependencies": {
@@ -24,6 +24,6 @@
"vue": "*"
},
"devDependencies": {
"vue": "^2.6.13"
"vue": "^2.6.14"
}
}
+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.79.1' };
export const packageInfo = { name: '@polkadot/vue-identicon', version: '0.81.1' };
+902 -923
View File
File diff suppressed because it is too large Load Diff