diff --git a/.eslintrc.js b/.eslintrc.js index 6c7b069f50..1c4b430cbc 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/apps authors & contributors // SPDX-License-Identifier: Apache-2.0 -const base = require('@polkadot/dev/config/eslint'); +const base = require('@polkadot/dev/config/eslint.cjs'); // add override for any (a metric ton of them, initial conversion) module.exports = { diff --git a/babel.config.js b/babel.config.js index 5f7cbd77eb..2ece115a9c 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,4 +1,4 @@ // Copyright 2017-2020 @polkadot/apps authors & contributors // SPDX-License-Identifier: Apache-2.0 -module.exports = require('@polkadot/dev/config/babel'); +module.exports = require('@polkadot/dev/config/babel-config-cjs.cjs'); diff --git a/jest.config.js b/jest.config.js index 8b0fbabf67..9cf870a79c 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/apps authors & contributors // SPDX-License-Identifier: Apache-2.0 -const config = require('@polkadot/dev/config/jest'); +const config = require('@polkadot/dev/config/jest.cjs'); const findPackages = require('./scripts/findPackages'); diff --git a/package.json b/package.json index 098630da13..d3884d9fd0 100644 --- a/package.json +++ b/package.json @@ -12,13 +12,13 @@ "packages/*" ], "resolutions": { - "@polkadot/api": "^2.6.1", - "@polkadot/api-contract": "^2.6.1", - "@polkadot/keyring": "^4.0.1", - "@polkadot/networks": "^4.0.1", - "@polkadot/types": "^2.6.1", - "@polkadot/util": "^4.0.1", - "@polkadot/util-crypto": "^4.0.1", + "@polkadot/api": "^2.6.2-7", + "@polkadot/api-contract": "^2.6.2-7", + "@polkadot/keyring": "^4.0.2-12", + "@polkadot/networks": "^4.0.2-12", + "@polkadot/types": "^2.6.2-7", + "@polkadot/util": "^4.0.2-12", + "@polkadot/util-crypto": "^4.0.2-12", "@polkadot/wasm-crypto": "^2.0.1", "babel-core": "^7.0.0-bridge.0", "styled-components": "^5.2.0", @@ -27,7 +27,7 @@ "scripts": { "analyze": "yarn clean && BUILD_ANALYZE=1 yarn run build:code && yarn source-map-explorer packages/apps/build/main.*.js", "build": "yarn run build:i18n && yarn run build:code", - "build:code": "NODE_ENV=production node_modules/@polkadot/dev/scripts/polkadot-dev-build-ts.js", + "build:code": "NODE_ENV=production node_modules/@polkadot/dev/scripts/polkadot-dev-build-ts.cjs", "build:i18n": "i18next-scanner --config i18next-scanner.config.js && node ./scripts/i18nSort.js", "build:release:electron": "yarn build && yarn build:electron && yarn postinstall:electron", "build:release:ipfs": "node scripts/ipfsUpload.js", @@ -65,8 +65,8 @@ "@babel/register": "^7.12.1", "@babel/runtime": "^7.12.1", "@pinata/sdk": "^1.1.11", - "@polkadot/dev": "^0.59.20", - "@polkadot/ts": "^0.3.53", + "@polkadot/dev": "^0.60.1", + "@polkadot/ts": "^0.3.54", "@types/bn.js": "^4.11.6", "@types/chart.js": "^2.9.27", "@types/file-saver": "^2.0.1", diff --git a/packages/apps-config/package.json b/packages/apps-config/package.json index edf606df58..7163b0742a 100644 --- a/packages/apps-config/package.json +++ b/packages/apps-config/package.json @@ -3,11 +3,9 @@ "private": true, "version": "0.66.2-5", "main": "index.js", - "repository": "https://github.com/polkadot-js/apps.git", + "repository": "github:polkadot-js/apps", "author": "Jaco Greeff ", - "maintainers": [ - "Jaco Greeff " - ], + "maintainers": [], "contributors": [], "license": "Apache-2.0", "dependencies": { @@ -15,7 +13,7 @@ "@babel/runtime": "^7.12.1", "@edgeware/node-types": "^3.0.7", "@laminar/type-definitions": "^0.2.0-beta.141", - "@polkadot/networks": "^4.0.1", + "@polkadot/networks": "^4.0.2-12", "@subsocial/types": "^0.4.7" } } diff --git a/packages/apps-config/src/settings/endpoints.ts b/packages/apps-config/src/settings/endpoints.ts index 6ab8ee07d5..a7d92fd412 100644 --- a/packages/apps-config/src/settings/endpoints.ts +++ b/packages/apps-config/src/settings/endpoints.ts @@ -171,69 +171,69 @@ function createLiveNetworks (t: TFunction): LinkOption[] { function createTestNetworks (t: TFunction): LinkOption[] { return [ // polkadot test relays - { - dnslink: 'rococo', - info: 'rococo', - text: t('rpc.rococo', 'Rococo', { ns: 'apps-config' }), - textBy: t('rpc.hosted.by', 'hosted by {{host}}', { ns: 'apps-config', replace: { host: 'Parity' } }), - value: 'wss://rococo-rpc.polkadot.io' - }, - { - info: 'rococoTick', - isChild: true, - text: t('rpc.rococo.tick', 'Tick', { ns: 'apps-config' }), - textBy: t('rpc.hosted.by', 'hosted by {{host}}', { ns: 'apps-config', replace: { host: 'Parity' } }), - value: 'wss://tick-rpc.polkadot.io' - }, - { - info: 'rococoTrick', - isChild: true, - text: t('rpc.rococo.trick', 'Trick', { ns: 'apps-config' }), - textBy: t('rpc.hosted.by', 'hosted by {{host}}', { ns: 'apps-config', replace: { host: 'Prity' } }), - value: 'wss://trick-rpc.polkadot.io' - }, - { - info: 'rococoTrack', - isChild: true, - text: t('rpc.rococo.track', 'Track', { ns: 'apps-config' }), - textBy: t('rpc.hosted.by', 'hosted by {{host}}', { ns: 'apps-config', replace: { host: 'Parity' } }), - value: 'wss://track-rpc.polkadot.io' - }, - { - info: 'rococoAcala', - isChild: true, - text: t('rpc.rococo.acala', 'Mandala PC1', { ns: 'apps-config' }), - textBy: t('rpc.hosted.by', 'hosted by {{host}}', { ns: 'apps-config', replace: { host: 'Acala' } }), - value: 'wss://rococo-1.acala.laminar.one' - }, - { - info: 'rococoDarwinia', - isChild: true, - text: t('rpc.rococo.darwinia', 'Darwinia PC1', { ns: 'apps-config' }), - textBy: t('rpc.hosted.by', 'hosted by {{host}}', { ns: 'apps-config', replace: { host: 'Darwinia Network' } }), - value: 'wss://parachain-rpc.darwinia.network' - }, - { - info: 'rococoPlasm', - isChild: true, - text: t('rpc.rococo.plasm', 'Plasm PC1', { ns: 'apps-config' }), - textBy: t('rpc.hosted.by', 'hosted by {{host}}', { ns: 'apps-config', replace: { host: 'Stake Technologies' } }), - value: 'wss://rpc.parachain.plasmnet.io' - }, - { - info: 'rococoRobonomics', - isChild: true, - text: t('rpc.rococo.robonomics', 'Robonomics PC1', { ns: 'apps-config' }), - textBy: t('rpc.hosted.by', 'hosted by {{host}}', { ns: 'apps-config', replace: { host: 'Airalab' } }), - value: 'wss://parachain-rpc.robonomics.network' - }, - { - info: 'rococoLaminar', - isChild: true, - text: t('rpc.rococo.laminar', 'Turbulence PC1', { ns: 'apps-config' }), - textBy: t('rpc.hosted.by', 'hosted by {{host}}', { ns: 'apps-config', replace: { host: 'Laminar' } }), - value: 'wss://rococo-1.laminar-chain.laminar.one' - }, + // { + // dnslink: 'rococo', + // info: 'rococo', + // text: t('rpc.rococo', 'Rococo', { ns: 'apps-config' }), + // textBy: t('rpc.hosted.by', 'hosted by {{host}}', { ns: 'apps-config', replace: { host: 'Parity' } }), + // value: 'wss://rococo-rpc.polkadot.io' + // }, + // { + // info: 'rococoTick', + // isChild: true, + // text: t('rpc.rococo.tick', 'Tick', { ns: 'apps-config' }), + // textBy: t('rpc.hosted.by', 'hosted by {{host}}', { ns: 'apps-config', replace: { host: 'Parity' } }), + // value: 'wss://tick-rpc.polkadot.io' + // }, + // { + // info: 'rococoTrick', + // isChild: true, + // text: t('rpc.rococo.trick', 'Trick', { ns: 'apps-config' }), + // textBy: t('rpc.hosted.by', 'hosted by {{host}}', { ns: 'apps-config', replace: { host: 'Prity' } }), + // value: 'wss://trick-rpc.polkadot.io' + // }, + // { + // info: 'rococoTrack', + // isChild: true, + // text: t('rpc.rococo.track', 'Track', { ns: 'apps-config' }), + // textBy: t('rpc.hosted.by', 'hosted by {{host}}', { ns: 'apps-config', replace: { host: 'Parity' } }), + // value: 'wss://track-rpc.polkadot.io' + // }, + // { + // info: 'rococoAcala', + // isChild: true, + // text: t('rpc.rococo.acala', 'Mandala PC1', { ns: 'apps-config' }), + // textBy: t('rpc.hosted.by', 'hosted by {{host}}', { ns: 'apps-config', replace: { host: 'Acala' } }), + // value: 'wss://rococo-1.acala.laminar.one' + // }, + // { + // info: 'rococoDarwinia', + // isChild: true, + // text: t('rpc.rococo.darwinia', 'Darwinia PC1', { ns: 'apps-config' }), + // textBy: t('rpc.hosted.by', 'hosted by {{host}}', { ns: 'apps-config', replace: { host: 'Darwinia Network' } }), + // value: 'wss://parachain-rpc.darwinia.network' + // }, + // { + // info: 'rococoPlasm', + // isChild: true, + // text: t('rpc.rococo.plasm', 'Plasm PC1', { ns: 'apps-config' }), + // textBy: t('rpc.hosted.by', 'hosted by {{host}}', { ns: 'apps-config', replace: { host: 'Stake Technologies' } }), + // value: 'wss://rpc.parachain.plasmnet.io' + // }, + // { + // info: 'rococoRobonomics', + // isChild: true, + // text: t('rpc.rococo.robonomics', 'Robonomics PC1', { ns: 'apps-config' }), + // textBy: t('rpc.hosted.by', 'hosted by {{host}}', { ns: 'apps-config', replace: { host: 'Airalab' } }), + // value: 'wss://parachain-rpc.robonomics.network' + // }, + // { + // info: 'rococoLaminar', + // isChild: true, + // text: t('rpc.rococo.laminar', 'Turbulence PC1', { ns: 'apps-config' }), + // textBy: t('rpc.hosted.by', 'hosted by {{host}}', { ns: 'apps-config', replace: { host: 'Laminar' } }), + // value: 'wss://rococo-1.laminar-chain.laminar.one' + // }, // alphabetical based on chain name { info: 'centrifuge', @@ -360,7 +360,7 @@ function createCustom (t: TFunction): LinkOption[] { : []; } -export default function create (t: TFunction): LinkOption[] { +export function createEndpoints (t: TFunction): LinkOption[] { return [ ...createCustom(t), { diff --git a/packages/apps-config/src/settings/index.ts b/packages/apps-config/src/settings/index.ts index 5bcdb2d076..9b5bf202a4 100644 --- a/packages/apps-config/src/settings/index.ts +++ b/packages/apps-config/src/settings/index.ts @@ -1,16 +1,8 @@ // Copyright 2017-2020 @polkadot/apps-config authors & contributors // SPDX-License-Identifier: Apache-2.0 -import createEndpoints from './endpoints'; -import createLanguages from './languages'; -import createSs58 from './ss58'; -import { CUSTOM_ENDPOINT_KEY } from './constants'; -import { ethereumNetworks } from './ethereumNetworks'; - -export { - createEndpoints, - createLanguages, - createSs58, - CUSTOM_ENDPOINT_KEY, - ethereumNetworks -}; +export { CUSTOM_ENDPOINT_KEY } from './constants'; +export { createEndpoints } from './endpoints'; +export { ethereumNetworks } from './ethereumNetworks'; +export { createLanguages } from './languages'; +export { createSs58 } from './ss58'; diff --git a/packages/apps-config/src/settings/languages.ts b/packages/apps-config/src/settings/languages.ts index 5ed94d14aa..897a4166df 100644 --- a/packages/apps-config/src/settings/languages.ts +++ b/packages/apps-config/src/settings/languages.ts @@ -4,7 +4,7 @@ import { TFunction } from 'i18next'; import { Option } from './types'; -export default function create (t: TFunction): Option[] { +export function createLanguages (t: TFunction): Option[] { return [ { text: t('lng.detect', 'Default browser language (auto-detect)', { ns: 'apps-config' }), diff --git a/packages/apps-config/src/settings/ss58.ts b/packages/apps-config/src/settings/ss58.ts index 31e85988ad..3c6a874622 100644 --- a/packages/apps-config/src/settings/ss58.ts +++ b/packages/apps-config/src/settings/ss58.ts @@ -11,7 +11,7 @@ import known from '@polkadot/networks'; // text: The text you wish to display in the dropdown // value: The actual ss5Format value (as registered) -export default function create (t: TFunction): Option[] { +export function createSs58 (t: TFunction): Option[] { return [ { info: 'default', diff --git a/packages/apps-electron/package.json b/packages/apps-electron/package.json index 4d8a8288a3..6918572648 100644 --- a/packages/apps-electron/package.json +++ b/packages/apps-electron/package.json @@ -6,7 +6,7 @@ "dependencies": { "@babel/core": "^7.12.3", "@babel/polyfill": "^7.12.1", - "@polkadot/dev": "^0.59.20", + "@polkadot/dev": "^0.60.1", "@polkadot/react-components": "^0.66.2-5", "electron-log": "^4.3.0", "electron-updater": "^4.3.5" diff --git a/packages/apps-electron/webpack.main.config.js b/packages/apps-electron/webpack.main.config.js index c061628742..738bbfa206 100644 --- a/packages/apps-electron/webpack.main.config.js +++ b/packages/apps-electron/webpack.main.config.js @@ -20,14 +20,19 @@ function createWebpack () { mode: ENV, module: { rules: [ + { + include: /node_modules/, + test: /\.mjs$/, + type: 'javascript/auto' + }, { exclude: /(node_modules)/, - test: /\.(js|ts|tsx)$/, + test: /\.(js|mjs|ts|tsx)$/, use: [ require.resolve('thread-loader'), { loader: require.resolve('babel-loader'), - options: require('@polkadot/dev/config/babel') + options: require('@polkadot/dev/config/babel-config-cjs.cjs') } ] } @@ -48,7 +53,7 @@ function createWebpack () { new CopyWebpackPlugin({ patterns: [{ from: 'assets' }] }) ], resolve: { - extensions: ['.js', '.jsx', '.json', '.ts', '.tsx'] + extensions: ['.js', '.jsx', '.json', '.mjs', '.ts', '.tsx'] }, target: 'electron-main' } diff --git a/packages/apps-routing/package.json b/packages/apps-routing/package.json index f65250bab5..6aa23ef468 100644 --- a/packages/apps-routing/package.json +++ b/packages/apps-routing/package.json @@ -3,11 +3,9 @@ "private": true, "version": "0.66.2-5", "main": "index.js", - "repository": "https://github.com/polkadot-js/apps.git", + "repository": "github:polkadot-js/apps", "author": "Jaco Greeff ", - "maintainers": [ - "Jaco Greeff " - ], + "maintainers": [], "contributors": [], "license": "Apache-2.0", "dependencies": { diff --git a/packages/apps/package.json b/packages/apps/package.json index 8569be2e3f..3f8aa59f7a 100644 --- a/packages/apps/package.json +++ b/packages/apps/package.json @@ -5,11 +5,9 @@ "description": "An Apps portal into the Polkadot network", "main": "index.js", "homepage": ".", - "repository": "https://github.com/polkadot-js/apps.git", + "repository": "github:polkadot-js/apps", "author": "Jaco Greeff ", - "maintainers": [ - "Jaco Greeff " - ], + "maintainers": [], "contributors": [], "license": "Apache-2.0", "dependencies": { @@ -18,7 +16,7 @@ "@babel/runtime": "^7.12.1", "@polkadot/apps-config": "^0.66.2-5", "@polkadot/apps-routing": "^0.66.2-5", - "@polkadot/dev": "^0.59.20", + "@polkadot/dev": "^0.60.1", "@polkadot/react-api": "^0.66.2-5", "@polkadot/react-components": "^0.66.2-5", "@polkadot/react-hooks": "^0.66.2-5", diff --git a/packages/apps/webpack.base.config.js b/packages/apps/webpack.base.config.js index 99ffbe4b36..3a9132ae9f 100644 --- a/packages/apps/webpack.base.config.js +++ b/packages/apps/webpack.base.config.js @@ -53,6 +53,11 @@ function createWebpack (ENV, context) { mode: ENV, module: { rules: [ + { + include: /node_modules/, + test: /\.mjs$/, + type: 'javascript/auto' + }, { exclude: /(node_modules)/, test: /\.css$/, @@ -80,12 +85,12 @@ function createWebpack (ENV, context) { }, { exclude: /(node_modules)/, - test: /\.(js|ts|tsx)$/, + test: /\.(js|mjs|ts|tsx)$/, use: [ require.resolve('thread-loader'), { loader: require.resolve('babel-loader'), - options: require('@polkadot/dev/config/babel') + options: require('@polkadot/dev/config/babel-config-cjs.cjs') } ] }, @@ -193,7 +198,7 @@ function createWebpack (ENV, context) { ]).filter((plugin) => plugin), resolve: { alias, - extensions: ['.js', '.jsx', '.ts', '.tsx'] + extensions: ['.js', '.jsx', '.mjs', '.ts', '.tsx'] }, watch: !isProd, watchOptions: { diff --git a/packages/page-accounts/package.json b/packages/page-accounts/package.json index 95451d7a34..e21a503e7f 100644 --- a/packages/page-accounts/package.json +++ b/packages/page-accounts/package.json @@ -3,17 +3,15 @@ "private": true, "version": "0.66.2-5", "main": "index.js", - "repository": "https://github.com/polkadot-js/apps.git", + "repository": "github:polkadot-js/apps", "author": "Jaco Greeff ", - "maintainers": [ - "Jaco Greeff " - ], + "maintainers": [], "contributors": [], "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.12.1", "@polkadot/react-components": "^0.66.2-5", - "@polkadot/vanitygen": "^0.23.1", + "@polkadot/vanitygen": "^0.23.2-4", "detect-browser": "^5.2.0", "file-saver": "^2.0.2" }, diff --git a/packages/page-addresses/package.json b/packages/page-addresses/package.json index 6884922064..f0a1e8fc36 100644 --- a/packages/page-addresses/package.json +++ b/packages/page-addresses/package.json @@ -3,17 +3,15 @@ "private": true, "version": "0.66.2-5", "main": "index.js", - "repository": "https://github.com/polkadot-js/apps.git", + "repository": "github:polkadot-js/apps", "author": "Jaco Greeff ", - "maintainers": [ - "Jaco Greeff " - ], + "maintainers": [], "contributors": [], "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.12.1", "@polkadot/react-components": "^0.66.2-5", - "@polkadot/vanitygen": "^0.23.1", + "@polkadot/vanitygen": "^0.23.2-4", "detect-browser": "^5.2.0", "file-saver": "^2.0.2" }, diff --git a/packages/page-calendar/package.json b/packages/page-calendar/package.json index 1535042805..07b22e8fbb 100644 --- a/packages/page-calendar/package.json +++ b/packages/page-calendar/package.json @@ -6,9 +6,7 @@ "main": "index.js", "scripts": {}, "author": "Jaco Greeff ", - "maintainers": [ - "Jaco Greeff " - ], + "maintainers": [], "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.12.1", diff --git a/packages/page-contracts/package.json b/packages/page-contracts/package.json index 53056f64ff..0a95631fdc 100644 --- a/packages/page-contracts/package.json +++ b/packages/page-contracts/package.json @@ -6,12 +6,10 @@ "main": "index.js", "scripts": {}, "author": "Jaco Greeff ", - "maintainers": [ - "Jaco Greeff " - ], + "maintainers": [], "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.12.1", - "@polkadot/api-contract": "^2.6.1" + "@polkadot/api-contract": "^2.6.2-7" } } diff --git a/packages/page-contracts/src/shared/CodeRow.tsx b/packages/page-contracts/src/shared/CodeRow.tsx index 61634a4c29..98cd405aae 100644 --- a/packages/page-contracts/src/shared/CodeRow.tsx +++ b/packages/page-contracts/src/shared/CodeRow.tsx @@ -5,7 +5,6 @@ import { CodeStored } from '@polkadot/app-contracts/types'; import React, { useCallback, useEffect, useState } from 'react'; import styled from 'styled-components'; -import { createType } from '@polkadot/types'; import { registry } from '@polkadot/react-api'; import Row from '@polkadot/react-components/Row'; import { Icon } from '@polkadot/react-components'; @@ -40,7 +39,7 @@ function CodeRow ({ buttons, children, className, code: { json }, isInline, with const trimmedName = name.trim(); if (trimmedName && codeHash) { - contracts.saveCode(createType(registry, 'Hash', codeHash), { name }) + contracts.saveCode(registry.createType('Hash', codeHash), { name }) .catch((e): void => console.error(e)); } }, @@ -50,7 +49,7 @@ function CodeRow ({ buttons, children, className, code: { json }, isInline, with const _onSaveTags = useCallback( (): void => { codeHash && contracts - .saveCode(createType(registry, 'Hash', codeHash), { tags }) + .saveCode(registry.createType('Hash', codeHash), { tags }) .catch((e): void => console.error(e)); }, [codeHash, tags] diff --git a/packages/page-contracts/src/shared/MessageSignature.tsx b/packages/page-contracts/src/shared/MessageSignature.tsx index 06f00eefb7..616b791e54 100644 --- a/packages/page-contracts/src/shared/MessageSignature.tsx +++ b/packages/page-contracts/src/shared/MessageSignature.tsx @@ -7,7 +7,7 @@ import React from 'react'; import { ThemeProps } from '@polkadot/react-components/types'; import styled from 'styled-components'; import { Icon, Tooltip } from '@polkadot/react-components'; -import { encodeTypeDef } from '@polkadot/types'; +import { encodeTypeDef } from '@polkadot/types/create'; import { stringCamelCase } from '@polkadot/util'; import { useTranslation } from '../translate'; diff --git a/packages/page-contracts/src/store.ts b/packages/page-contracts/src/store.ts index 49dcfe4e4a..342ac638ac 100644 --- a/packages/page-contracts/src/store.ts +++ b/packages/page-contracts/src/store.ts @@ -8,7 +8,6 @@ import EventEmitter from 'eventemitter3'; import store from 'store'; import { Abi } from '@polkadot/api-contract'; import { api, registry } from '@polkadot/react-api'; -import { createType } from '@polkadot/types'; const KEY_CODE = 'code:'; @@ -29,7 +28,7 @@ class Store extends EventEmitter { // eslint-disable-next-line @typescript-eslint/require-await public async saveCode (codeHash: string | Hash, partial: Partial): Promise { - const hex = (typeof codeHash === 'string' ? createType(registry, 'Hash', codeHash) : codeHash).toHex(); + const hex = (typeof codeHash === 'string' ? registry.createType('Hash', codeHash) : codeHash).toHex(); const existing = this.getCode(hex); const json = { ...(existing ? existing.json : {}), diff --git a/packages/page-council/package.json b/packages/page-council/package.json index 3c5034726b..4fbfc173c9 100644 --- a/packages/page-council/package.json +++ b/packages/page-council/package.json @@ -6,9 +6,7 @@ "main": "index.js", "scripts": {}, "author": "Jaco Greeff ", - "maintainers": [ - "Jaco Greeff " - ], + "maintainers": [], "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.12.1", diff --git a/packages/page-democracy/package.json b/packages/page-democracy/package.json index dde6f4b68a..96f977fd8f 100644 --- a/packages/page-democracy/package.json +++ b/packages/page-democracy/package.json @@ -6,9 +6,7 @@ "main": "index.js", "scripts": {}, "author": "Jaco Greeff ", - "maintainers": [ - "Jaco Greeff " - ], + "maintainers": [], "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.12.1", diff --git a/packages/page-democracy/src/Overview/TreasuryCell.tsx b/packages/page-democracy/src/Overview/TreasuryCell.tsx index b1439098fe..375999275d 100644 --- a/packages/page-democracy/src/Overview/TreasuryCell.tsx +++ b/packages/page-democracy/src/Overview/TreasuryCell.tsx @@ -7,7 +7,8 @@ import { TypeDef } from '@polkadot/types/types'; import React, { useEffect, useState } from 'react'; import { useApi, useCall } from '@polkadot/react-hooks'; import Params from '@polkadot/react-params'; -import { Compact, Option, getTypeDef } from '@polkadot/types'; +import { Compact, Option } from '@polkadot/types'; +import { getTypeDef } from '@polkadot/types/create'; interface Props { className?: string; diff --git a/packages/page-democracy/src/util.spec.ts b/packages/page-democracy/src/util.spec.ts index 105ecd0620..adc4fa576d 100644 --- a/packages/page-democracy/src/util.spec.ts +++ b/packages/page-democracy/src/util.spec.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import BN from 'bn.js'; -import { TypeRegistry } from '@polkadot/types'; +import { TypeRegistry } from '@polkadot/types/create'; import { calcPassing } from '@polkadot/api-derive/democracy/util'; import { approxChanges } from './util'; diff --git a/packages/page-explorer/package.json b/packages/page-explorer/package.json index eee21d92f9..b3f5d98471 100644 --- a/packages/page-explorer/package.json +++ b/packages/page-explorer/package.json @@ -3,11 +3,9 @@ "private": true, "version": "0.66.2-5", "main": "index.js", - "repository": "https://github.com/polkadot-js/apps.git", + "repository": "github:polkadot-js/apps", "author": "Jaco Greeff ", - "maintainers": [ - "Jaco Greeff " - ], + "maintainers": [], "contributors": [], "license": "Apache-2.0", "dependencies": { diff --git a/packages/page-explorer/src/BlockInfo/Logs.tsx b/packages/page-explorer/src/BlockInfo/Logs.tsx index 853dcd2181..eb33ee5482 100644 --- a/packages/page-explorer/src/BlockInfo/Logs.tsx +++ b/packages/page-explorer/src/BlockInfo/Logs.tsx @@ -5,7 +5,8 @@ import { DigestItem } from '@polkadot/types/interfaces'; import { Codec, TypeDef } from '@polkadot/types/types'; import React, { useRef } from 'react'; -import { Struct, Tuple, Raw, Vec, getTypeDef } from '@polkadot/types'; +import { Struct, Tuple, Raw, Vec } from '@polkadot/types'; +import { getTypeDef } from '@polkadot/types/create'; import { Expander, Table } from '@polkadot/react-components'; import Params from '@polkadot/react-params'; diff --git a/packages/page-extrinsics/package.json b/packages/page-extrinsics/package.json index d87c69cd2b..88d8e25084 100644 --- a/packages/page-extrinsics/package.json +++ b/packages/page-extrinsics/package.json @@ -3,11 +3,9 @@ "private": true, "version": "0.66.2-5", "main": "index.js", - "repository": "https://github.com/polkadot-js/apps.git", + "repository": "github:polkadot-js/apps", "author": "Jaco Greeff ", - "maintainers": [ - "Jaco Greeff " - ], + "maintainers": [], "contributors": [], "license": "Apache-2.0", "dependencies": { diff --git a/packages/page-js/package.json b/packages/page-js/package.json index 5c8bd1cbd1..eed59f6afe 100644 --- a/packages/page-js/package.json +++ b/packages/page-js/package.json @@ -6,9 +6,7 @@ "main": "index.js", "scripts": {}, "author": "Jaco Greeff ", - "maintainers": [ - "Jaco Greeff " - ], + "maintainers": [], "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.12.1", diff --git a/packages/page-parachains/package.json b/packages/page-parachains/package.json index 2812652bde..3cd3d6256e 100644 --- a/packages/page-parachains/package.json +++ b/packages/page-parachains/package.json @@ -6,9 +6,7 @@ "main": "index.js", "scripts": {}, "author": "Jaco Greeff ", - "maintainers": [ - "Jaco Greeff " - ], + "maintainers": [], "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.12.1", diff --git a/packages/page-parachains/src/Overview/Register.tsx b/packages/page-parachains/src/Overview/Register.tsx index 4d929c36cd..06ee0c09a3 100644 --- a/packages/page-parachains/src/Overview/Register.tsx +++ b/packages/page-parachains/src/Overview/Register.tsx @@ -1,13 +1,11 @@ // Copyright 2017-2020 @polkadot/app-democracy authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ParaInfo } from '@polkadot/types/interfaces'; import { SubmittableExtrinsic } from '@polkadot/api/promise/types'; import BN from 'bn.js'; import React, { useMemo, useRef } from 'react'; import { useApi, useFormField, useModal } from '@polkadot/react-hooks'; -import { createType } from '@polkadot/types'; import { BN_THOUSAND, u8aToHex, u8aToString } from '@polkadot/util'; import { Button, Dropdown, InputFile, InputNumber, InputWasm, Modal, TxButton } from '@polkadot/react-components'; @@ -43,15 +41,13 @@ function Register ({ isDisabled, nextFreeId = BN_THOUSAND, sudoKey }: Props): Re ); const [code, isCodeValid, setCode] = useFormField( null, - (code): boolean => !!code && isWasmValidRef.current + (code) => !!code && isWasmValidRef.current ); const [initialHeadState, isInitialHeadStateValid, setInitialHeadState] = useFormField(null); const [scheduling, , setScheduling] = useFormField('Always'); const info = useMemo( - (): ParaInfo => { - return createType(api.registry, 'ParaInfo', { scheduling }); - }, + () => api.registry.createType('ParaInfo', { scheduling }), [api, scheduling] ); const extrinsic = useMemo( diff --git a/packages/page-poll/package.json b/packages/page-poll/package.json index af9fbcf468..cadcc964ed 100644 --- a/packages/page-poll/package.json +++ b/packages/page-poll/package.json @@ -6,9 +6,7 @@ "main": "index.js", "scripts": {}, "author": "Jaco Greeff ", - "maintainers": [ - "Jaco Greeff " - ], + "maintainers": [], "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.12.1", diff --git a/packages/page-rpc/package.json b/packages/page-rpc/package.json index dec1b80826..31b02c228e 100644 --- a/packages/page-rpc/package.json +++ b/packages/page-rpc/package.json @@ -3,11 +3,9 @@ "private": true, "version": "0.66.2-5", "main": "index.js", - "repository": "https://github.com/polkadot-js/apps.git", + "repository": "github:polkadot-js/apps", "author": "Jaco Greeff ", - "maintainers": [ - "Jaco Greeff " - ], + "maintainers": [], "contributors": [], "license": "Apache-2.0", "dependencies": { diff --git a/packages/page-rpc/src/Rpc/Selection.tsx b/packages/page-rpc/src/Rpc/Selection.tsx index e576ede924..f909ca50bc 100644 --- a/packages/page-rpc/src/Rpc/Selection.tsx +++ b/packages/page-rpc/src/Rpc/Selection.tsx @@ -9,7 +9,7 @@ import React, { useCallback, useState } from 'react'; import { Button, InputRpc } from '@polkadot/react-components'; import Params from '@polkadot/react-params'; import jsonrpc from '@polkadot/types/interfaces/jsonrpc'; -import { getTypeDef } from '@polkadot/types'; +import { getTypeDef } from '@polkadot/types/create'; import { isNull } from '@polkadot/util'; import { useTranslation } from '../translate'; diff --git a/packages/page-settings/package.json b/packages/page-settings/package.json index 1c529b52ac..db2688f07f 100644 --- a/packages/page-settings/package.json +++ b/packages/page-settings/package.json @@ -6,9 +6,7 @@ "main": "index.js", "scripts": {}, "author": "Jaco Greeff ", - "maintainers": [ - "Jaco Greeff " - ], + "maintainers": [], "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.12.1", diff --git a/packages/page-signing/package.json b/packages/page-signing/package.json index 70a98076f6..63686c2db4 100644 --- a/packages/page-signing/package.json +++ b/packages/page-signing/package.json @@ -3,11 +3,9 @@ "private": true, "version": "0.66.2-5", "main": "index.js", - "repository": "https://github.com/polkadot-js/apps.git", + "repository": "github:polkadot-js/apps", "author": "Jaco Greeff ", - "maintainers": [ - "Jaco Greeff " - ], + "maintainers": [], "contributors": [], "license": "Apache-2.0", "dependencies": { diff --git a/packages/page-staking/package.json b/packages/page-staking/package.json index ab5ea889bb..8333293956 100644 --- a/packages/page-staking/package.json +++ b/packages/page-staking/package.json @@ -6,9 +6,7 @@ "main": "index.js", "scripts": {}, "author": "Jaco Greeff ", - "maintainers": [ - "Jaco Greeff " - ], + "maintainers": [], "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.12.1", diff --git a/packages/page-staking/src/Payouts/Stash.tsx b/packages/page-staking/src/Payouts/Stash.tsx index a05440c4cd..fffd0a26ac 100644 --- a/packages/page-staking/src/Payouts/Stash.tsx +++ b/packages/page-staking/src/Payouts/Stash.tsx @@ -7,7 +7,7 @@ import { PayoutStash } from './types'; import BN from 'bn.js'; import React, { useEffect, useState } from 'react'; -import ApiPromise from '@polkadot/api/promise'; +import { ApiPromise } from '@polkadot/api'; import { AddressSmall, TxButton } from '@polkadot/react-components'; import { useApi, useCall } from '@polkadot/react-hooks'; import { BlockToTime, FormatBalance } from '@polkadot/react-query'; diff --git a/packages/page-staking/src/index.tsx b/packages/page-staking/src/index.tsx index 5629a66913..16d9fcf59c 100644 --- a/packages/page-staking/src/index.tsx +++ b/packages/page-staking/src/index.tsx @@ -26,7 +26,7 @@ import { STORE_FAVS_BASE } from './constants'; import { useTranslation } from './translate'; import useSortedTargets from './useSortedTargets'; -const HIDDEN_ACC = ['actions', 'payouts']; +const HIDDEN_ACC = ['actions', 'payout']; const transformElection = { transform: (status: ElectionStatus) => status.isOpen diff --git a/packages/page-storage/package.json b/packages/page-storage/package.json index 11590c781d..b44194761b 100644 --- a/packages/page-storage/package.json +++ b/packages/page-storage/package.json @@ -3,11 +3,9 @@ "private": true, "version": "0.66.2-5", "main": "index.js", - "repository": "https://github.com/polkadot-js/apps.git", + "repository": "github:polkadot-js/apps", "author": "Jaco Greeff ", - "maintainers": [ - "Jaco Greeff " - ], + "maintainers": [], "contributors": [], "license": "Apache-2.0", "dependencies": { diff --git a/packages/page-storage/src/Query.tsx b/packages/page-storage/src/Query.tsx index 39b348a233..a52667f319 100644 --- a/packages/page-storage/src/Query.tsx +++ b/packages/page-storage/src/Query.tsx @@ -12,8 +12,8 @@ import { unwrapStorageType } from '@polkadot/types/primitive/StorageKey'; import { Button, Labelled } from '@polkadot/react-components'; import { withCallDiv } from '@polkadot/react-api/hoc'; import valueToText from '@polkadot/react-params/valueToText'; -import { Compact, Option, Raw } from '@polkadot/types'; -import { isU8a, u8aToHex, u8aToString } from '@polkadot/util'; +import { Option, Raw } from '@polkadot/types'; +import { compactStripLength, isU8a, u8aToHex, u8aToString } from '@polkadot/util'; interface Props { className?: string; @@ -39,7 +39,7 @@ function keyToName (isConst: boolean, _key: Uint8Array | QueryableStorageEntry<' const key = _key as Uint8Array | QueryableStorageEntry<'promise'>; if (isU8a(key)) { - const u8a = Compact.stripLengthPrefix(key); + const [, u8a] = compactStripLength(key); // If the string starts with `:`, handle it as a pure string return u8a[0] === 0x3a diff --git a/packages/page-storage/src/Selection/Modules.tsx b/packages/page-storage/src/Selection/Modules.tsx index 99ef9591a6..c18bae0e31 100644 --- a/packages/page-storage/src/Selection/Modules.tsx +++ b/packages/page-storage/src/Selection/Modules.tsx @@ -8,11 +8,11 @@ import { RawParams } from '@polkadot/react-params/types'; import { ComponentProps as Props } from '../types'; import React, { useCallback, useState } from 'react'; -import ApiPromise from '@polkadot/api/promise'; +import { ApiPromise } from '@polkadot/api'; import { Button, InputStorage } from '@polkadot/react-components'; import { useApi } from '@polkadot/react-hooks'; import Params from '@polkadot/react-params'; -import { getTypeDef } from '@polkadot/types'; +import { getTypeDef } from '@polkadot/types/create'; import { isNull, isUndefined } from '@polkadot/util'; import { useTranslation } from '../translate'; diff --git a/packages/page-storage/src/Selection/Raw.tsx b/packages/page-storage/src/Selection/Raw.tsx index 4614b2ccc7..939481bd51 100644 --- a/packages/page-storage/src/Selection/Raw.tsx +++ b/packages/page-storage/src/Selection/Raw.tsx @@ -7,8 +7,7 @@ import React, { useCallback, useState } from 'react'; import { Button, Input } from '@polkadot/react-components'; import { useTranslation } from '../translate'; -import { u8aToU8a } from '@polkadot/util'; -import { Compact } from '@polkadot/types'; +import { compactAddLength, u8aToU8a } from '@polkadot/util'; function Raw ({ onAdd }: Props): React.ReactElement { const { t } = useTranslation(); @@ -27,7 +26,7 @@ function Raw ({ onAdd }: Props): React.ReactElement { setValue({ isValid: u8a.length !== 0, - key: Compact.addLengthPrefix(u8a) + key: compactAddLength(u8a) }); }, [] diff --git a/packages/page-tech-comm/package.json b/packages/page-tech-comm/package.json index c675d4e9f8..2e8a6245b5 100644 --- a/packages/page-tech-comm/package.json +++ b/packages/page-tech-comm/package.json @@ -6,9 +6,7 @@ "main": "index.js", "scripts": {}, "author": "Jaco Greeff ", - "maintainers": [ - "Jaco Greeff " - ], + "maintainers": [], "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.12.1", diff --git a/packages/react-api/package.json b/packages/react-api/package.json index 8eaf0aaf2c..61a5d211c9 100644 --- a/packages/react-api/package.json +++ b/packages/react-api/package.json @@ -9,30 +9,19 @@ "RxJs" ], "author": "Jaco Greeff ", - "maintainers": [ - "Jaco Greeff " - ], + "maintainers": [], "contributors": [], "license": "Apache-2.0", "engines": { "node": ">=8.0" }, - "publishConfig": { - "access": "public", - "registry": "https://registry.npmjs.org" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/polkadot-js/ui.git" - }, - "bugs": { - "url": "https://github.com/polkadot-js/ui/issues" - }, - "homepage": "https://github.com/polkadot-js/ui/tree/master/packages/ui-reactive#readme", + "repository": "github:polkadot-js/apps", + "bugs": "https://github.com/polkadot-js/apps/issues", + "homepage": "https://github.com/polkadot-js/apps/tree/master/packages/react-api#readme", "dependencies": { "@babel/runtime": "^7.12.1", - "@polkadot/api": "^2.6.1", - "@polkadot/extension-dapp": "^0.35.0-beta.42", + "@polkadot/api": "^2.6.2-7", + "@polkadot/extension-dapp": "^0.35.0-beta.47", "rxjs-compat": "^6.6.3" } } diff --git a/packages/react-api/src/Api.tsx b/packages/react-api/src/Api.tsx index 2d5a6dac22..5f33feee13 100644 --- a/packages/react-api/src/Api.tsx +++ b/packages/react-api/src/Api.tsx @@ -8,7 +8,7 @@ import { ApiProps, ApiState } from './types'; import React, { useContext, useEffect, useMemo, useState } from 'react'; import store from 'store'; -import ApiPromise from '@polkadot/api/promise'; +import { ApiPromise } from '@polkadot/api/promise'; import { setDeriveCache, deriveMapCache } from '@polkadot/api-derive/util'; import { typesChain, typesSpec, typesBundle, typesRpc } from '@polkadot/apps-config/api'; import { POLKADOT_DENOM_BLOCK, POLKADOT_GENESIS } from '@polkadot/apps-config/api/constants'; @@ -22,7 +22,7 @@ import uiSettings from '@polkadot/ui-settings'; import ApiSigner from '@polkadot/react-signer/signers/ApiSigner'; import { formatBalance, isTestChain } from '@polkadot/util'; import { setSS58Format } from '@polkadot/util-crypto'; -import addressDefaults from '@polkadot/util-crypto/address/defaults'; +import { defaults as addressDefaults } from '@polkadot/util-crypto/address/defaults'; import ApiContext from './ApiContext'; import registry from './typeRegistry'; diff --git a/packages/react-api/src/typeRegistry.ts b/packages/react-api/src/typeRegistry.ts index e817584f72..48491304d2 100644 --- a/packages/react-api/src/typeRegistry.ts +++ b/packages/react-api/src/typeRegistry.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/react-api authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { TypeRegistry } from '@polkadot/types'; +import { TypeRegistry } from '@polkadot/types/create'; const registry = new TypeRegistry(); diff --git a/packages/react-api/src/types.ts b/packages/react-api/src/types.ts index 217a0410b8..859a708c5b 100644 --- a/packages/react-api/src/types.ts +++ b/packages/react-api/src/types.ts @@ -4,7 +4,7 @@ import { InjectedExtension } from '@polkadot/extension-inject/types'; import { SubmittableExtrinsicFunction } from '@polkadot/api/promise/types'; -import ApiPromise from '@polkadot/api/promise'; +import { ApiPromise } from '@polkadot/api/promise'; // helpers for HOC props export type OmitProps = Pick>; diff --git a/packages/react-components/package.json b/packages/react-components/package.json index 96f20682c9..339585358e 100644 --- a/packages/react-components/package.json +++ b/packages/react-components/package.json @@ -2,11 +2,9 @@ "name": "@polkadot/react-components", "version": "0.66.2-5", "main": "index.js", - "repository": "https://github.com/polkadot-js/apps.git", + "repository": "github:polkadot-js/apps", "author": "Jaco Greeff ", - "maintainers": [ - "Jaco Greeff " - ], + "maintainers": [], "contributors": [], "license": "Apache-2.0", "dependencies": { @@ -14,15 +12,15 @@ "@fortawesome/fontawesome-svg-core": "^1.2.32", "@fortawesome/free-solid-svg-icons": "^5.15.1", "@fortawesome/react-fontawesome": "^0.1.11", - "@polkadot/keyring": "^4.0.1", + "@polkadot/keyring": "^4.0.2-12", "@polkadot/react-api": "^0.66.2-5", - "@polkadot/react-identicon": "^0.62.1", - "@polkadot/react-qr": "^0.62.1", + "@polkadot/react-identicon": "^0.62.2-11", + "@polkadot/react-qr": "^0.62.2-11", "@polkadot/react-query": "^0.66.2-5", - "@polkadot/ui-keyring": "^0.62.1", - "@polkadot/ui-settings": "^0.62.1", - "@polkadot/util": "^4.0.1", - "@polkadot/util-crypto": "^4.0.1", + "@polkadot/ui-keyring": "^0.62.2-11", + "@polkadot/ui-settings": "^0.62.2-11", + "@polkadot/util": "^4.0.2-12", + "@polkadot/util-crypto": "^4.0.2-12", "chart.js": "^2.9.4", "codeflask": "^1.4.1", "i18next": "^19.8.3", diff --git a/packages/react-components/src/Call.tsx b/packages/react-components/src/Call.tsx index f888a2dba5..f1403aebbb 100644 --- a/packages/react-components/src/Call.tsx +++ b/packages/react-components/src/Call.tsx @@ -7,7 +7,8 @@ import { Codec, IExtrinsic, IMethod, TypeDef } from '@polkadot/types/types'; import BN from 'bn.js'; import React, { useEffect, useState } from 'react'; import styled from 'styled-components'; -import { GenericCall, getTypeDef } from '@polkadot/types'; +import { GenericCall } from '@polkadot/types'; +import { getTypeDef } from '@polkadot/types/create'; import Params from '@polkadot/react-params'; import { FormatBalance } from '@polkadot/react-query'; diff --git a/packages/react-components/src/Event.tsx b/packages/react-components/src/Event.tsx index 88952770ea..921bbc5ab5 100644 --- a/packages/react-components/src/Event.tsx +++ b/packages/react-components/src/Event.tsx @@ -8,7 +8,7 @@ import { Codec } from '@polkadot/types/types'; import React, { useMemo } from 'react'; import { Input } from '@polkadot/react-components'; import Params from '@polkadot/react-params'; -import { getTypeDef } from '@polkadot/types'; +import { getTypeDef } from '@polkadot/types/create'; import { useTranslation } from './translate'; import { classes, getContractAbi } from './util'; diff --git a/packages/react-components/src/Extrinsic.tsx b/packages/react-components/src/Extrinsic.tsx index 49a8d24cee..de20d26b89 100644 --- a/packages/react-components/src/Extrinsic.tsx +++ b/packages/react-components/src/Extrinsic.tsx @@ -6,7 +6,8 @@ import { RawParam } from '@polkadot/react-params/types'; import { TypeDef } from '@polkadot/types/types'; import React, { useCallback, useEffect, useState } from 'react'; -import { GenericCall, getTypeDef } from '@polkadot/types'; +import { GenericCall } from '@polkadot/types'; +import { getTypeDef } from '@polkadot/types/create'; import Params from '@polkadot/react-params'; import { isUndefined } from '@polkadot/util'; diff --git a/packages/react-components/src/InputAddress/index.tsx b/packages/react-components/src/InputAddress/index.tsx index 3150e17b86..9d9c92f622 100644 --- a/packages/react-components/src/InputAddress/index.tsx +++ b/packages/react-components/src/InputAddress/index.tsx @@ -9,7 +9,6 @@ import store from 'store'; import styled from 'styled-components'; import { withMulti, withObservable } from '@polkadot/react-api/hoc'; import keyring from '@polkadot/ui-keyring'; -import keyringOption from '@polkadot/ui-keyring/options'; import createKeyringItem from '@polkadot/ui-keyring/options/item'; import { isNull, isUndefined } from '@polkadot/util'; @@ -316,7 +315,7 @@ const ExportedComponent = withMulti( max-width: 0; } `, - withObservable(keyringOption.optionsSubject, { + withObservable(keyring.keyringOption.optionsSubject, { propName: 'optionsAll', transform: (optionsAll: KeyringOptions): Record => Object.entries(optionsAll).reduce((result: Record, [type, options]): Record => { diff --git a/packages/react-components/src/InputConsts/options/key.tsx b/packages/react-components/src/InputConsts/options/key.tsx index f1168d0d49..12a3b338fe 100644 --- a/packages/react-components/src/InputConsts/options/key.tsx +++ b/packages/react-components/src/InputConsts/options/key.tsx @@ -5,7 +5,7 @@ import { ConstantCodec } from '@polkadot/metadata/decorate/types'; import { DropdownOptions, DropdownOption } from '../../util/types'; import React from 'react'; -import ApiPromise from '@polkadot/api/promise'; +import { ApiPromise } from '@polkadot/api'; export default function createOptions (api: ApiPromise, sectionName: string): DropdownOptions { const section = api.consts[sectionName]; diff --git a/packages/react-components/src/InputConsts/options/section.ts b/packages/react-components/src/InputConsts/options/section.ts index 55a47c97f4..182f6ffc1e 100644 --- a/packages/react-components/src/InputConsts/options/section.ts +++ b/packages/react-components/src/InputConsts/options/section.ts @@ -3,7 +3,7 @@ import { DropdownOptions } from '../../util/types'; -import ApiPromise from '@polkadot/api/promise'; +import { ApiPromise } from '@polkadot/api'; export default function createOptions (api: ApiPromise): DropdownOptions { return Object diff --git a/packages/react-components/src/InputExtrinsic/SelectMethod.tsx b/packages/react-components/src/InputExtrinsic/SelectMethod.tsx index 4b150cbca5..a6d4df2706 100644 --- a/packages/react-components/src/InputExtrinsic/SelectMethod.tsx +++ b/packages/react-components/src/InputExtrinsic/SelectMethod.tsx @@ -5,7 +5,7 @@ import { SubmittableExtrinsicFunction } from '@polkadot/api/types'; import { DropdownOptions } from '../util/types'; import React, { useCallback } from 'react'; -import ApiPromise from '@polkadot/api/promise'; +import { ApiPromise } from '@polkadot/api'; import Dropdown from '../Dropdown'; import { classes } from '../util'; diff --git a/packages/react-components/src/InputExtrinsic/options/method.tsx b/packages/react-components/src/InputExtrinsic/options/method.tsx index 47e0b1e168..b7597cf920 100644 --- a/packages/react-components/src/InputExtrinsic/options/method.tsx +++ b/packages/react-components/src/InputExtrinsic/options/method.tsx @@ -4,7 +4,7 @@ import { DropdownOption, DropdownOptions } from '../../util/types'; import React from 'react'; -import ApiPromise from '@polkadot/api/promise'; +import { ApiPromise } from '@polkadot/api'; export default function createOptions (api: ApiPromise, sectionName: string): DropdownOptions { const section = api.tx[sectionName]; diff --git a/packages/react-components/src/InputExtrinsic/options/section.ts b/packages/react-components/src/InputExtrinsic/options/section.ts index b45f987b36..841ba5cbfb 100644 --- a/packages/react-components/src/InputExtrinsic/options/section.ts +++ b/packages/react-components/src/InputExtrinsic/options/section.ts @@ -3,7 +3,7 @@ import { DropdownOptions } from '../../util/types'; -import ApiPromise from '@polkadot/api/promise'; +import { ApiPromise } from '@polkadot/api'; export default function createOptions (api: ApiPromise): DropdownOptions { return Object diff --git a/packages/react-components/src/InputRpc/options/method.tsx b/packages/react-components/src/InputRpc/options/method.tsx index 725bf2e5ef..a0f28d607f 100644 --- a/packages/react-components/src/InputRpc/options/method.tsx +++ b/packages/react-components/src/InputRpc/options/method.tsx @@ -5,7 +5,7 @@ import { DefinitionRpcExt } from '@polkadot/types/types'; import { DropdownOption, DropdownOptions } from '../../util/types'; import React from 'react'; -import ApiPromise from '@polkadot/api/promise'; +import { ApiPromise } from '@polkadot/api'; import jsonrpc from '@polkadot/types/interfaces/jsonrpc'; export default function createOptions (api: ApiPromise, sectionName: string): DropdownOptions { diff --git a/packages/react-components/src/InputRpc/options/section.ts b/packages/react-components/src/InputRpc/options/section.ts index 7cd6a60cc8..d8b533a5b5 100644 --- a/packages/react-components/src/InputRpc/options/section.ts +++ b/packages/react-components/src/InputRpc/options/section.ts @@ -3,7 +3,7 @@ import { DropdownOptions } from '../../util/types'; -import ApiPromise from '@polkadot/api/promise'; +import { ApiPromise } from '@polkadot/api'; export default function createOptions (api: ApiPromise): DropdownOptions { return Object diff --git a/packages/react-components/src/InputStorage/options/key.tsx b/packages/react-components/src/InputStorage/options/key.tsx index 766425ab01..8e15954f94 100644 --- a/packages/react-components/src/InputStorage/options/key.tsx +++ b/packages/react-components/src/InputStorage/options/key.tsx @@ -1,11 +1,12 @@ // Copyright 2017-2020 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 +import { StorageEntry } from '@polkadot/types/primitive/types'; import { DropdownOptions, DropdownOption } from '../../util/types'; import React from 'react'; -import ApiPromise from '@polkadot/api/promise'; -import { StorageEntry, unwrapStorageType } from '@polkadot/types/primitive/StorageKey'; +import { ApiPromise } from '@polkadot/api'; +import { unwrapStorageType } from '@polkadot/types/primitive/StorageKey'; export default function createOptions (api: ApiPromise, sectionName: string): DropdownOptions { const section = api.query[sectionName]; diff --git a/packages/react-components/src/InputStorage/options/section.ts b/packages/react-components/src/InputStorage/options/section.ts index b474e86928..af185b2213 100644 --- a/packages/react-components/src/InputStorage/options/section.ts +++ b/packages/react-components/src/InputStorage/options/section.ts @@ -3,7 +3,7 @@ import { DropdownOptions } from '../../util/types'; -import ApiPromise from '@polkadot/api/promise'; +import { ApiPromise } from '@polkadot/api'; export default function createOptions (api: ApiPromise): DropdownOptions { return Object diff --git a/packages/react-components/src/Status/Queue.tsx b/packages/react-components/src/Status/Queue.tsx index d98bb3b5d5..cf8fd4ac50 100644 --- a/packages/react-components/src/Status/Queue.tsx +++ b/packages/react-components/src/Status/Queue.tsx @@ -10,7 +10,6 @@ import React, { useCallback, useRef, useState } from 'react'; import { SubmittableResult } from '@polkadot/api'; import { registry } from '@polkadot/react-api'; import jsonrpc from '@polkadot/types/interfaces/jsonrpc'; -import { createType } from '@polkadot/types'; import { getContractAbi } from '../util'; import { QueueProvider } from './Context'; @@ -217,8 +216,8 @@ function Queue ({ children }: Props): React.ReactElement { addToTxQueue({ accountId: payload.address, // this is not great, but the Extrinsic we don't need a submittable - extrinsic: createType(registry, 'Extrinsic', - { method: createType(registry, 'Call', payload.method) }, + extrinsic: registry.createType('Extrinsic', + { method: registry.createType('Call', payload.method) }, { version: payload.version } ) as unknown as SubmittableExtrinsic, payload, diff --git a/packages/react-components/src/VoteValue.tsx b/packages/react-components/src/VoteValue.tsx index a7464f0c2a..c8c0412a30 100644 --- a/packages/react-components/src/VoteValue.tsx +++ b/packages/react-components/src/VoteValue.tsx @@ -25,6 +25,21 @@ interface ValueState { value: BN; } +function getValues (selectedId: string | null | undefined, isCouncil: boolean | undefined, allBalances: DeriveBalancesAll, existential: BN): ValueState { + const value = allBalances.lockedBalance; + const maxValue = allBalances.votingBalance.add(isCouncil ? allBalances.reservedBalance : BN_ZERO); + + return { + maxValue, + selectedId, + value: value.isZero() + ? maxValue.gt(existential) + ? maxValue.sub(existential) + : BN_ZERO + : value + }; +} + function VoteValue ({ accountId, autoFocus, isCouncil, onChange }: Props): React.ReactElement | null { const { t } = useTranslation(); const { api } = useApi(); @@ -35,14 +50,10 @@ function VoteValue ({ accountId, autoFocus, isCouncil, onChange }: Props): React // if the set accountId changes and the new balances is for that id, set it allBalances && allBalances.accountId.eq(accountId) && setValue((state) => state.selectedId !== accountId - ? ({ - maxValue: allBalances.votingBalance.add(isCouncil ? allBalances.reservedBalance : BN_ZERO), - selectedId: accountId, - value: allBalances.lockedBalance - }) + ? getValues(accountId, isCouncil, allBalances, api.consts.balances.existentialDeposit) : state ); - }, [allBalances, accountId, isCouncil]); + }, [allBalances, accountId, api, isCouncil]); // only do onChange to parent when the BN value comes in, not our formatted version useEffect((): void => { @@ -66,7 +77,7 @@ function VoteValue ({ accountId, autoFocus, isCouncil, onChange }: Props): React defaultValue={ isDisabled ? undefined - : maxValue + : value } help={t('The amount that is associated with this vote. This value is is locked for the duration of the vote.')} isDisabled={isDisabled} diff --git a/packages/react-hooks/package.json b/packages/react-hooks/package.json index bec167c155..193e764582 100644 --- a/packages/react-hooks/package.json +++ b/packages/react-hooks/package.json @@ -9,26 +9,15 @@ "RxJs" ], "author": "Jaco Greeff ", - "maintainers": [ - "Jaco Greeff " - ], + "maintainers": [], "contributors": [], "license": "Apache-2.0", "engines": { "node": ">=8.0" }, - "publishConfig": { - "access": "public", - "registry": "https://registry.npmjs.org" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/polkadot-js/ui.git" - }, - "bugs": { - "url": "https://github.com/polkadot-js/ui/issues" - }, - "homepage": "https://github.com/polkadot-js/ui/tree/master/packages/ui-reactive#readme", + "repository": "github:polkadot-js/apps", + "bugs": "https://github.com/polkadot-js/apps/issues", + "homepage": "https://github.com/polkadot-js/apps/tree/master/packages/react-hooks#readme", "dependencies": { "@babel/runtime": "^7.12.1", "memoizee": "^0.4.14" diff --git a/packages/react-hooks/src/index.ts b/packages/react-hooks/src/index.ts index 8588167085..c7d7511745 100644 --- a/packages/react-hooks/src/index.ts +++ b/packages/react-hooks/src/index.ts @@ -1,34 +1,34 @@ // Copyright 2017-2020 @polkadot/react-hooks authors & contributors // SPDX-License-Identifier: Apache-2.0 -export { default as useAccountId } from './useAccountId'; -export { default as useAccountInfo } from './useAccountInfo'; -export { default as useAccounts } from './useAccounts'; -export { default as useAddresses } from './useAddresses'; -export { default as useApi } from './useApi'; -export { default as useAvailableSlashes } from './useAvailableSlashes'; -export { default as useBlockTime } from './useBlockTime'; -export { default as useCacheKey } from './useCacheKey'; -export { default as useCall } from './useCall'; -export { default as useContracts } from './useContracts'; -export { default as useFormField } from './useFormField'; -export { default as useDebounce } from './useDebounce'; -export { default as useFavorites } from './useFavorites'; -export { default as useIncrement } from './useIncrement'; -export { default as useIpfs } from './useIpfs'; -export { default as useIsMountedRef } from './useIsMountedRef'; -export { default as useLoadingDelay } from './useLoadingDelay'; -export { default as useMembers } from './useMembers'; -export { default as useModal } from './useModal'; -export { default as useNonEmptyString } from './useNonEmptyString'; -export { default as useNonZeroBn } from './useNonZeroBn'; -export { default as useOwnEraRewards } from './useOwnEraRewards'; -export { default as useOwnStashes, useOwnStashIds } from './useOwnStashes'; -export { default as useOwnStashInfos } from './useOwnStashInfos'; -export { default as usePassword } from './usePassword'; -export { default as useRegistrars } from './useRegistrars'; -export { default as useStashIds } from './useStashIds'; -export { default as useSudo } from './useSudo'; -export { default as useToggle } from './useToggle'; -export { default as useVotingStatus } from './useVotingStatus'; -export { default as useWeight } from './useWeight'; +export { useAccountId } from './useAccountId'; +export { useAccountInfo } from './useAccountInfo'; +export { useAccounts } from './useAccounts'; +export { useAddresses } from './useAddresses'; +export { useApi } from './useApi'; +export { useAvailableSlashes } from './useAvailableSlashes'; +export { useBlockTime } from './useBlockTime'; +export { useCacheKey } from './useCacheKey'; +export { useCall } from './useCall'; +export { useContracts } from './useContracts'; +export { useFormField } from './useFormField'; +export { useDebounce } from './useDebounce'; +export { useFavorites } from './useFavorites'; +export { useIncrement } from './useIncrement'; +export { useIpfs } from './useIpfs'; +export { useIsMountedRef } from './useIsMountedRef'; +export { useLoadingDelay } from './useLoadingDelay'; +export { useMembers } from './useMembers'; +export { useModal } from './useModal'; +export { useNonEmptyString } from './useNonEmptyString'; +export { useNonZeroBn } from './useNonZeroBn'; +export { useOwnEraRewards } from './useOwnEraRewards'; +export { useOwnStashes, useOwnStashIds } from './useOwnStashes'; +export { useOwnStashInfos } from './useOwnStashInfos'; +export { usePassword } from './usePassword'; +export { useRegistrars } from './useRegistrars'; +export { useStashIds } from './useStashIds'; +export { useSudo } from './useSudo'; +export { useToggle } from './useToggle'; +export { useVotingStatus } from './useVotingStatus'; +export { useWeight } from './useWeight'; diff --git a/packages/react-hooks/src/useAccountId.ts b/packages/react-hooks/src/useAccountId.ts index afc0ea3bf6..4e95812345 100644 --- a/packages/react-hooks/src/useAccountId.ts +++ b/packages/react-hooks/src/useAccountId.ts @@ -5,7 +5,7 @@ import { StringOrNull } from '@polkadot/react-components/types'; import { useCallback, useState } from 'react'; -export default function useAccountId (initialValue: StringOrNull = null, onChangeAccountId?: (_: StringOrNull) => void): [StringOrNull, (_: StringOrNull) => void] { +export function useAccountId (initialValue: StringOrNull = null, onChangeAccountId?: (_: StringOrNull) => void): [StringOrNull, (_: StringOrNull) => void] { const [accountId, setAccountId] = useState(initialValue); const _setAccountId = useCallback( diff --git a/packages/react-hooks/src/useAccountInfo.ts b/packages/react-hooks/src/useAccountInfo.ts index 55660d3ca2..f9d456f453 100644 --- a/packages/react-hooks/src/useAccountInfo.ts +++ b/packages/react-hooks/src/useAccountInfo.ts @@ -9,11 +9,11 @@ import { AddressFlags, AddressIdentity, UseAccountInfo } from './types'; import { useCallback, useEffect, useState } from 'react'; import keyring from '@polkadot/ui-keyring'; -import useAccounts from './useAccounts'; -import useAddresses from './useAddresses'; -import useApi from './useApi'; -import useCall from './useCall'; -import useToggle from './useToggle'; +import { useAccounts } from './useAccounts'; +import { useAddresses } from './useAddresses'; +import { useApi } from './useApi'; +import { useCall } from './useCall'; +import { useToggle } from './useToggle'; const IS_NONE = { isCouncil: false, @@ -32,7 +32,7 @@ const IS_NONE = { isTechCommittee: false }; -export default function useAccountInfo (value: string | null, isContract = false): UseAccountInfo { +export function useAccountInfo (value: string | null, isContract = false): UseAccountInfo { const { api } = useApi(); const { isAccount } = useAccounts(); const { isAddress } = useAddresses(); diff --git a/packages/react-hooks/src/useAccounts.ts b/packages/react-hooks/src/useAccounts.ts index cbda1a1afb..eea08cabe8 100644 --- a/packages/react-hooks/src/useAccounts.ts +++ b/packages/react-hooks/src/useAccounts.ts @@ -2,9 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 import { useEffect, useState } from 'react'; -import accountObservable from '@polkadot/ui-keyring/observable/accounts'; +import keyring from '@polkadot/ui-keyring'; -import useIsMountedRef from './useIsMountedRef'; +import { useIsMountedRef } from './useIsMountedRef'; interface UseAccounts { allAccounts: string[]; @@ -12,12 +12,12 @@ interface UseAccounts { isAccount: (address: string) => boolean; } -export default function useAccounts (): UseAccounts { +export function useAccounts (): UseAccounts { const mountedRef = useIsMountedRef(); const [state, setState] = useState({ allAccounts: [], hasAccounts: false, isAccount: () => false }); useEffect((): () => void => { - const subscription = accountObservable.subject.subscribe((accounts): void => { + const subscription = keyring.accounts.subject.subscribe((accounts): void => { if (mountedRef.current) { const allAccounts = accounts ? Object.keys(accounts) : []; const hasAccounts = allAccounts.length !== 0; diff --git a/packages/react-hooks/src/useAddresses.ts b/packages/react-hooks/src/useAddresses.ts index db9e5695d5..07a7139d59 100644 --- a/packages/react-hooks/src/useAddresses.ts +++ b/packages/react-hooks/src/useAddresses.ts @@ -2,22 +2,22 @@ // SPDX-License-Identifier: Apache-2.0 import { useEffect, useState } from 'react'; -import addressObservable from '@polkadot/ui-keyring/observable/addresses'; +import keyring from '@polkadot/ui-keyring'; -import useIsMountedRef from './useIsMountedRef'; +import { useIsMountedRef } from './useIsMountedRef'; -interface UseAccounts { +interface UseAddresses { allAddresses: string[]; hasAddresses: boolean; isAddress: (address: string) => boolean; } -export default function useAccounts (): UseAccounts { +export function useAddresses (): UseAddresses { const mountedRef = useIsMountedRef(); - const [state, setState] = useState({ allAddresses: [], hasAddresses: false, isAddress: () => false }); + const [state, setState] = useState({ allAddresses: [], hasAddresses: false, isAddress: () => false }); useEffect((): () => void => { - const subscription = addressObservable.subject.subscribe((addresses): void => { + const subscription = keyring.addresses.subject.subscribe((addresses): void => { if (mountedRef.current) { const allAddresses = addresses ? Object.keys(addresses) : []; const hasAddresses = allAddresses.length !== 0; diff --git a/packages/react-hooks/src/useApi.ts b/packages/react-hooks/src/useApi.ts index 32a7cce047..2f2760ad7f 100644 --- a/packages/react-hooks/src/useApi.ts +++ b/packages/react-hooks/src/useApi.ts @@ -6,6 +6,6 @@ import { ApiProps } from '@polkadot/react-api/types'; import { useContext } from 'react'; import { ApiContext } from '@polkadot/react-api'; -export default function useApi (): ApiProps { +export function useApi (): ApiProps { return useContext(ApiContext); } diff --git a/packages/react-hooks/src/useAvailableSlashes.ts b/packages/react-hooks/src/useAvailableSlashes.ts index 8d1ce5ac91..a2bcb16fad 100644 --- a/packages/react-hooks/src/useAvailableSlashes.ts +++ b/packages/react-hooks/src/useAvailableSlashes.ts @@ -11,7 +11,7 @@ import { Option, Vec } from '@polkadot/types'; type Unsub = () => void; -export default function useAvailableSlashes (): [BN, UnappliedSlash[]][] { +export function useAvailableSlashes (): [BN, UnappliedSlash[]][] { const { api } = useApi(); const indexes = useCall(api.derive.session?.indexes); const earliestSlash = useCall>(api.query.staking?.earliestUnappliedSlash); diff --git a/packages/react-hooks/src/useBlockTime.ts b/packages/react-hooks/src/useBlockTime.ts index 07ffc55c0e..e391e42f7f 100644 --- a/packages/react-hooks/src/useBlockTime.ts +++ b/packages/react-hooks/src/useBlockTime.ts @@ -12,7 +12,7 @@ type Result = [number, string]; const DEFAULT_TIME = new BN(6000); -export default function useBlockTime (blocks = BN_ONE): Result { +export function useBlockTime (blocks = BN_ONE): Result { const { t } = useTranslation(); const { api } = useApi(); diff --git a/packages/react-hooks/src/useCacheKey.ts b/packages/react-hooks/src/useCacheKey.ts index 5a58b12d80..6c790dd561 100644 --- a/packages/react-hooks/src/useCacheKey.ts +++ b/packages/react-hooks/src/useCacheKey.ts @@ -4,10 +4,10 @@ import { useCallback, useMemo } from 'react'; import store from 'store'; -import useApi from './useApi'; +import { useApi } from './useApi'; // create a chain-specific key for the local cache -export default function useCacheKey (storageKeyBase: string): [(defaultValue?: T) => T | undefined, (value: T) => T] { +export function useCacheKey (storageKeyBase: string): [(defaultValue?: T) => T | undefined, (value: T) => T] { const { api, isDevelopment } = useApi(); const storageKey = useMemo( () => `${storageKeyBase}:${isDevelopment ? 'development' : api.genesisHash.toHex()}`, diff --git a/packages/react-hooks/src/useCall.ts b/packages/react-hooks/src/useCall.ts index 1b481b46ae..d3a56b8016 100644 --- a/packages/react-hooks/src/useCall.ts +++ b/packages/react-hooks/src/useCall.ts @@ -8,7 +8,7 @@ import { CallOptions, CallParam, CallParams } from './types'; import { useEffect, useRef, useState } from 'react'; import { isNull, isUndefined } from '@polkadot/util'; -import useIsMountedRef, { MountedRef } from './useIsMountedRef'; +import { useIsMountedRef, MountedRef } from './useIsMountedRef'; type TrackFnResult = Promise<() => void>; @@ -94,7 +94,7 @@ function subscribe (mountedRef: MountedRef, tracker: TrackerRef, fn: TrackFn // - returns a promise with an unsubscribe function // - has a callback to set the value // FIXME The typings here need some serious TLC -export default function useCall (fn: TrackFn | undefined | null | false, params?: CallParams, options?: CallOptions): T | undefined { +export function useCall (fn: TrackFn | undefined | null | false, params?: CallParams, options?: CallOptions): T | undefined { const mountedRef = useIsMountedRef(); const tracker = useRef({ count: 0, isActive: false, serialized: null, subscriber: null }); const [value, setValue] = useState((options || {}).defaultValue); diff --git a/packages/react-hooks/src/useContracts.ts b/packages/react-hooks/src/useContracts.ts index a9d9f9d0bf..99a3a7c2ce 100644 --- a/packages/react-hooks/src/useContracts.ts +++ b/packages/react-hooks/src/useContracts.ts @@ -2,9 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 import { useEffect, useState } from 'react'; -import contractObservable from '@polkadot/ui-keyring/observable/contracts'; +import keyring from '@polkadot/ui-keyring'; -import useIsMountedRef from './useIsMountedRef'; +import { useIsMountedRef } from './useIsMountedRef'; interface UseContracts { allContracts: string[]; @@ -12,12 +12,12 @@ interface UseContracts { isContract: (address: string) => boolean; } -export default function useContracts (): UseContracts { +export function useContracts (): UseContracts { const mountedRef = useIsMountedRef(); const [state, setState] = useState({ allContracts: [], hasContracts: false, isContract: () => false }); useEffect((): () => void => { - const subscription = contractObservable.subject.subscribe((contracts): void => { + const subscription = keyring.contracts.subject.subscribe((contracts): void => { if (mountedRef.current) { const allContracts = contracts ? Object.keys(contracts) : []; const hasContracts = allContracts.length !== 0; diff --git a/packages/react-hooks/src/useDebounce.ts b/packages/react-hooks/src/useDebounce.ts index cc41a98b67..635078b4d2 100644 --- a/packages/react-hooks/src/useDebounce.ts +++ b/packages/react-hooks/src/useDebounce.ts @@ -3,12 +3,12 @@ import { useState, useEffect } from 'react'; -import useIsMountedRef from './useIsMountedRef'; +import { useIsMountedRef } from './useIsMountedRef'; const DEFAULT_DELAY = 250; // Debounces inputs -export default function useDebounce (value: T, delay?: number): T { +export function useDebounce (value: T, delay?: number): T { const mountedRef = useIsMountedRef(); const [debouncedValue, setDebouncedValue] = useState(value); diff --git a/packages/react-hooks/src/useFavorites.ts b/packages/react-hooks/src/useFavorites.ts index dd3cf6656a..63bd31d349 100644 --- a/packages/react-hooks/src/useFavorites.ts +++ b/packages/react-hooks/src/useFavorites.ts @@ -3,10 +3,10 @@ import { useCallback, useState } from 'react'; -import useCacheKey from './useCacheKey'; +import { useCacheKey } from './useCacheKey'; // hook for favorites with local storage -export default function useFavorites (storageKeyBase: string): [string[], (address: string) => void] { +export function useFavorites (storageKeyBase: string): [string[], (address: string) => void] { const [getCache, setCache] = useCacheKey(storageKeyBase); const [favorites, setFavorites] = useState(getCache() || []); diff --git a/packages/react-hooks/src/useFormField.ts b/packages/react-hooks/src/useFormField.ts index 1282c1b586..397c311e81 100644 --- a/packages/react-hooks/src/useFormField.ts +++ b/packages/react-hooks/src/useFormField.ts @@ -10,7 +10,7 @@ export type FormField = [ (_?: T | null) => void ]; -export default function useFormField (defaultValue: T | null, validate: (_: T) => boolean = (): boolean => true): FormField { +export function useFormField (defaultValue: T | null, validate: (_: T) => boolean = (): boolean => true): FormField { const [value, setValue] = useState(defaultValue); const isValid = useMemo( (): boolean => !!value && validate(value), diff --git a/packages/react-hooks/src/useIncrement.ts b/packages/react-hooks/src/useIncrement.ts index a5c3ed50ff..07b319a01d 100644 --- a/packages/react-hooks/src/useIncrement.ts +++ b/packages/react-hooks/src/useIncrement.ts @@ -2,9 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 import { useCallback, useState } from 'react'; -import useIsMountedRef from './useIsMountedRef'; +import { useIsMountedRef } from './useIsMountedRef'; -export default function useIncrement (defaultValue = 1): [number, () => void, (value: number) => void] { +export function useIncrement (defaultValue = 1): [number, () => void, (value: number) => void] { const mountedRef = useIsMountedRef(); const [value, setValue] = useState(defaultValue); diff --git a/packages/react-hooks/src/useIpfs.ts b/packages/react-hooks/src/useIpfs.ts index 4f5068561e..b0dd2d91a4 100644 --- a/packages/react-hooks/src/useIpfs.ts +++ b/packages/react-hooks/src/useIpfs.ts @@ -111,7 +111,7 @@ export function extractIpfsDetails (): State { : extractOther(url); } -export default function useIpfs (): State { +export function useIpfs (): State { const [state] = useState(extractIpfsDetails()); return state; diff --git a/packages/react-hooks/src/useIsMountedRef.ts b/packages/react-hooks/src/useIsMountedRef.ts index 557f3b4373..c580a832fb 100644 --- a/packages/react-hooks/src/useIsMountedRef.ts +++ b/packages/react-hooks/src/useIsMountedRef.ts @@ -5,7 +5,7 @@ import { useEffect, useRef } from 'react'; export type MountedRef = React.MutableRefObject; -export default function useIsMountedRef (): MountedRef { +export function useIsMountedRef (): MountedRef { const isMounted = useRef(false); useEffect((): () => void => { diff --git a/packages/react-hooks/src/useLoadingDelay.ts b/packages/react-hooks/src/useLoadingDelay.ts index a565ae4f89..ca21e8e087 100644 --- a/packages/react-hooks/src/useLoadingDelay.ts +++ b/packages/react-hooks/src/useLoadingDelay.ts @@ -2,9 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 import { useEffect, useState } from 'react'; -import useIsMountedRef from './useIsMountedRef'; +import { useIsMountedRef } from './useIsMountedRef'; -export default function useLoadingDelay (delay = 100): boolean { +export function useLoadingDelay (delay = 100): boolean { const mountedRef = useIsMountedRef(); const [isLoading, setIsLoading] = useState(true); diff --git a/packages/react-hooks/src/useMembers.ts b/packages/react-hooks/src/useMembers.ts index c5acbf0fdc..0878f95ecb 100644 --- a/packages/react-hooks/src/useMembers.ts +++ b/packages/react-hooks/src/useMembers.ts @@ -16,7 +16,7 @@ const transformMembers = { accounts.map((accountId) => accountId.toString()) }; -export default function useMembers (collective: 'council' | 'technicalCommittee' = 'council'): Result { +export function useMembers (collective: 'council' | 'technicalCommittee' = 'council'): Result { const { api } = useApi(); const { allAccounts, hasAccounts } = useAccounts(); const retrieved = useCall(hasAccounts && api.query[collective]?.members, undefined, transformMembers); diff --git a/packages/react-hooks/src/useModal.ts b/packages/react-hooks/src/useModal.ts index 8cd11a3b7a..fe15e5a8a3 100644 --- a/packages/react-hooks/src/useModal.ts +++ b/packages/react-hooks/src/useModal.ts @@ -5,9 +5,9 @@ import { ModalState } from './types'; import { useCallback } from 'react'; -import useToggle from './useToggle'; +import { useToggle } from './useToggle'; -export default function useModal (defaultIsOpen?: boolean, onOpen?: () => void, onClose?: () => void): ModalState { +export function useModal (defaultIsOpen?: boolean, onOpen?: () => void, onClose?: () => void): ModalState { const [isOpen, , setIsOpen] = useToggle(defaultIsOpen || false); const _onOpen = useCallback( (): void => { diff --git a/packages/react-hooks/src/useNonEmptyString.ts b/packages/react-hooks/src/useNonEmptyString.ts index 8272531181..d8a1609d9b 100644 --- a/packages/react-hooks/src/useNonEmptyString.ts +++ b/packages/react-hooks/src/useNonEmptyString.ts @@ -1,9 +1,9 @@ // Copyright 2017-2020 @polkadot/react-hooks authors & contributors // SPDX-License-Identifier: Apache-2.0 -import useFormField, { FormField } from './useFormField'; +import { useFormField, FormField } from './useFormField'; -export default function useNonEmptyString (initialValue = ''): FormField { +export function useNonEmptyString (initialValue = ''): FormField { return useFormField( initialValue, (value?: string | null): boolean => (value && value.length > 0) || false diff --git a/packages/react-hooks/src/useNonZeroBn.ts b/packages/react-hooks/src/useNonZeroBn.ts index 9a4c8bd3a3..a792096fb2 100644 --- a/packages/react-hooks/src/useNonZeroBn.ts +++ b/packages/react-hooks/src/useNonZeroBn.ts @@ -2,10 +2,10 @@ // SPDX-License-Identifier: Apache-2.0 import BN from 'bn.js'; -import useFormField, { FormField } from './useFormField'; +import { useFormField, FormField } from './useFormField'; import { BN_ZERO } from '@polkadot/util'; -export default function useNonZeroBn (initialValue: BN = BN_ZERO): FormField { +export function useNonZeroBn (initialValue: BN = BN_ZERO): FormField { return useFormField( initialValue, (value: BN): boolean => !value.isZero() diff --git a/packages/react-hooks/src/useOwnEraRewards.ts b/packages/react-hooks/src/useOwnEraRewards.ts index 3a29f928f3..028f6266ee 100644 --- a/packages/react-hooks/src/useOwnEraRewards.ts +++ b/packages/react-hooks/src/useOwnEraRewards.ts @@ -9,9 +9,9 @@ import { useEffect, useState } from 'react'; import { registry } from '@polkadot/react-api'; import { BN_ZERO } from '@polkadot/util'; -import useApi from './useApi'; -import useCall from './useCall'; -import useIsMountedRef from './useIsMountedRef'; +import { useApi } from './useApi'; +import { useCall } from './useCall'; +import { useIsMountedRef } from './useIsMountedRef'; import { useOwnStashIds } from './useOwnStashes'; interface State { @@ -87,7 +87,7 @@ function getValRewards (validatorEras: ValidatorWithEras[], erasPoints: DeriveEr }; } -export default function useOwnEraRewards (maxEras?: number, ownValidators?: StakerState[]): State { +export function useOwnEraRewards (maxEras?: number, ownValidators?: StakerState[]): State { const { api } = useApi(); const mountedRef = useIsMountedRef(); const stashIds = useOwnStashIds(); diff --git a/packages/react-hooks/src/useOwnStashInfos.ts b/packages/react-hooks/src/useOwnStashInfos.ts index ddd6b277b2..db6503bc5f 100644 --- a/packages/react-hooks/src/useOwnStashInfos.ts +++ b/packages/react-hooks/src/useOwnStashInfos.ts @@ -9,11 +9,11 @@ import { StakerState } from './types'; import { useEffect, useMemo, useState } from 'react'; import { u8aConcat, u8aToHex } from '@polkadot/util'; -import useAccounts from './useAccounts'; -import useApi from './useApi'; -import useIsMountedRef from './useIsMountedRef'; -import useOwnStashes from './useOwnStashes'; -import useStashIds from './useStashIds'; +import { useAccounts } from './useAccounts'; +import { useApi } from './useApi'; +import { useIsMountedRef } from './useIsMountedRef'; +import { useOwnStashes } from './useOwnStashes'; +import { useStashIds } from './useStashIds'; type ValidatorInfo = ITuple<[ValidatorPrefs, Codec]> | ValidatorPrefs; type Queried = Record; @@ -55,7 +55,7 @@ function getStakerState (stashId: string, allAccounts: string[], allStashes: str }; } -export default function useOwnStashInfos (): StakerState[] | undefined { +export function useOwnStashInfos (): StakerState[] | undefined { const { api } = useApi(); const { allAccounts } = useAccounts(); const mountedRef = useIsMountedRef(); diff --git a/packages/react-hooks/src/useOwnStashes.ts b/packages/react-hooks/src/useOwnStashes.ts index bac08c6a4f..4e124f0dd6 100644 --- a/packages/react-hooks/src/useOwnStashes.ts +++ b/packages/react-hooks/src/useOwnStashes.ts @@ -6,9 +6,9 @@ import { AccountId, StakingLedger } from '@polkadot/types/interfaces'; import { useMemo } from 'react'; import { Option } from '@polkadot/types'; -import useAccounts from './useAccounts'; -import useApi from './useApi'; -import useCall from './useCall'; +import { useAccounts } from './useAccounts'; +import { useApi } from './useApi'; +import { useCall } from './useCall'; type IsInKeyring = boolean; @@ -30,7 +30,7 @@ function getStashes (allAccounts: string[], ownBonded: Option[], ownL return result; } -export default function useOwnStashes (): [string, IsInKeyring][] | undefined { +export function useOwnStashes (): [string, IsInKeyring][] | undefined { const { allAccounts, hasAccounts } = useAccounts(); const { api } = useApi(); const ownBonded = useCall[]>(hasAccounts && api.query.staking?.bonded.multi, [allAccounts]); diff --git a/packages/react-hooks/src/usePassword.ts b/packages/react-hooks/src/usePassword.ts index c56207d833..e1d74cbf9c 100644 --- a/packages/react-hooks/src/usePassword.ts +++ b/packages/react-hooks/src/usePassword.ts @@ -11,7 +11,7 @@ interface PasswordProps { setIsPasswordValid: React.Dispatch; } -export default function usePassword (): PasswordProps { +export function usePassword (): PasswordProps { const [password, setPassword] = useState(''); const [isPasswordValid, setIsPasswordValid] = useState(false); diff --git a/packages/react-hooks/src/useRegistrars.ts b/packages/react-hooks/src/useRegistrars.ts index a9e1fa41b0..a4b7308574 100644 --- a/packages/react-hooks/src/useRegistrars.ts +++ b/packages/react-hooks/src/useRegistrars.ts @@ -6,9 +6,9 @@ import { RegistrarInfo } from '@polkadot/types/interfaces'; import { useMemo } from 'react'; import { Option } from '@polkadot/types'; -import useAccounts from './useAccounts'; -import useApi from './useApi'; -import useCall from './useCall'; +import { useAccounts } from './useAccounts'; +import { useApi } from './useApi'; +import { useCall } from './useCall'; interface RegistrarNull { address: string | null; @@ -26,7 +26,7 @@ interface State { skipQuery?: boolean; } -export default function useRegistrars (skipQuery?: boolean): State { +export function useRegistrars (skipQuery?: boolean): State { const { api } = useApi(); const { allAccounts, hasAccounts } = useAccounts(); const query = useCall[]>(!skipQuery && hasAccounts && api.query.identity?.registrars); diff --git a/packages/react-hooks/src/useStashIds.ts b/packages/react-hooks/src/useStashIds.ts index f5aca9b246..599e232c08 100644 --- a/packages/react-hooks/src/useStashIds.ts +++ b/packages/react-hooks/src/useStashIds.ts @@ -3,14 +3,14 @@ import { AccountId } from '@polkadot/types/interfaces'; -import useApi from './useApi'; -import useCall from './useCall'; +import { useApi } from './useApi'; +import { useCall } from './useCall'; const transformStashes = { transform: (stashes: AccountId[]) => stashes.map((accountId) => accountId.toString()) }; -export default function useStashIds (): string[] | undefined { +export function useStashIds (): string[] | undefined { const { api } = useApi(); return useCall(api.derive.staking.stashes, undefined, transformStashes); diff --git a/packages/react-hooks/src/useSudo.ts b/packages/react-hooks/src/useSudo.ts index 74589e993a..fbcbe924c7 100644 --- a/packages/react-hooks/src/useSudo.ts +++ b/packages/react-hooks/src/useSudo.ts @@ -6,15 +6,15 @@ import { UseSudo } from './types'; import { useEffect, useState } from 'react'; -import useAccounts from './useAccounts'; -import useApi from './useApi'; -import useCall from './useCall'; +import { useAccounts } from './useAccounts'; +import { useApi } from './useApi'; +import { useCall } from './useCall'; const transformSudo = { transform: (key: AccountId) => key.toString() }; -export default function useSudo (): UseSudo { +export function useSudo (): UseSudo { const { api } = useApi(); const { allAccounts, hasAccounts } = useAccounts(); const sudoKey = useCall(hasAccounts && api.query.sudo?.key, undefined, transformSudo); diff --git a/packages/react-hooks/src/useToggle.ts b/packages/react-hooks/src/useToggle.ts index e216a641b8..b4bcbc1e06 100644 --- a/packages/react-hooks/src/useToggle.ts +++ b/packages/react-hooks/src/useToggle.ts @@ -3,10 +3,10 @@ import { useCallback, useEffect, useState } from 'react'; -import useIsMountedRef from './useIsMountedRef'; +import { useIsMountedRef } from './useIsMountedRef'; // Simple wrapper for a true/false toggle -export default function useToggle (defaultValue = false, onToggle?: (isActive: boolean) => void): [boolean, () => void, (value: boolean) => void] { +export function useToggle (defaultValue = false, onToggle?: (isActive: boolean) => void): [boolean, () => void, (value: boolean) => void] { const mountedRef = useIsMountedRef(); const [isActive, setActive] = useState(defaultValue); diff --git a/packages/react-hooks/src/useVotingStatus.ts b/packages/react-hooks/src/useVotingStatus.ts index 4a33e48a65..77b0f3e70c 100644 --- a/packages/react-hooks/src/useVotingStatus.ts +++ b/packages/react-hooks/src/useVotingStatus.ts @@ -8,8 +8,8 @@ import { useMemo } from 'react'; import { ApiPromise } from '@polkadot/api'; import { isFunction } from '@polkadot/util'; -import useApi from './useApi'; -import useCall from './useCall'; +import { useApi } from './useApi'; +import { useCall } from './useCall'; interface State { hasFailed: boolean; @@ -51,7 +51,7 @@ function getStatus (api: ApiPromise, bestNumber: BlockNumber, votes: Votes, numM }; } -export default function useVotingStatus (votes: Votes | null | undefined, numMembers: number, section: 'council' | 'technicalCommittee'): State { +export function useVotingStatus (votes: Votes | null | undefined, numMembers: number, section: 'council' | 'technicalCommittee'): State { const { api } = useApi(); const bestNumber = useCall(api.derive.chain.bestNumber); diff --git a/packages/react-hooks/src/useWeight.ts b/packages/react-hooks/src/useWeight.ts index 39d43754ec..bdc748a610 100644 --- a/packages/react-hooks/src/useWeight.ts +++ b/packages/react-hooks/src/useWeight.ts @@ -7,15 +7,15 @@ import BN from 'bn.js'; import { useEffect, useState } from 'react'; import { BN_ZERO } from '@polkadot/util'; -import useApi from './useApi'; -import useIsMountedRef from './useIsMountedRef'; +import { useApi } from './useApi'; +import { useIsMountedRef } from './useIsMountedRef'; // a random address that we are using for our queries const ZERO_ACCOUNT = '5CAUdnwecHGxxyr5vABevAfZ34Fi4AaraDRMwfDQXQ52PXqg'; const EMPTY_STATE: [BN, number] = [BN_ZERO, 0]; // for a given call, calculate the weight -export default function useWeight (call?: Call | null): [BN, number] { +export function useWeight (call?: Call | null): [BN, number] { const { api } = useApi(); const mountedRef = useIsMountedRef(); const [state, setState] = useState(EMPTY_STATE); diff --git a/packages/react-params/package.json b/packages/react-params/package.json index bde03580d0..4fa2a66da0 100644 --- a/packages/react-params/package.json +++ b/packages/react-params/package.json @@ -2,11 +2,9 @@ "name": "@polkadot/react-params", "version": "0.66.2-5", "main": "index.js", - "repository": "https://github.com/polkadot-js/apps.git", + "repository": "github:polkadot-js/apps", "author": "Jaco Greeff ", - "maintainers": [ - "Jaco Greeff " - ], + "maintainers": [], "contributors": [], "license": "Apache-2.0", "dependencies": { diff --git a/packages/react-params/src/Param/Amount.tsx b/packages/react-params/src/Param/Amount.tsx index 68fad98c47..ac205c312c 100644 --- a/packages/react-params/src/Param/Amount.tsx +++ b/packages/react-params/src/Param/Amount.tsx @@ -7,7 +7,7 @@ import BN from 'bn.js'; import React, { useCallback, useMemo } from 'react'; import { registry } from '@polkadot/react-api'; import { Input, InputNumber } from '@polkadot/react-components'; -import { ClassOf } from '@polkadot/types'; +import { ClassOf } from '@polkadot/types/create'; import { bnToBn, formatNumber, isUndefined } from '@polkadot/util'; import Bare from './Bare'; diff --git a/packages/react-params/src/Param/BaseBytes.tsx b/packages/react-params/src/Param/BaseBytes.tsx index acb3737a2b..ff1533d8dc 100644 --- a/packages/react-params/src/Param/BaseBytes.tsx +++ b/packages/react-params/src/Param/BaseBytes.tsx @@ -5,9 +5,8 @@ import { TypeDef } from '@polkadot/types/types'; import { RawParam, RawParamOnChange, RawParamOnEnter, RawParamOnEscape, Size } from '../types'; import React, { useCallback, useState } from 'react'; -import { Compact } from '@polkadot/types'; import { Input } from '@polkadot/react-components'; -import { hexToU8a, isAscii, isHex, isU8a, stringToU8a, u8aToHex, u8aToString } from '@polkadot/util'; +import { compactAddLength, hexToU8a, isAscii, isHex, isU8a, stringToU8a, u8aToHex, u8aToString } from '@polkadot/util'; import { decodeAddress } from '@polkadot/util-crypto'; import { useTranslation } from '../translate'; @@ -83,7 +82,7 @@ function BaseBytes ({ asHex, children, className = '', defaultValue: { value }, ); if (withLength && isValid) { - value = Compact.addLengthPrefix(value); + value = compactAddLength(value); } onChange && onChange({ diff --git a/packages/react-params/src/Param/Bytes.tsx b/packages/react-params/src/Param/Bytes.tsx index 1af761cd03..9a84a8b97f 100644 --- a/packages/react-params/src/Param/Bytes.tsx +++ b/packages/react-params/src/Param/Bytes.tsx @@ -5,8 +5,8 @@ import { Props } from '../types'; import React, { useCallback, useState } from 'react'; import styled from 'styled-components'; -import { Compact } from '@polkadot/types'; import { Toggle } from '@polkadot/react-components'; +import { compactAddLength } from '@polkadot/util'; import { useTranslation } from '../translate'; import BaseBytes from './BaseBytes'; @@ -23,7 +23,7 @@ function Bytes ({ className = '', defaultValue, isDisabled, isError, label, name onChange && onChange({ isValid, - value: Compact.addLengthPrefix(value) + value: compactAddLength(value) }); setIsValid(isValid); diff --git a/packages/react-params/src/Param/Enum.tsx b/packages/react-params/src/Param/Enum.tsx index 03aea2608b..03ee8f3e25 100644 --- a/packages/react-params/src/Param/Enum.tsx +++ b/packages/react-params/src/Param/Enum.tsx @@ -7,7 +7,8 @@ import { ParamDef, Props, RawParam } from '../types'; import React, { useCallback, useEffect, useState } from 'react'; import { registry } from '@polkadot/react-api'; import { Dropdown } from '@polkadot/react-components'; -import { Enum, createType, getTypeDef } from '@polkadot/types'; +import { Enum } from '@polkadot/types'; +import { getTypeDef } from '@polkadot/types/create'; import Params from '../'; import Bare from './Bare'; @@ -30,7 +31,7 @@ function EnumParam (props: Props): React.ReactElement { const [{ options, subTypes }, setOptions] = useState({ options: [], subTypes: [] }); useEffect((): void => { - const rawType = createType(registry, type.type as 'u32').toRawType(); + const rawType = registry.createType(type.type as 'u32').toRawType(); const typeDef = getTypeDef(rawType); const subTypes = typeDef.sub as TypeDef[]; diff --git a/packages/react-params/src/Param/KeyValue.tsx b/packages/react-params/src/Param/KeyValue.tsx index 8134683eb7..9b73bc6352 100644 --- a/packages/react-params/src/Param/KeyValue.tsx +++ b/packages/react-params/src/Param/KeyValue.tsx @@ -4,9 +4,8 @@ import { Props } from '../types'; import React, { useCallback, useEffect, useState } from 'react'; -import { Compact } from '@polkadot/types'; import { Input } from '@polkadot/react-components'; -import { hexToU8a, u8aConcat } from '@polkadot/util'; +import { compactAddLength, hexToU8a, u8aConcat } from '@polkadot/util'; import Bare from './Bare'; @@ -31,7 +30,7 @@ export function createParam (hex: string | String, length = -1): StateParam { return { isValid, - u8a: Compact.addLengthPrefix(u8a) + u8a: compactAddLength(u8a) }; } diff --git a/packages/react-params/src/Param/VoteThreshold.tsx b/packages/react-params/src/Param/VoteThreshold.tsx index a7e4c2c36e..595d6779b6 100644 --- a/packages/react-params/src/Param/VoteThreshold.tsx +++ b/packages/react-params/src/Param/VoteThreshold.tsx @@ -4,9 +4,9 @@ import { Props } from '../types'; import React, { useCallback } from 'react'; -import { ClassOf } from '@polkadot/types'; import { registry } from '@polkadot/react-api'; import { Dropdown } from '@polkadot/react-components'; +import { ClassOf } from '@polkadot/types/create'; import { bnToBn } from '@polkadot/util'; import Bare from './Bare'; diff --git a/packages/react-params/src/Param/findComponent.ts b/packages/react-params/src/Param/findComponent.ts index 6b916320d7..060a1eef90 100644 --- a/packages/react-params/src/Param/findComponent.ts +++ b/packages/react-params/src/Param/findComponent.ts @@ -5,7 +5,7 @@ import { TypeDef, TypeDefInfo } from '@polkadot/types/types'; import { Props, ComponentMap } from '../types'; import { registry } from '@polkadot/react-api'; -import { getTypeDef } from '@polkadot/types'; +import { getTypeDef } from '@polkadot/types/create'; import { isBn } from '@polkadot/util'; import Account from './Account'; diff --git a/packages/react-params/src/Param/index.tsx b/packages/react-params/src/Param/index.tsx index 9e4095bbcc..614487785c 100644 --- a/packages/react-params/src/Param/index.tsx +++ b/packages/react-params/src/Param/index.tsx @@ -5,7 +5,7 @@ import { Props, Props as CProps } from '../types'; import React, { useMemo, useRef } from 'react'; import { classes } from '@polkadot/react-components/util'; -import { encodeTypeDef } from '@polkadot/types'; +import { encodeTypeDef } from '@polkadot/types/create'; import { isUndefined } from '@polkadot/util'; import findComponent from './findComponent'; diff --git a/packages/react-params/src/Param/useParamDefs.ts b/packages/react-params/src/Param/useParamDefs.ts index 2ce9f0f80b..713daa4f5b 100644 --- a/packages/react-params/src/Param/useParamDefs.ts +++ b/packages/react-params/src/Param/useParamDefs.ts @@ -6,7 +6,7 @@ import { ParamDef } from '../types'; import { useEffect, useState } from 'react'; import { registry } from '@polkadot/react-api'; -import { getTypeDef } from '@polkadot/types'; +import { getTypeDef } from '@polkadot/types/create'; function expandDef (td: TypeDef): TypeDef { try { diff --git a/packages/react-params/src/initValue.ts b/packages/react-params/src/initValue.ts index f598e1e9bb..327b1e6d1f 100644 --- a/packages/react-params/src/initValue.ts +++ b/packages/react-params/src/initValue.ts @@ -4,7 +4,8 @@ import { TypeDef, TypeDefInfo } from '@polkadot/types/types'; import { registry } from '@polkadot/react-api'; -import { Raw, createType, getTypeDef } from '@polkadot/types'; +import { Raw } from '@polkadot/types'; +import { getTypeDef } from '@polkadot/types/create'; import { BN_ZERO, isBn } from '@polkadot/util'; const warnList: string[] = []; @@ -83,10 +84,10 @@ export default function getInitValue (def: TypeDef): unknown { case 'CodeHash': case 'Hash': case 'H256': - return createType(registry, 'H256'); + return registry.createType('H256'); case 'H512': - return createType(registry, 'H512'); + return registry.createType('H512'); case 'H160': return registry.createType('H160'); @@ -122,7 +123,7 @@ export default function getInitValue (def: TypeDef): unknown { let error: string | null = null; try { - const instance = createType(registry, type as 'u32'); + const instance = registry.createType(type as 'u32'); const raw = getTypeDef(instance.toRawType()); if (isBn(instance)) { diff --git a/packages/react-query/package.json b/packages/react-query/package.json index 1dcd7fca09..851efc0731 100644 --- a/packages/react-query/package.json +++ b/packages/react-query/package.json @@ -9,26 +9,15 @@ "RxJs" ], "author": "Jaco Greeff ", - "maintainers": [ - "Jaco Greeff " - ], + "maintainers": [], "contributors": [], "license": "Apache-2.0", "engines": { "node": ">=8.0" }, - "publishConfig": { - "access": "public", - "registry": "https://registry.npmjs.org" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/polkadot-js/ui.git" - }, - "bugs": { - "url": "https://github.com/polkadot-js/ui/issues" - }, - "homepage": "https://github.com/polkadot-js/ui/tree/master/packages/ui-reactive#readme", + "repository": "github:polkadot-js/apps", + "bugs": "https://github.com/polkadot-js/apps/issues", + "homepage": "https://github.com/polkadot-js/apps/tree/master/packages/react-query#readme", "dependencies": { "@babel/runtime": "^7.12.1" } diff --git a/packages/react-signer/package.json b/packages/react-signer/package.json index e411ec9895..299dcdec13 100644 --- a/packages/react-signer/package.json +++ b/packages/react-signer/package.json @@ -2,11 +2,9 @@ "name": "@polkadot/react-signer", "version": "0.66.2-5", "main": "index.js", - "repository": "https://github.com/polkadot-js/apps.git", + "repository": "github:polkadot-js/apps", "author": "Jaco Greeff ", - "maintainers": [ - "Jaco Greeff " - ], + "maintainers": [], "contributors": [], "license": "Apache-2.0", "dependencies": { diff --git a/packages/react-signer/src/signers/ApiSigner.ts b/packages/react-signer/src/signers/ApiSigner.ts index 476515028f..4bec728ba8 100644 --- a/packages/react-signer/src/signers/ApiSigner.ts +++ b/packages/react-signer/src/signers/ApiSigner.ts @@ -8,7 +8,7 @@ import { Hash } from '@polkadot/types/interfaces'; import { SignerPayloadJSON } from '@polkadot/types/types'; import { registry } from '@polkadot/react-api'; -import { ClassOf } from '@polkadot/types'; +import { ClassOf } from '@polkadot/types/create'; export default class ApiSigner implements Signer { readonly #queuePayload: QueueTxPayloadAdd; diff --git a/tsconfig.json b/tsconfig.json index f9befe427f..320e4f00aa 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "@polkadot/dev/config/tsconfig", + "extends": "@polkadot/dev/config/tsconfig.json", "exclude": [ "build/**/*", "**/build/**/*" diff --git a/yarn.lock b/yarn.lock index 5dff93e61f..d6abb852e4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1921,9 +1921,9 @@ __metadata: languageName: node linkType: hard -"@ledgerhq/hw-transport-node-hid@npm:^5.28.0": +"@ledgerhq/hw-transport-node-hid-singleton@npm:^5.28.0": version: 5.28.0 - resolution: "@ledgerhq/hw-transport-node-hid@npm:5.28.0" + resolution: "@ledgerhq/hw-transport-node-hid-singleton@npm:5.28.0" dependencies: "@ledgerhq/devices": ^5.28.0 "@ledgerhq/errors": ^5.28.0 @@ -1932,8 +1932,8 @@ __metadata: "@ledgerhq/logs": ^5.28.0 lodash: ^4.17.20 node-hid: 1.3.0 - usb: ^1.6.3 - checksum: cb9f774d8d16cbccf8c3df65959e0b919ab51d6fa23838e98df9be30b74fdd2ccdd4da980de50f1d7f7b15c533db20e00d87db459eba29259f0efb7ebfc933ed + usb-detection: ^4.10.0 + checksum: ce5005c43b022c5beaf6dac155547afc8013be30489eabb7eea3ad435feb02e79afe9da34156a8d8bfc0db076d1e31399271e5752046b68fcfc3eb9c45e3701a languageName: node linkType: hard @@ -2050,55 +2050,55 @@ __metadata: languageName: node linkType: hard -"@polkadot/api-contract@npm:^2.6.1": - version: 2.6.1 - resolution: "@polkadot/api-contract@npm:2.6.1" +"@polkadot/api-contract@npm:^2.6.2-7": + version: 2.6.2-7 + resolution: "@polkadot/api-contract@npm:2.6.2-7" dependencies: "@babel/runtime": ^7.12.1 - "@polkadot/api": 2.6.1 - "@polkadot/types": 2.6.1 - "@polkadot/util": ^4.0.1 + "@polkadot/api": 2.6.2-7 + "@polkadot/types": 2.6.2-7 + "@polkadot/util": ^4.0.2-12 bn.js: ^5.1.3 rxjs: ^6.6.3 - checksum: 57d39a11c5fa744aa3255979cdf857836d23f418a466836db6c7a17ac14bec4d85ffc027551f3adc62df69b8b22e70194a32013c09958b34b5823a681770ecdb + checksum: f9121764e8310575d791d92276ba9c51e5aad0c57a68c63a00655e14dc2133110344384be59b9bb4a306ef725eec6f286b2b8c8d386f2c9dbf48526c5a14c98d languageName: node linkType: hard -"@polkadot/api-derive@npm:2.6.1": - version: 2.6.1 - resolution: "@polkadot/api-derive@npm:2.6.1" +"@polkadot/api-derive@npm:2.6.2-7": + version: 2.6.2-7 + resolution: "@polkadot/api-derive@npm:2.6.2-7" dependencies: "@babel/runtime": ^7.12.1 - "@polkadot/api": 2.6.1 - "@polkadot/rpc-core": 2.6.1 - "@polkadot/types": 2.6.1 - "@polkadot/util": ^4.0.1 - "@polkadot/util-crypto": ^4.0.1 + "@polkadot/api": 2.6.2-7 + "@polkadot/rpc-core": 2.6.2-7 + "@polkadot/types": 2.6.2-7 + "@polkadot/util": ^4.0.2-12 + "@polkadot/util-crypto": ^4.0.2-12 bn.js: ^5.1.3 memoizee: ^0.4.14 rxjs: ^6.6.3 - checksum: 38c5c13317b7a0b4e6a016a045984943a79860eaabee4fa7d03917d06808c8c42b7f38e7628108a4c27c176df7be8145019375fb644e780039ee56ad20f26f2c + checksum: 980c6c0ab9723bc863b52afd1f921c4d58ba2aaae57c3248a4ae318344a08122f2fa28ef8304ca2928fd6f10ae22b20284ca0a14ca0555a5cb03e79410cd8dfa languageName: node linkType: hard -"@polkadot/api@npm:^2.6.1": - version: 2.6.1 - resolution: "@polkadot/api@npm:2.6.1" +"@polkadot/api@npm:^2.6.2-7": + version: 2.6.2-7 + resolution: "@polkadot/api@npm:2.6.2-7" dependencies: "@babel/runtime": ^7.12.1 - "@polkadot/api-derive": 2.6.1 - "@polkadot/keyring": ^4.0.1 - "@polkadot/metadata": 2.6.1 - "@polkadot/rpc-core": 2.6.1 - "@polkadot/rpc-provider": 2.6.1 - "@polkadot/types": 2.6.1 - "@polkadot/types-known": 2.6.1 - "@polkadot/util": ^4.0.1 - "@polkadot/util-crypto": ^4.0.1 + "@polkadot/api-derive": 2.6.2-7 + "@polkadot/keyring": ^4.0.2-12 + "@polkadot/metadata": 2.6.2-7 + "@polkadot/rpc-core": 2.6.2-7 + "@polkadot/rpc-provider": 2.6.2-7 + "@polkadot/types": 2.6.2-7 + "@polkadot/types-known": 2.6.2-7 + "@polkadot/util": ^4.0.2-12 + "@polkadot/util-crypto": ^4.0.2-12 bn.js: ^5.1.3 eventemitter3: ^4.0.7 rxjs: ^6.6.3 - checksum: d14d536bd06a3e9d6f4f476308c30cef3d307589b0f83e7a33b01966bee4f9a3407de8df02c4d23790256624343713f335cfe17dcb57cca9bac97104fa8593af + checksum: f038ac797c03b153280f5fb0eedefaade606a15e098794ffe1920c86b3c7342c579551c4fa8cb09cf7d99861dc7f00d1e16663220d1f6b1b1486932e34540373 languageName: node linkType: hard @@ -2108,7 +2108,7 @@ __metadata: dependencies: "@babel/runtime": ^7.12.1 "@polkadot/react-components": ^0.66.2-5 - "@polkadot/vanitygen": ^0.23.1 + "@polkadot/vanitygen": ^0.23.2-4 "@testing-library/react": ^11.1.0 detect-browser: ^5.2.0 file-saver: ^2.0.2 @@ -2122,7 +2122,7 @@ __metadata: dependencies: "@babel/runtime": ^7.12.1 "@polkadot/react-components": ^0.66.2-5 - "@polkadot/vanitygen": ^0.23.1 + "@polkadot/vanitygen": ^0.23.2-4 "@testing-library/react": ^11.1.0 detect-browser: ^5.2.0 file-saver: ^2.0.2 @@ -2154,7 +2154,7 @@ __metadata: resolution: "@polkadot/app-contracts@workspace:packages/page-contracts" dependencies: "@babel/runtime": ^7.12.1 - "@polkadot/api-contract": ^2.6.1 + "@polkadot/api-contract": ^2.6.2-7 languageName: unknown linkType: soft @@ -2332,7 +2332,7 @@ __metadata: "@babel/runtime": ^7.12.1 "@edgeware/node-types": ^3.0.7 "@laminar/type-definitions": ^0.2.0-beta.141 - "@polkadot/networks": ^4.0.1 + "@polkadot/networks": ^4.0.2-12 "@subsocial/types": ^0.4.7 languageName: unknown linkType: soft @@ -2343,7 +2343,7 @@ __metadata: dependencies: "@babel/core": ^7.12.3 "@babel/polyfill": ^7.12.1 - "@polkadot/dev": ^0.59.20 + "@polkadot/dev": ^0.60.1 "@polkadot/react-components": ^0.66.2-5 "@types/react-dom": ^16.9.8 "@types/tmp": ^0.2.0 @@ -2377,7 +2377,7 @@ __metadata: "@babel/runtime": ^7.12.1 "@polkadot/apps-config": ^0.66.2-5 "@polkadot/apps-routing": ^0.66.2-5 - "@polkadot/dev": ^0.59.20 + "@polkadot/dev": ^0.60.1 "@polkadot/react-api": ^0.66.2-5 "@polkadot/react-components": ^0.66.2-5 "@polkadot/react-hooks": ^0.66.2-5 @@ -2404,9 +2404,9 @@ __metadata: languageName: unknown linkType: soft -"@polkadot/dev@npm:^0.59.20": - version: 0.59.20 - resolution: "@polkadot/dev@npm:0.59.20" +"@polkadot/dev@npm:^0.60.1": + version: 0.60.1 + resolution: "@polkadot/dev@npm:0.60.1" dependencies: "@babel/cli": ^7.12.1 "@babel/core": ^7.12.3 @@ -2433,6 +2433,7 @@ __metadata: "@typescript-eslint/parser": 4.6.1 "@vue/component-compiler-utils": ^3.2.0 babel-jest: ^26.6.3 + babel-plugin-module-extension-resolver: ^0.3.0 babel-plugin-module-resolver: ^4.0.0 babel-plugin-styled-components: ^1.11.1 browserslist: ^4.14.6 @@ -2470,91 +2471,119 @@ __metadata: typescript: ^4.0.5 yargs: ^16.1.0 bin: - polkadot-ci-ghact-build: scripts/polkadot-ci-ghact-build.js - polkadot-ci-ghact-docs: scripts/polkadot-ci-ghact-docs.js - polkadot-ci-ghpages-force: scripts/polkadot-ci-ghpages-force.js - polkadot-dev-build-docs: scripts/polkadot-dev-build-docs.js - polkadot-dev-build-ts: scripts/polkadot-dev-build-ts.js - polkadot-dev-circular: scripts/polkadot-dev-circular.js - polkadot-dev-clean-build: scripts/polkadot-dev-clean-build.js - polkadot-dev-copy-to: scripts/polkadot-dev-copy-to.js - polkadot-dev-run-lint: scripts/polkadot-dev-run-lint.js - polkadot-dev-run-prettier: scripts/polkadot-dev-run-prettier.js - polkadot-dev-run-test: scripts/polkadot-dev-run-test.js - polkadot-dev-version: scripts/polkadot-dev-version.js - polkadot-dev-yarn-only: scripts/polkadot-dev-yarn-only.js - polkadot-exec-eslint: scripts/polkadot-exec-eslint.js - polkadot-exec-ghpages: scripts/polkadot-exec-ghpages.js - polkadot-exec-ghrelease: scripts/polkadot-exec-ghrelease.js - polkadot-exec-lerna: scripts/polkadot-exec-lerna.js - polkadot-exec-prettier: scripts/polkadot-exec-prettier.js - polkadot-exec-tsc: scripts/polkadot-exec-tsc.js - polkadot-exec-typedoc: scripts/polkadot-exec-typedoc.js - polkadot-exec-vuepress: scripts/polkadot-exec-vuepress.js - polkadot-exec-webpack: scripts/polkadot-exec-webpack.js - checksum: 4d589615cc8bc2d1b302113d734e4f0a22ae8fb86f202648cb4b4a3780022fd7dab1d04ce85c5e8040849878c0372fbf19578ed6cf5cf95589054bda475fbc9b + polkadot-ci-ghact-build: scripts/polkadot-ci-ghact-build.cjs + polkadot-ci-ghact-docs: scripts/polkadot-ci-ghact-docs.cjs + polkadot-ci-ghpages-force: scripts/polkadot-ci-ghpages-force.cjs + polkadot-dev-build-docs: scripts/polkadot-dev-build-docs.cjs + polkadot-dev-build-ts: scripts/polkadot-dev-build-ts.cjs + polkadot-dev-circular: scripts/polkadot-dev-circular.cjs + polkadot-dev-clean-build: scripts/polkadot-dev-clean-build.cjs + polkadot-dev-copy-to: scripts/polkadot-dev-copy-to.cjs + polkadot-dev-run-lint: scripts/polkadot-dev-run-lint.cjs + polkadot-dev-run-prettier: scripts/polkadot-dev-run-prettier.cjs + polkadot-dev-run-test: scripts/polkadot-dev-run-test.cjs + polkadot-dev-version: scripts/polkadot-dev-version.cjs + polkadot-dev-yarn-only: scripts/polkadot-dev-yarn-only.cjs + polkadot-exec-eslint: scripts/polkadot-exec-eslint.cjs + polkadot-exec-ghpages: scripts/polkadot-exec-ghpages.cjs + polkadot-exec-ghrelease: scripts/polkadot-exec-ghrelease.cjs + polkadot-exec-lerna: scripts/polkadot-exec-lerna.cjs + polkadot-exec-prettier: scripts/polkadot-exec-prettier.cjs + polkadot-exec-tsc: scripts/polkadot-exec-tsc.cjs + polkadot-exec-typedoc: scripts/polkadot-exec-typedoc.cjs + polkadot-exec-vuepress: scripts/polkadot-exec-vuepress.cjs + polkadot-exec-webpack: scripts/polkadot-exec-webpack.cjs + checksum: 87086fe151f853bad1206099b642a20c381801e67d3564c35f478acc1d5c2dd2f29b8ac4d4aaa71d30880764ab5d678adeb7f2edb6d38607a5e629e3ccb75ba2 languageName: node linkType: hard -"@polkadot/extension-dapp@npm:^0.35.0-beta.42": - version: 0.35.0-beta.42 - resolution: "@polkadot/extension-dapp@npm:0.35.0-beta.42" +"@polkadot/extension-dapp@npm:^0.35.0-beta.47": + version: 0.35.0-beta.47 + resolution: "@polkadot/extension-dapp@npm:0.35.0-beta.47" dependencies: "@babel/runtime": ^7.12.1 - "@polkadot/extension-inject": ^0.35.0-beta.42 - "@polkadot/util": ^4.0.1 - "@polkadot/util-crypto": ^4.0.1 + "@polkadot/extension-inject": ^0.35.0-beta.47 + "@polkadot/util": ^4.0.2-12 + "@polkadot/util-crypto": ^4.0.2-12 peerDependencies: "@polkadot/api": "*" - checksum: 986ba65a1c0f152847dfd820112b21908dcbaeed62daf937ef27f1cd8b7b5fe7dc2d626d6abfac43eebe1cce246e6bbb644521cc0f0c40c91f8c7a0598f0a6a0 + checksum: f9ad81dcd5ee430b345b5c2202393566686d918ab4596a9e6f56405383396e3eac6b47b8fc955c198c3854348162c5c3d5a3d016298514be25a4d7c804714a96 languageName: node linkType: hard -"@polkadot/extension-inject@npm:^0.35.0-beta.42": - version: 0.35.0-beta.42 - resolution: "@polkadot/extension-inject@npm:0.35.0-beta.42" +"@polkadot/extension-inject@npm:^0.35.0-beta.47": + version: 0.35.0-beta.47 + resolution: "@polkadot/extension-inject@npm:0.35.0-beta.47" dependencies: "@babel/runtime": ^7.12.1 peerDependencies: "@polkadot/api": "*" - checksum: ec13887a81f81ff69bb77e71796cfda47c0790303f588e98baf1d022e90a63d180a58fed63a0a12559100d4bdc879b137259a4b3edfb6d7cdacac88ae5a1d078 + checksum: 233c4ae28414e137475ee8d0ab614c51eb6edcd0910ff91f0a47cd7aec25c61cc15947ed8d8e2f0d8999a314d4a8a92dd9a5d58123777315ae9d265fe4144849 languageName: node linkType: hard -"@polkadot/keyring@npm:^4.0.1": - version: 4.0.1 - resolution: "@polkadot/keyring@npm:4.0.1" +"@polkadot/keyring@npm:^4.0.2-12": + version: 4.0.2-12 + resolution: "@polkadot/keyring@npm:4.0.2-12" dependencies: "@babel/runtime": ^7.12.1 - "@polkadot/util": 4.0.1 - "@polkadot/util-crypto": 4.0.1 + "@polkadot/util": 4.0.2-12 + "@polkadot/util-crypto": 4.0.2-12 peerDependencies: - "@polkadot/util": 4.0.1 - "@polkadot/util-crypto": 4.0.1 - checksum: 2fc0c101b6c24ca60dd6cad59084ab79a7d308bb4e078012f8c31489789de53c198f73fb2f6ab09d712a332d31c28497906f01cd7d4847e8140cc38f5e310d5d + "@polkadot/util": 4.0.2-12 + "@polkadot/util-crypto": 4.0.2-12 + checksum: 67056cc9dbf4d91e589ddd59c2cdb4eac506703f5ab690d27233f0de33d2b92af1004ec74841b82de3476447e62dc7dfcbf22c63e891d5a8a84f93f89c6b71c2 languageName: node linkType: hard -"@polkadot/metadata@npm:2.6.1": - version: 2.6.1 - resolution: "@polkadot/metadata@npm:2.6.1" +"@polkadot/ledger-transports@npm:0.62.2-11": + version: 0.62.2-11 + resolution: "@polkadot/ledger-transports@npm:0.62.2-11" + dependencies: + "@babel/runtime": ^7.12.5 + "@ledgerhq/hw-transport-node-hid-singleton": ^5.28.0 + "@ledgerhq/hw-transport-webusb": ^5.28.0 + dependenciesMeta: + "@ledgerhq/hw-transport-node-hid-singleton": + optional: true + checksum: 35263ee1cddec297dbfd2411fee7273b49b3f188b7635a58ff248513953fe1eac7e894b81027e936ba26c120333fe19707b9db2f38b4fc5ec40cdd4266e12097 + languageName: node + linkType: hard + +"@polkadot/ledger@npm:^0.62.2-11": + version: 0.62.2-11 + resolution: "@polkadot/ledger@npm:0.62.2-11" + dependencies: + "@babel/runtime": ^7.12.5 + "@polkadot/ledger-transports": 0.62.2-11 + "@polkadot/util": ^4.0.2-12 + "@zondax/ledger-polkadot": ^0.11.0 + peerDependencies: + "@polkadot/util": "*" + checksum: febe012e711dadcb7b5120a026531823bc0c49a31148e7aa64bab7c849699558d5249c61bd34d0f5865c914cb7cfa998c495bd7f5c3f6de59ac76eb1fe0183d8 + languageName: node + linkType: hard + +"@polkadot/metadata@npm:2.6.2-7": + version: 2.6.2-7 + resolution: "@polkadot/metadata@npm:2.6.2-7" dependencies: "@babel/runtime": ^7.12.1 - "@polkadot/types": 2.6.1 - "@polkadot/types-known": 2.6.1 - "@polkadot/util": ^4.0.1 - "@polkadot/util-crypto": ^4.0.1 + "@polkadot/types": 2.6.2-7 + "@polkadot/types-known": 2.6.2-7 + "@polkadot/util": ^4.0.2-12 + "@polkadot/util-crypto": ^4.0.2-12 bn.js: ^5.1.3 - checksum: e87c8a4ef763a3ad94567a95cf6a105a66a2d9b0a0a1c2469c2a2b15133e146c070bbdee0a38fb6541f81691a57b3e51e32be04df14269d64805a1921f7ba343 + checksum: 124cf4735e1096b5ec5b21092e44dd653ddbb7ebff7beb4d1bdeabc00a0af51ce74e4037be64c81fec57bbd951f75b7c016a0aec3cba4259ae979e661f10aeae languageName: node linkType: hard -"@polkadot/networks@npm:^4.0.1": - version: 4.0.1 - resolution: "@polkadot/networks@npm:4.0.1" +"@polkadot/networks@npm:^4.0.2-12": + version: 4.0.2-12 + resolution: "@polkadot/networks@npm:4.0.2-12" dependencies: "@babel/runtime": ^7.12.1 - checksum: 46f0bdba3a9a6a7649645944dbac4c0e88e5b15c3d25cc13a71a91440bba179c3233cdbb99b3359fe230ff396666315d50aab6248f851748491c77ebc0568e97 + checksum: ae73dfa38625f0674c799a2c1436c10df03cb5abc2f261f6971cfb2c5f577d87824b5ede2c85a0b909174459f145ec05f43908bd7567911a5c342e2a29f9dea2 languageName: node linkType: hard @@ -2563,8 +2592,8 @@ __metadata: resolution: "@polkadot/react-api@workspace:packages/react-api" dependencies: "@babel/runtime": ^7.12.1 - "@polkadot/api": ^2.6.1 - "@polkadot/extension-dapp": ^0.35.0-beta.42 + "@polkadot/api": ^2.6.2-7 + "@polkadot/extension-dapp": ^0.35.0-beta.47 rxjs-compat: ^6.6.3 languageName: unknown linkType: soft @@ -2577,15 +2606,15 @@ __metadata: "@fortawesome/fontawesome-svg-core": ^1.2.32 "@fortawesome/free-solid-svg-icons": ^5.15.1 "@fortawesome/react-fontawesome": ^0.1.11 - "@polkadot/keyring": ^4.0.1 + "@polkadot/keyring": ^4.0.2-12 "@polkadot/react-api": ^0.66.2-5 - "@polkadot/react-identicon": ^0.62.1 - "@polkadot/react-qr": ^0.62.1 + "@polkadot/react-identicon": ^0.62.2-11 + "@polkadot/react-qr": ^0.62.2-11 "@polkadot/react-query": ^0.66.2-5 - "@polkadot/ui-keyring": ^0.62.1 - "@polkadot/ui-settings": ^0.62.1 - "@polkadot/util": ^4.0.1 - "@polkadot/util-crypto": ^4.0.1 + "@polkadot/ui-keyring": ^0.62.2-11 + "@polkadot/ui-settings": ^0.62.2-11 + "@polkadot/util": ^4.0.2-12 + "@polkadot/util-crypto": ^4.0.2-12 "@types/codeflask": ^1.4.2 "@types/owasp-password-strength-test": ^1.3.0 chart.js: ^2.9.4 @@ -2622,16 +2651,16 @@ __metadata: languageName: unknown linkType: soft -"@polkadot/react-identicon@npm:^0.62.1": - version: 0.62.1 - resolution: "@polkadot/react-identicon@npm:0.62.1" +"@polkadot/react-identicon@npm:^0.62.2-11": + version: 0.62.2-11 + resolution: "@polkadot/react-identicon@npm:0.62.2-11" dependencies: "@babel/runtime": ^7.12.5 - "@polkadot/keyring": ^4.0.1 - "@polkadot/ui-settings": 0.62.1 - "@polkadot/ui-shared": 0.62.1 - "@polkadot/util": ^4.0.1 - "@polkadot/util-crypto": ^4.0.1 + "@polkadot/keyring": ^4.0.2-12 + "@polkadot/ui-settings": 0.62.2-11 + "@polkadot/ui-shared": 0.62.2-11 + "@polkadot/util": ^4.0.2-12 + "@polkadot/util-crypto": ^4.0.2-12 color: ^3.1.3 ethereum-blockies-base64: ^1.0.2 jdenticon: 2.2.0 @@ -2645,7 +2674,7 @@ __metadata: react-dom: "*" react-is: "*" styled-components: "*" - checksum: b7ecc77acc3661cfb14cbe2c6426745fefdaf8b4350c55117e93f91189f51679272d3c2d919a3ae3c4efecf4ed2cf947483081378743b161bdbfcc3dc39ad08b + checksum: bca139c61cc09bd2d025ffaaf67f61c2b4d049dcdd607d5a7ea609694c0f046ed3ae227348933195df864f7fe10887126e9f3b4ab3ea9363c726490a5b01e785 languageName: node linkType: hard @@ -2658,13 +2687,13 @@ __metadata: languageName: unknown linkType: soft -"@polkadot/react-qr@npm:^0.62.1": - version: 0.62.1 - resolution: "@polkadot/react-qr@npm:0.62.1" +"@polkadot/react-qr@npm:^0.62.2-11": + version: 0.62.2-11 + resolution: "@polkadot/react-qr@npm:0.62.2-11" dependencies: "@babel/runtime": ^7.12.5 - "@polkadot/util": ^4.0.1 - "@polkadot/util-crypto": ^4.0.1 + "@polkadot/util": ^4.0.2-12 + "@polkadot/util-crypto": ^4.0.2-12 qrcode-generator: ^1.4.4 react-qr-reader: ^2.2.1 styled-components: ^5.2.1 @@ -2674,7 +2703,7 @@ __metadata: react: "*" react-dom: "*" styled-components: "*" - checksum: 688344879f00881d318eb69e460b7c8bca3a4621653bb9663f15a7500bb37e97baa7c29075f84c20c925a23471bf6f8acfdb94398adedd2a76465bde0971cb30 + checksum: f0b8014fe233a156b6a9a6cc6b3c17c55304ddd47e3b442a744f8a305eb84a37d8fcb8f493cd6143631f742ceddff4c64f4a3753ec62ff28a0a3070daaae1b42 languageName: node linkType: hard @@ -2695,85 +2724,83 @@ __metadata: languageName: unknown linkType: soft -"@polkadot/rpc-core@npm:2.6.1": - version: 2.6.1 - resolution: "@polkadot/rpc-core@npm:2.6.1" +"@polkadot/rpc-core@npm:2.6.2-7": + version: 2.6.2-7 + resolution: "@polkadot/rpc-core@npm:2.6.2-7" dependencies: "@babel/runtime": ^7.12.1 - "@polkadot/metadata": 2.6.1 - "@polkadot/rpc-provider": 2.6.1 - "@polkadot/types": 2.6.1 - "@polkadot/util": ^4.0.1 + "@polkadot/metadata": 2.6.2-7 + "@polkadot/rpc-provider": 2.6.2-7 + "@polkadot/types": 2.6.2-7 + "@polkadot/util": ^4.0.2-12 memoizee: ^0.4.14 rxjs: ^6.6.3 - checksum: 7687f3639c2d48ee4b8f1b4967a9fd8253873af608923c0f3eb48740fd3b8ac58dbc64e80947bd8fc82cbb57bda63b1a3c153aec01d7182afdf2f6968ea98b66 + checksum: b57f0bed98a490e6b79e2dc77b5120e8e6edef5e9689ecb4976d7ef12be59dc02a609cbf0cdeb59fc493f41b5843a14b6b1131941a56c66ffd3b6d03cd54f083 languageName: node linkType: hard -"@polkadot/rpc-provider@npm:2.6.1": - version: 2.6.1 - resolution: "@polkadot/rpc-provider@npm:2.6.1" +"@polkadot/rpc-provider@npm:2.6.2-7": + version: 2.6.2-7 + resolution: "@polkadot/rpc-provider@npm:2.6.2-7" dependencies: "@babel/runtime": ^7.12.1 - "@polkadot/types": 2.6.1 - "@polkadot/util": ^4.0.1 - "@polkadot/util-crypto": ^4.0.1 - "@polkadot/x-fetch": ^4.0.1 - "@polkadot/x-ws": ^4.0.1 + "@polkadot/types": 2.6.2-7 + "@polkadot/util": ^4.0.2-12 + "@polkadot/util-crypto": ^4.0.2-12 + "@polkadot/x-fetch": ^4.0.2-12 + "@polkadot/x-ws": ^4.0.2-12 bn.js: ^5.1.3 eventemitter3: ^4.0.7 - checksum: b172f242be157b6078492f0b2192e80009a33dfc820e05f5eb12e9b9b7a81cc6cfab8fd10559e2c296ad7c210d1607cb75672c4a862f693feaf5e8410b6e75ad + checksum: c9ccfb3065c3ffcd8ef8f852a66914ad29cca002a32529672747c3e6a9af0146adddb48ad3b44695e7e963b146b4710ca9c7de3bbffe50baae74c0937f1bdec2 languageName: node linkType: hard -"@polkadot/ts@npm:^0.3.53": - version: 0.3.53 - resolution: "@polkadot/ts@npm:0.3.53" +"@polkadot/ts@npm:^0.3.54": + version: 0.3.54 + resolution: "@polkadot/ts@npm:0.3.54" dependencies: "@types/chrome": ^0.0.125 - checksum: 9453f9e85668705567a482deddc7bbb160b2057c60b8ddf167a228aebd47bfbd8a1ff44ad5114a8f61c4626b199f98ce254a89c8e38699ef6a42820f6270a23b + checksum: 79ea0d489735acd214d2f81f4d159ddedd557efd1f39b6e6753fef6f5ec1fd77f63e2b8ddc4ae4adcf78601565c7b425eb2281af9e0bd26d55e5c051bcc39dcb languageName: node linkType: hard -"@polkadot/types-known@npm:2.6.1": - version: 2.6.1 - resolution: "@polkadot/types-known@npm:2.6.1" +"@polkadot/types-known@npm:2.6.2-7": + version: 2.6.2-7 + resolution: "@polkadot/types-known@npm:2.6.2-7" dependencies: "@babel/runtime": ^7.12.1 - "@polkadot/types": 2.6.1 - "@polkadot/util": ^4.0.1 + "@polkadot/types": 2.6.2-7 + "@polkadot/util": ^4.0.2-12 bn.js: ^5.1.3 - checksum: 785a21c777ab9d069ad4bdf80e7ae28292a8170084ccaf28e0b5720f9c68f7463e63c43e3f8e50dfdef62f610652890d57cae2115b16394cb4933424cdb47c15 + checksum: 31309dad5a4d85ddca4b36e307a535dfd96f2706ea3ec1bc21ef5e004da362807e354bf32272683f6f19e23ea336911c7e28866d237de6f2f1681b98687536cc languageName: node linkType: hard -"@polkadot/types@npm:^2.6.1": - version: 2.6.1 - resolution: "@polkadot/types@npm:2.6.1" +"@polkadot/types@npm:^2.6.2-7": + version: 2.6.2-7 + resolution: "@polkadot/types@npm:2.6.2-7" dependencies: "@babel/runtime": ^7.12.1 - "@polkadot/metadata": 2.6.1 - "@polkadot/util": ^4.0.1 - "@polkadot/util-crypto": ^4.0.1 + "@polkadot/metadata": 2.6.2-7 + "@polkadot/util": ^4.0.2-12 + "@polkadot/util-crypto": ^4.0.2-12 "@types/bn.js": ^4.11.6 bn.js: ^5.1.3 memoizee: ^0.4.14 rxjs: ^6.6.3 - checksum: 9e7658d9b4fef378e620a010bb70126c4ee8e9a936f8bfefcdc90d777fd3cd8ef8cfe95617250b83eb357aab8da3c5e304510f5c5d66b95b6dc27a60d495874c + checksum: 289c710a0435598656bd8b128fbea705fb70541e113197fb443dff9e320644f65cc0d79264b5d4c37b49734c0d2799ea26d35096539be030bf50c35f561f65ba languageName: node linkType: hard -"@polkadot/ui-keyring@npm:^0.62.1": - version: 0.62.1 - resolution: "@polkadot/ui-keyring@npm:0.62.1" +"@polkadot/ui-keyring@npm:^0.62.2-11": + version: 0.62.2-11 + resolution: "@polkadot/ui-keyring@npm:0.62.2-11" dependencies: "@babel/runtime": ^7.12.5 - "@ledgerhq/hw-transport-node-hid": ^5.28.0 - "@ledgerhq/hw-transport-webusb": ^5.28.0 - "@polkadot/keyring": ^4.0.1 - "@polkadot/ui-settings": 0.62.1 - "@polkadot/util": ^4.0.1 - "@zondax/ledger-polkadot": ^0.11.0 + "@polkadot/keyring": ^4.0.2-12 + "@polkadot/ledger": ^0.62.2-11 + "@polkadot/ui-settings": 0.62.2-11 + "@polkadot/util": ^4.0.2-12 mkdirp: ^1.0.4 rxjs: ^6.6.3 store: ^2.0.12 @@ -2781,96 +2808,94 @@ __metadata: "@polkadot/keyring": "*" "@polkadot/ui-settings": "*" "@polkadot/util": "*" - dependenciesMeta: - "@ledgerhq/hw-transport-node-hid": - optional: true - checksum: 2c1a1a3024aaed8880b50ab07a3fd7f91aa2a3e43494beb72873f81e93e7ae381b52fe046c466f60e5d1b1fffba4f13f86522f466720a76c62376861f355ddfd + checksum: d667a71277b6d413fdbcfbf53bb181e617212ded4fd69a8f9145ac1b92e012ea399cbf8d3d1375c02b412dbb431c92005d79ca8b17d0127a86d817d8393b7afa languageName: node linkType: hard -"@polkadot/ui-settings@npm:0.62.1, @polkadot/ui-settings@npm:^0.62.1": - version: 0.62.1 - resolution: "@polkadot/ui-settings@npm:0.62.1" +"@polkadot/ui-settings@npm:0.62.2-11, @polkadot/ui-settings@npm:^0.62.2-11": + version: 0.62.2-11 + resolution: "@polkadot/ui-settings@npm:0.62.2-11" dependencies: "@babel/runtime": ^7.12.5 - "@polkadot/networks": ^4.0.1 - "@polkadot/util": ^4.0.1 + "@polkadot/networks": ^4.0.2-12 + "@polkadot/util": ^4.0.2-12 eventemitter3: ^4.0.7 store: ^2.0.12 peerDependencies: "@polkadot/networks": "*" "@polkadot/util": "*" - checksum: ddd58dfef5d65e9f4897c24603aef1cd3b543619579d3bee2d2832764ff9e7f5846d4be5cb14bdd5e7a2afaa0ddfe35879a1945e570cc547ed10742caed1a37d + checksum: 14428078ae36795d0223317e01f282ac5777b538092e6beee9174c4684eee1c6f792206d92614cc7104754e66e1ad9ea87961ffd63fdd893d09f4052d2e77345 languageName: node linkType: hard -"@polkadot/ui-shared@npm:0.62.1": - version: 0.62.1 - resolution: "@polkadot/ui-shared@npm:0.62.1" +"@polkadot/ui-shared@npm:0.62.2-11": + version: 0.62.2-11 + resolution: "@polkadot/ui-shared@npm:0.62.2-11" dependencies: "@babel/runtime": ^7.12.5 color: ^3.1.3 peerDependencies: "@polkadot/util": "*" "@polkadot/util-crypto": "*" - checksum: 0cde3480c58fff686f536a484f847f1799c5610f2504c5073df6ef6bd4428e6eef63ac84c5db684bc901e4fa28a24a1d9720824b14a71541a7d4394db2e536e8 + checksum: a4376b63bdbf1da12c7e04297bb8197afa51792f8a671accdb5c0b0fe8d5dc9f519e24be367e4ff0a62871c613f892232e9984fcbcc542c81fbecc95f79e8e13 languageName: node linkType: hard -"@polkadot/util-crypto@npm:^4.0.1": - version: 4.0.1 - resolution: "@polkadot/util-crypto@npm:4.0.1" +"@polkadot/util-crypto@npm:^4.0.2-12": + version: 4.0.2-12 + resolution: "@polkadot/util-crypto@npm:4.0.2-12" dependencies: "@babel/runtime": ^7.12.1 - "@polkadot/networks": 4.0.1 - "@polkadot/util": 4.0.1 + "@polkadot/networks": 4.0.2-12 + "@polkadot/util": 4.0.2-12 "@polkadot/wasm-crypto": ^2.0.1 - "@polkadot/x-randomvalues": 4.0.1 + "@polkadot/x-randomvalues": 4.0.2-12 base-x: ^3.0.8 blakejs: ^1.1.0 bn.js: ^5.1.3 create-hash: ^1.2.0 elliptic: ^6.5.3 + hash.js: ^1.1.7 js-sha3: ^0.8.0 pbkdf2: ^3.1.1 scryptsy: ^2.1.0 tweetnacl: ^1.0.3 xxhashjs: ^0.2.2 peerDependencies: - "@polkadot/util": 4.0.1 - checksum: 8bb2f44d73e920a1a16eb7c3939c6fd6fb7d33a34844d9600a7b4e58ee67f0ac869b8877e262cec55063207fd0cf7754e49cdabe8c88c0c241ff3129fe315c35 + "@polkadot/util": 4.0.2-12 + checksum: 08fa363cbc7295d91206a7df8a97315145267bf3b8aca01e949ebf68a7dbe34c6092a9976224ae0af87536f3227528209d6e4bf9db41ec85f41652cf4fe06af3 languageName: node linkType: hard -"@polkadot/util@npm:^4.0.1": - version: 4.0.1 - resolution: "@polkadot/util@npm:4.0.1" +"@polkadot/util@npm:^4.0.2-12": + version: 4.0.2-12 + resolution: "@polkadot/util@npm:4.0.2-12" dependencies: "@babel/runtime": ^7.12.1 - "@polkadot/x-textdecoder": 4.0.1 - "@polkadot/x-textencoder": 4.0.1 + "@polkadot/x-textdecoder": 4.0.2-12 + "@polkadot/x-textencoder": 4.0.2-12 "@types/bn.js": ^4.11.6 bn.js: ^5.1.3 camelcase: ^5.3.1 ip-regex: ^4.2.0 - checksum: 316db22e9d63dd25f11e4339a769acb9f594dd134adb32d89805c576764a0b0d03e52467b61de410886308f14b819bd25034d2f6ca08f3abf53ba871e229d726 + checksum: 7ed933d1b7c222992032105dfc5b824a5c42ce8e91639cb8e37ea54fe61b69898ecbadcca0433bb081d954f6172b77df5eb4d3caae455aae6b491cd9f596bad5 languageName: node linkType: hard -"@polkadot/vanitygen@npm:^0.23.1": - version: 0.23.1 - resolution: "@polkadot/vanitygen@npm:0.23.1" +"@polkadot/vanitygen@npm:^0.23.2-4": + version: 0.23.2-4 + resolution: "@polkadot/vanitygen@npm:0.23.2-4" dependencies: "@babel/core": ^7.12.3 "@babel/register": ^7.12.1 "@babel/runtime": ^7.12.1 - "@polkadot/util": ^4.0.1 - "@polkadot/util-crypto": ^4.0.1 + "@polkadot/util": ^4.0.2-12 + "@polkadot/util-crypto": ^4.0.2-12 chalk: ^4.1.0 yargs: ^16.1.0 bin: polkadot-js-vanitygen: index.js - checksum: e25c74d4dfd5cf0225bd885b0c66f7411040ec96e5e5f23d04d689b4ac1f808e71502dcda484094fdbde6b26b8b0359c1a423192f89c5d8a31f23e80cc757003 + checksum: c730ceabb1caa185e6d00d12deca258aa7742af9db5fcdb7ba71e1ec50c78245b88d0d67d1bae3426e1a84ef78ca218d0792cdccfce2257023c9ed055717c6dd languageName: node linkType: hard @@ -2884,52 +2909,52 @@ __metadata: languageName: node linkType: hard -"@polkadot/x-fetch@npm:^4.0.1": - version: 4.0.1 - resolution: "@polkadot/x-fetch@npm:4.0.1" +"@polkadot/x-fetch@npm:^4.0.2-12": + version: 4.0.2-12 + resolution: "@polkadot/x-fetch@npm:4.0.2-12" dependencies: "@babel/runtime": ^7.12.1 "@types/node-fetch": ^2.5.7 node-fetch: ^2.6.1 - checksum: d1aa6ede4df491c71af8fccbff032b80df27bbefff407aeea9db7bbf842012a75e2e66ceb57ea2ec733397f6188544a19fed509f693680cfb220fcdccb372ac6 + checksum: 489f570417694a968be8f03173922441afc2ca54c8de03cdd3b831ff881eb004ea3fc95ea82db614bcc2189eb52e846b5fb75ca8711f94750304d73e15811828 languageName: node linkType: hard -"@polkadot/x-randomvalues@npm:4.0.1": - version: 4.0.1 - resolution: "@polkadot/x-randomvalues@npm:4.0.1" +"@polkadot/x-randomvalues@npm:4.0.2-12": + version: 4.0.2-12 + resolution: "@polkadot/x-randomvalues@npm:4.0.2-12" dependencies: "@babel/runtime": ^7.12.1 - checksum: 819d8fcb30ada53a588adf4fbb947ec76ce6a72d2ea5b67d85f7ece105dc3734a0afa345e963af80c8c08f91f3248a807e7229f4649179be88e6717d49f14056 + checksum: 02b5d6f78bd5e951d188b3a858ee76013a84f4bc03a0f53beed4c7c6ab428ec2992617f05c71c370a47d27a3633d76b3e22a9459fbdb8dc658d104ced1c5ab41 languageName: node linkType: hard -"@polkadot/x-textdecoder@npm:4.0.1": - version: 4.0.1 - resolution: "@polkadot/x-textdecoder@npm:4.0.1" +"@polkadot/x-textdecoder@npm:4.0.2-12": + version: 4.0.2-12 + resolution: "@polkadot/x-textdecoder@npm:4.0.2-12" dependencies: "@babel/runtime": ^7.12.1 - checksum: f12ef770f02756600ced9e35cd8c239f5ffef231f71b39b4f12854f0a64cc154e55dd344ddcbcfca0fb587c24bc0920bfb0288c8dabf27f2a5d317c67eee3eeb + checksum: d63a14a021142a97d1117c2e27af8a59eede5bfa7950a24d223fafea52ae29d3d80c1b694477be7aae6ac3f29c525cf49b55b9c08cb7bfa864c2f478b9bf29ed languageName: node linkType: hard -"@polkadot/x-textencoder@npm:4.0.1": - version: 4.0.1 - resolution: "@polkadot/x-textencoder@npm:4.0.1" +"@polkadot/x-textencoder@npm:4.0.2-12": + version: 4.0.2-12 + resolution: "@polkadot/x-textencoder@npm:4.0.2-12" dependencies: "@babel/runtime": ^7.12.1 - checksum: 045f1b2b8671c9b75a0144dd373714c12d386fa66c490de5ebd1abfd195b162972db63149376a8838f8626d55aeebd8b2f71c5795157e4009d6be1854cf6c226 + checksum: c9d2dd968c7e228b10d3d4afb344e346e62e6417f30941e030a42910aef664dea5bec8c84fa83167a3f3b164f1484ed489903272da658c1574746bb9efdc7096 languageName: node linkType: hard -"@polkadot/x-ws@npm:^4.0.1": - version: 4.0.1 - resolution: "@polkadot/x-ws@npm:4.0.1" +"@polkadot/x-ws@npm:^4.0.2-12": + version: 4.0.2-12 + resolution: "@polkadot/x-ws@npm:4.0.2-12" dependencies: "@babel/runtime": ^7.12.1 "@types/websocket": ^1.0.1 websocket: ^1.0.32 - checksum: f48b366856625a450d13a9bffeba53d2ab592efc939249a223cb68a45c7ae2d50490f6b28501be87e2d35933c9890ba2e2a3510188c9b5916b43ca5c2baa8b65 + checksum: c4337374684dfece573332adde555b185360fd952bbf02234012257c37cafaee1c9d7f9d83f7e6e882233d013ab830dd5271f6a10b5eb931f1598dc41fd7536a languageName: node linkType: hard @@ -4841,6 +4866,13 @@ __metadata: languageName: node linkType: hard +"babel-plugin-module-extension-resolver@npm:^0.3.0": + version: 0.3.0 + resolution: "babel-plugin-module-extension-resolver@npm:0.3.0" + checksum: d7522f7f17f27747aee35ca0ac0e5af6286065c67210e0e038ff5065e8173d5bdaef8a4f5916dd169fda5abcc96c8fb8175dececc1758210675144c6d48c9f32 + languageName: node + linkType: hard + "babel-plugin-module-resolver@npm:^4.0.0": version: 4.0.0 resolution: "babel-plugin-module-resolver@npm:4.0.0" @@ -4998,7 +5030,7 @@ __metadata: languageName: node linkType: hard -"bindings@npm:^1.4.0, bindings@npm:^1.5.0": +"bindings@npm:^1.3.0, bindings@npm:^1.5.0": version: 1.5.0 resolution: "bindings@npm:1.5.0" dependencies: @@ -8332,6 +8364,13 @@ __metadata: languageName: node linkType: hard +"eventemitter2@npm:^5.0.1": + version: 5.0.1 + resolution: "eventemitter2@npm:5.0.1" + checksum: 9f09a225e1d2cda18cfff04c042866b97c298bfca28a1f3224ac0adf4bb237642999135ce98860513c50524d7be1149d5de07c57e89368c00fb75e137ab40df9 + languageName: node + linkType: hard + "eventemitter3@npm:^4.0.0, eventemitter3@npm:^4.0.7": version: 4.0.7 resolution: "eventemitter3@npm:4.0.7" @@ -9763,7 +9802,7 @@ fsevents@^1.2.7: languageName: node linkType: hard -"hash.js@npm:^1.0.0, hash.js@npm:^1.0.3": +"hash.js@npm:^1.0.0, hash.js@npm:^1.0.3, hash.js@npm:^1.1.7": version: 1.1.7 resolution: "hash.js@npm:1.1.7" dependencies: @@ -13089,16 +13128,7 @@ fsevents@^1.2.7: languageName: node linkType: hard -"nan@npm:2.13.2": - version: 2.13.2 - resolution: "nan@npm:2.13.2" - dependencies: - node-gyp: latest - checksum: 6d31ac034f75248c4d6a240c4ba091f1ebdd52eccdef26f94fe8cf6dfe56e476c6d0d4134e022a9fffbfc90cfb10db51a4f575e76d62cfcfe32e3817f1060d25 - languageName: node - linkType: hard - -"nan@npm:^2.12.1, nan@npm:^2.14.0": +"nan@npm:^2.12.1, nan@npm:^2.13.2, nan@npm:^2.14.0": version: 2.14.2 resolution: "nan@npm:2.14.2" dependencies: @@ -14293,8 +14323,8 @@ fsevents@^1.2.7: "@babel/register": ^7.12.1 "@babel/runtime": ^7.12.1 "@pinata/sdk": ^1.1.11 - "@polkadot/dev": ^0.59.20 - "@polkadot/ts": ^0.3.53 + "@polkadot/dev": ^0.60.1 + "@polkadot/ts": ^0.3.54 "@types/bn.js": ^4.11.6 "@types/chart.js": ^2.9.27 "@types/file-saver": ^2.0.1 @@ -14497,7 +14527,7 @@ fsevents@^1.2.7: languageName: node linkType: hard -"prebuild-install@npm:^5.3.3, prebuild-install@npm:^5.3.4": +"prebuild-install@npm:^5.3.4, prebuild-install@npm:^5.3.5": version: 5.3.6 resolution: "prebuild-install@npm:5.3.6" dependencies: @@ -18519,15 +18549,16 @@ fsevents@^1.2.7: languageName: node linkType: hard -"usb@npm:^1.6.3": - version: 1.6.3 - resolution: "usb@npm:1.6.3" +"usb-detection@npm:^4.10.0": + version: 4.10.0 + resolution: "usb-detection@npm:4.10.0" dependencies: - bindings: ^1.4.0 - nan: 2.13.2 + bindings: ^1.3.0 + eventemitter2: ^5.0.1 + nan: ^2.13.2 node-gyp: latest - prebuild-install: ^5.3.3 - checksum: 5b951e2aedec8467d63ae88f3950810ea204c642da57d503a0506b10637de09318a309218511972748568e7b82bad035b7749b73037b4b3db5a0caa34c74fc30 + prebuild-install: ^5.3.5 + checksum: 17c60db18f268ef679fc3401d39348c0a248b588a46a0b7dde25fb866849511c00503b4cb4dceac02651caf5d6964388c92b46a0fb8b9b53eab3e5e520dd0a44 languageName: node linkType: hard