diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 5923ff6908..aedb705e58 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -1,7 +1,7 @@ name: 'Close stale issues and PRs' on: schedule: - - cron: cron: '2 2 * * *' + - cron: '2 2 * * *' jobs: stale: diff --git a/package.json b/package.json index 3760a26edb..f1e84eb1db 100644 --- a/package.json +++ b/package.json @@ -6,24 +6,24 @@ "author": "Jaco Greeff ", "private": true, "type": "module", - "version": "0.91.3-68", + "version": "0.91.3-76", "license": "Apache-2", "homepage": ".", "workspaces": [ "packages/*" ], "resolutions": { - "@polkadot/api": "^4.12.2-8", - "@polkadot/api-contract": "^4.12.2-8", - "@polkadot/hw-ledger": "^6.6.1", - "@polkadot/keyring": "^6.6.1", - "@polkadot/networks": "^6.6.1", - "@polkadot/phishing": "^0.6.174", - "@polkadot/types": "^4.12.2-8", - "@polkadot/util": "^6.6.1", - "@polkadot/util-crypto": "^6.6.1", + "@polkadot/api": "^4.12.2-11", + "@polkadot/api-contract": "^4.12.2-11", + "@polkadot/hw-ledger": "^6.6.2-8", + "@polkadot/keyring": "^6.6.2-8", + "@polkadot/networks": "^6.6.2-8", + "@polkadot/phishing": "^0.6.175", + "@polkadot/types": "^4.12.2-11", + "@polkadot/util": "^6.6.2-8", + "@polkadot/util-crypto": "^6.6.2-8", "@polkadot/wasm-crypto": "^4.0.2", - "@polkadot/x-rxjs": "^6.6.1", + "@polkadot/x-rxjs": "^6.6.2-8", "babel-core": "^7.0.0-bridge.0", "styled-components": "^5.2.0", "typescript": "^4.3.2" @@ -71,8 +71,8 @@ "@babel/runtime": "^7.14.0", "@crustio/crust-pin": "^0.0.1", "@pinata/sdk": "^1.1.20", - "@polkadot/dev": "^0.62.29", - "@polkadot/ts": "^0.3.77", + "@polkadot/dev": "^0.62.30", + "@polkadot/ts": "^0.3.78", "@types/bn.js": "^4.11.6", "@types/chart.js": "^2.9.32", "@types/file-saver": "^2.0.2", diff --git a/packages/apps-config/package.json b/packages/apps-config/package.json index 37ca11d09c..821ef54205 100644 --- a/packages/apps-config/package.json +++ b/packages/apps-config/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/apps-config", - "version": "0.91.3-68", + "version": "0.91.3-76", "license": "Apache-2.0", "type": "module", "main": "index.js", @@ -17,7 +17,7 @@ "@kiltprotocol/type-definitions": "^0.1.5", "@laminar/type-definitions": "^0.3.1", "@phala/typedefs": "^0.1.3", - "@polkadot/networks": "^6.6.1", + "@polkadot/networks": "^6.6.2-8", "@polymathnetwork/polymesh-types": "^0.0.2", "@snowfork/snowbridge-types": "^0.2.3", "@sora-substrate/type-definitions": "^1.3.15", diff --git a/packages/apps-config/src/endpoints/productionRelayKusama.ts b/packages/apps-config/src/endpoints/productionRelayKusama.ts index e4654e29b4..d4b7750a90 100644 --- a/packages/apps-config/src/endpoints/productionRelayKusama.ts +++ b/packages/apps-config/src/endpoints/productionRelayKusama.ts @@ -71,6 +71,13 @@ export function createKusama (t: TFunction): EndpointOption { Encointer: 'wss://canary.encointer.org' } }, + { + info: 'genshiro', + text: t('rpc.test.equilibriumtestnet', 'Genshiro', { ns: 'apps-config' }), + providers: { + Equilibrium: 'wss://testnet.equilibrium.io' + } + }, { info: 'integritee', paraId: 2015, diff --git a/packages/apps-config/src/endpoints/testingRelayRococo.ts b/packages/apps-config/src/endpoints/testingRelayRococo.ts index 5833b85c8b..2d7dbd3541 100644 --- a/packages/apps-config/src/endpoints/testingRelayRococo.ts +++ b/packages/apps-config/src/endpoints/testingRelayRococo.ts @@ -415,11 +415,10 @@ export function createRococo (t: TFunction): EndpointOption { }, { info: 'rococoVln', - isDisabled: true, // Rococo reset - paraId: 3586, - text: t('rpc.rococo.vln', 'Valiu Liquidity Network PC', { ns: 'apps-config' }), + paraId: 2007, + text: t('rpc.rococo.vln', 'Valibre Network PC', { ns: 'apps-config' }), providers: { - Valiu: 'wss://vln.valiu.dev' + Valibre: 'wss://testnet.valibre.dev' } }, { diff --git a/packages/apps-config/src/endpoints/testingRelayWestend.ts b/packages/apps-config/src/endpoints/testingRelayWestend.ts index 0667b6941f..4714f636dd 100644 --- a/packages/apps-config/src/endpoints/testingRelayWestend.ts +++ b/packages/apps-config/src/endpoints/testingRelayWestend.ts @@ -27,18 +27,19 @@ export function createWestend (t: TFunction): EndpointOption { 'Patract Elara': 'wss://westend.elara.patract.io', OnFinality: 'wss://westend.api.onfinality.io/public-ws' }, + teleport: [1000], // statemint only linked: [ // (1) system parachains (none available yet) // ... // (2) common good, leave as second group { info: 'westmint', - allowTeleport: true, paraId: 1000, text: t('rpc.westend.shell', 'Westmint', { ns: 'apps-config' }), providers: { Parity: 'wss://westmint-rpc.polkadot.io' - } + }, + teleport: [-1] // relay only }, // (3) parachains with id, see Rococo (info here maps to the actual "named icon") // diff --git a/packages/apps-config/src/endpoints/types.ts b/packages/apps-config/src/endpoints/types.ts index 6bf648b90d..58dc749bd6 100644 --- a/packages/apps-config/src/endpoints/types.ts +++ b/packages/apps-config/src/endpoints/types.ts @@ -4,7 +4,6 @@ import type { Option } from '../settings/types'; export interface EndpointOption { - allowTeleport?: boolean; dnslink?: string; genesisHash?: string; isChild?: boolean; @@ -14,11 +13,11 @@ export interface EndpointOption { info?: string; paraId?: number; providers: Record; + teleport?: number[]; text: React.ReactNode; } export interface LinkOption extends Option { - allowTeleport?: boolean; dnslink?: string; genesisHash?: string; genesisHashRelay?: string; @@ -28,5 +27,6 @@ export interface LinkOption extends Option { isSpaced?: boolean; linked?: LinkOption[]; paraId?: number; + teleport?: number[]; textBy: string; } diff --git a/packages/apps-config/src/endpoints/util.ts b/packages/apps-config/src/endpoints/util.ts index 18d172a857..ca0f2b361d 100644 --- a/packages/apps-config/src/endpoints/util.ts +++ b/packages/apps-config/src/endpoints/util.ts @@ -21,14 +21,14 @@ export function expandLinked (input: LinkOption[]): LinkOption[] { }, []); } -export function expandEndpoint (t: TFunction, { allowTeleport, dnslink, genesisHash, info, isChild, isDisabled, linked, paraId, providers, text }: EndpointOption): LinkOption[] { +export function expandEndpoint (t: TFunction, { dnslink, genesisHash, info, isChild, isDisabled, linked, paraId, providers, teleport, text }: EndpointOption): LinkOption[] { const base = { - allowTeleport, genesisHash, info, isChild, isDisabled, paraId, + teleport, text }; @@ -47,13 +47,6 @@ export function expandEndpoint (t: TFunction, { allowTeleport, dnslink, genesisH linked.forEach((o) => options.push(...expandEndpoint(t, o))); last.isRelay = true; last.linked = options; - - // if one of the children allows teleport, add it to the root as well - const allowTeleport = options.some(({ allowTeleport }) => allowTeleport); - - result.forEach((r): void => { - r.allowTeleport = allowTeleport; - }); } return expandLinked(result); diff --git a/packages/apps-config/src/links/commonwealth.ts b/packages/apps-config/src/links/commonwealth.ts index 0d9ebe4d69..e89282bcd8 100644 --- a/packages/apps-config/src/links/commonwealth.ts +++ b/packages/apps-config/src/links/commonwealth.ts @@ -1,7 +1,7 @@ // Copyright 2017-2021 @polkadot/apps-config authors & contributors // SPDX-License-Identifier: Apache-2.0 -import BN from 'bn.js'; +import type BN from 'bn.js'; import { externalLogos } from '../ui/logos'; diff --git a/packages/apps-config/src/links/dotscanner.ts b/packages/apps-config/src/links/dotscanner.ts index 657e7dcc4e..e28967c8f5 100644 --- a/packages/apps-config/src/links/dotscanner.ts +++ b/packages/apps-config/src/links/dotscanner.ts @@ -1,7 +1,7 @@ // Copyright 2017-2021 @polkadot/apps-config authors & contributors // SPDX-License-Identifier: Apache-2.0 -import BN from 'bn.js'; +import type BN from 'bn.js'; import { externalLogos } from '../ui/logos'; diff --git a/packages/apps-config/src/links/polkascan.ts b/packages/apps-config/src/links/polkascan.ts index 53a68cc3c0..4d9b54d2c0 100644 --- a/packages/apps-config/src/links/polkascan.ts +++ b/packages/apps-config/src/links/polkascan.ts @@ -1,7 +1,7 @@ // Copyright 2017-2021 @polkadot/apps-config authors & contributors // SPDX-License-Identifier: Apache-2.0 -import BN from 'bn.js'; +import type BN from 'bn.js'; import { externalLogos } from '../ui/logos'; diff --git a/packages/apps-config/src/links/polkassembly.ts b/packages/apps-config/src/links/polkassembly.ts index 155fbdf61f..3c4e92ced0 100644 --- a/packages/apps-config/src/links/polkassembly.ts +++ b/packages/apps-config/src/links/polkassembly.ts @@ -1,7 +1,7 @@ // Copyright 2017-2021 @polkadot/apps-config authors & contributors // SPDX-License-Identifier: Apache-2.0 -import BN from 'bn.js'; +import type BN from 'bn.js'; import { externalLogos } from '../ui/logos'; diff --git a/packages/apps-config/src/links/polkastats.ts b/packages/apps-config/src/links/polkastats.ts index f8da460b24..9bf4349674 100644 --- a/packages/apps-config/src/links/polkastats.ts +++ b/packages/apps-config/src/links/polkastats.ts @@ -1,7 +1,7 @@ // Copyright 2017-2021 @polkadot/apps-config authors & contributors // SPDX-License-Identifier: Apache-2.0 -import BN from 'bn.js'; +import type BN from 'bn.js'; import { externalLogos } from '../ui/logos'; diff --git a/packages/apps-config/src/links/subscan.ts b/packages/apps-config/src/links/subscan.ts index e586bb44b4..8791b6cc76 100644 --- a/packages/apps-config/src/links/subscan.ts +++ b/packages/apps-config/src/links/subscan.ts @@ -1,7 +1,7 @@ // Copyright 2017-2021 @polkadot/apps-config authors & contributors // SPDX-License-Identifier: Apache-2.0 -import BN from 'bn.js'; +import type BN from 'bn.js'; import { externalLogos } from '../ui/logos'; diff --git a/packages/apps-config/src/links/types.ts b/packages/apps-config/src/links/types.ts index 334512c7c4..fed8796bc3 100644 --- a/packages/apps-config/src/links/types.ts +++ b/packages/apps-config/src/links/types.ts @@ -1,7 +1,7 @@ // Copyright 2017-2021 @polkadot/apps-config authors & contributors // SPDX-License-Identifier: Apache-2.0 -import BN from 'bn.js'; +import type BN from 'bn.js'; export type LinkTypes = 'address' | 'block' | 'bounty' | 'council' | 'extrinsic' | 'proposal' | 'referendum' | 'techcomm' | 'tip' | 'treasury'; diff --git a/packages/apps-config/src/packageInfo.ts b/packages/apps-config/src/packageInfo.ts index 44b604e341..4ea9fcbe6c 100644 --- a/packages/apps-config/src/packageInfo.ts +++ b/packages/apps-config/src/packageInfo.ts @@ -3,4 +3,4 @@ // Auto-generated by @polkadot/dev, do not edit -export const packageInfo = { name: '@polkadot/apps-config', version: '0.91.3-68' }; +export const packageInfo = { name: '@polkadot/apps-config', version: '0.91.3-76' }; diff --git a/packages/apps-config/src/ui/colors.ts b/packages/apps-config/src/ui/colors.ts index 8ee943c98b..272c774487 100644 --- a/packages/apps-config/src/ui/colors.ts +++ b/packages/apps-config/src/ui/colors.ts @@ -93,6 +93,7 @@ const nodeEquilibrium = '#1792ff'; const nodeGalital = '#00063F;'; const nodeGamePower = '#5d21a5'; const nodeGeek = '#4f46e5'; +const nodeGenshiro = '#e8662d'; const nodeIpse = '#08a1e8'; const nodeJupiter = '#7143ff'; const nodeKonomi = '#007aff'; @@ -154,6 +155,8 @@ export const chainColors: Record = [ ['Steam PC', chainRococoEave], ['Encointer Canary', nodeEncointerNotee], ['Encointer PC1', nodeEncointerNotee], + ['Equilibrium', nodeEquilibrium], + ['EquilibriumTestnet', nodeGenshiro], ['Galital', chainGalital], ['Galois', chainGalois], ['GamePower Network', chainGamePower], @@ -257,7 +260,6 @@ export const nodeColors: Record = [ ['Encointer Node', nodeEncointerNotee], ['Encointer Node noTEE', nodeEncointerNotee], ['Encointer Node TEE proxy', nodeEncointerTeeproxy], - ['Equilibrium node', nodeEquilibrium], ['Galital', nodeGalital], ['Galital Parachain Collator', nodeGalital], ['GamePower Node', nodeGamePower], diff --git a/packages/apps-config/src/ui/logos/nodes/equilibrium.svg b/packages/apps-config/src/ui/logos/chains/equilibrium.svg similarity index 100% rename from packages/apps-config/src/ui/logos/nodes/equilibrium.svg rename to packages/apps-config/src/ui/logos/chains/equilibrium.svg diff --git a/packages/apps-config/src/ui/logos/chains/genshiro.svg b/packages/apps-config/src/ui/logos/chains/genshiro.svg new file mode 100644 index 0000000000..265188a040 --- /dev/null +++ b/packages/apps-config/src/ui/logos/chains/genshiro.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/packages/apps-config/src/ui/logos/index.ts b/packages/apps-config/src/ui/logos/index.ts index 6ecd6aa60d..5aa2efd3ef 100644 --- a/packages/apps-config/src/ui/logos/index.ts +++ b/packages/apps-config/src/ui/logos/index.ts @@ -7,6 +7,8 @@ // anything for a specific chain, most would probably fit into the node category (but allow for chain-specific) // alphabetical import chainDusty from './chains/dusty.png'; +import chainEquilibrium from './chains/equilibrium.svg'; +import chainGenshiro from './chains/genshiro.svg'; import chainHydrate from './chains/hydrate.png'; import chainKusama from './chains/kusama-128.gif'; import chainPolkaBTC from './chains/polkabtc.png'; @@ -44,7 +46,6 @@ import nodeEave from './nodes/eave.svg'; import nodeEdgeware from './nodes/edgeware-circle.svg'; import nodeEncointerNotee from './nodes/encointer-notee.svg'; import nodeEncointerTeeproxy from './nodes/encointer-teeproxy.svg'; -import nodeEquilibrium from './nodes/equilibrium.svg'; import nodeGalital from './nodes/galital-logo.png'; import nodeGamePower from './nodes/gamepower.svg'; import nodeGeek from './nodes/geek.svg'; @@ -121,6 +122,8 @@ export const chainLogos: Record = [ ['Darwinia PC2', nodeDarwinia], ['DataHighway', nodeDataHighway], ['Dusty', chainDusty], + ['EquilibriumTestnet', chainGenshiro], + ['Equilibrium', chainEquilibrium], ['Steam PC', nodeEave], ['Galital', nodeGalital], ['Galois', nodeMath], @@ -231,8 +234,6 @@ export const nodeLogos: Record = [ ['DOTMog Node', nodeDotMog], ['Eave Node', nodeEave], ['Edgeware Node', nodeEdgeware], - ['Equilibrium Node', nodeEquilibrium], - ['Equilibrium', nodeEquilibrium], ['IpseTestnet', nodeIpse], ['Encointer Node', nodeEncointerNotee], ['Encointer Node noTEE', nodeEncointerNotee], @@ -360,11 +361,12 @@ export const namedLogos: Record = { encointer_canary: nodeEncointerNotee, encointer_cantillon: nodeEncointerTeeproxy, encointer_gesell: nodeEncointerNotee, - equilibrium: nodeEquilibrium, + equilibrium: chainEquilibrium, galital: nodeGalital, galois: nodeMath, gamepower: nodeGamePower, geek: nodeGeek, + genshiro: chainGenshiro, halongbay: nodePolkaFoundry, hanonycash: nodeHanonycash, idavoll: nodeIdavoll, @@ -413,7 +415,6 @@ export const namedLogos: Record = { rococoDataHighway: nodeDataHighway, rococoEave: nodeEave, rococoEncointer: nodeEncointerNotee, - rococoEquilibrium: nodeEquilibrium, rococoGalital: nodeGalital, rococoHydrate: chainHydrate, rococoIdavoll: nodeIdavoll, diff --git a/packages/apps-electron/package.json b/packages/apps-electron/package.json index 8221bf5476..9bdca79d2e 100644 --- a/packages/apps-electron/package.json +++ b/packages/apps-electron/package.json @@ -2,13 +2,13 @@ "name": "@polkadot/apps-electron", "private": true, "type": "module", - "version": "0.91.3-68", + "version": "0.91.3-76", "license": "Apache-2.0", "dependencies": { "@babel/core": "^7.14.3", "@babel/polyfill": "^7.12.1", - "@polkadot/dev": "^0.62.29", - "@polkadot/react-components": "^0.91.3-68", + "@polkadot/dev": "^0.62.30", + "@polkadot/react-components": "^0.91.3-76", "electron-log": "^4.3.5", "electron-updater": "^4.3.9" }, diff --git a/packages/apps-routing/package.json b/packages/apps-routing/package.json index 41df54ab96..863a399790 100644 --- a/packages/apps-routing/package.json +++ b/packages/apps-routing/package.json @@ -2,7 +2,7 @@ "name": "@polkadot/apps-routing", "private": true, "type": "module", - "version": "0.91.3-68", + "version": "0.91.3-76", "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.14.0" diff --git a/packages/apps/package.json b/packages/apps/package.json index 7d9dd62d39..d77aff5680 100644 --- a/packages/apps/package.json +++ b/packages/apps/package.json @@ -2,22 +2,22 @@ "name": "@polkadot/apps", "private": true, "type": "module", - "version": "0.91.3-68", + "version": "0.91.3-76", "license": "Apache-2.0", "homepage": ".", "dependencies": { "@babel/core": "^7.14.3", "@babel/polyfill": "^7.12.1", "@babel/runtime": "^7.14.0", - "@polkadot/apps-config": "^0.91.3-68", - "@polkadot/apps-routing": "^0.91.3-68", - "@polkadot/dev": "^0.62.29", - "@polkadot/react-api": "^0.91.3-68", - "@polkadot/react-components": "^0.91.3-68", - "@polkadot/react-hooks": "^0.91.3-68", - "@polkadot/react-params": "^0.91.3-68", - "@polkadot/react-query": "^0.91.3-68", - "@polkadot/react-signer": "^0.91.3-68", + "@polkadot/apps-config": "^0.91.3-76", + "@polkadot/apps-routing": "^0.91.3-76", + "@polkadot/dev": "^0.62.30", + "@polkadot/react-api": "^0.91.3-76", + "@polkadot/react-components": "^0.91.3-76", + "@polkadot/react-hooks": "^0.91.3-76", + "@polkadot/react-params": "^0.91.3-76", + "@polkadot/react-query": "^0.91.3-76", + "@polkadot/react-signer": "^0.91.3-76", "punycode": "^2.1.1", "query-string": "^7.0.0" }, diff --git a/packages/apps/src/packageInfo.ts b/packages/apps/src/packageInfo.ts index 6020ae46fb..71d97690c8 100644 --- a/packages/apps/src/packageInfo.ts +++ b/packages/apps/src/packageInfo.ts @@ -3,4 +3,4 @@ // Auto-generated by @polkadot/dev, do not edit -export const packageInfo = { name: '@polkadot/apps', version: '0.91.3-68' }; +export const packageInfo = { name: '@polkadot/apps', version: '0.91.3-76' }; diff --git a/packages/page-accounts/package.json b/packages/page-accounts/package.json index 62270d939a..0b9e7481c4 100644 --- a/packages/page-accounts/package.json +++ b/packages/page-accounts/package.json @@ -2,17 +2,17 @@ "name": "@polkadot/app-accounts", "private": true, "type": "module", - "version": "0.91.3-68", + "version": "0.91.3-76", "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.14.0", - "@polkadot/phishing": "^0.6.174", - "@polkadot/react-components": "^0.91.3-68", - "@polkadot/vanitygen": "^0.36.2-5", + "@polkadot/phishing": "^0.6.175", + "@polkadot/react-components": "^0.91.3-76", + "@polkadot/vanitygen": "^0.36.2-6", "detect-browser": "^5.2.0", "file-saver": "^2.0.5" }, "devDependencies": { - "@polkadot/test-support": "0.91.3-68" + "@polkadot/test-support": "0.91.3-76" } } diff --git a/packages/page-accounts/src/Accounts/Account.tsx b/packages/page-accounts/src/Accounts/Account.tsx index e8e2982c49..7772ef565c 100644 --- a/packages/page-accounts/src/Accounts/Account.tsx +++ b/packages/page-accounts/src/Accounts/Account.tsx @@ -1,6 +1,7 @@ // Copyright 2017-2021 @polkadot/app-accounts authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { SubmittableExtrinsic } from '@polkadot/api/types'; import type { DeriveBalancesAll, DeriveDemocracyLock } from '@polkadot/api-derive/types'; import type { Ledger } from '@polkadot/hw-ledger'; @@ -11,7 +12,6 @@ import type { ProxyDefinition, RecoveryConfig } from '@polkadot/types/interfaces import type { KeyringAddress, KeyringJson$Meta } from '@polkadot/ui-keyring/types'; import type { Delegation } from '../types'; -import BN from 'bn.js'; import React, { useCallback, useContext, useEffect, useMemo, useState } from 'react'; import styled, { ThemeContext } from 'styled-components'; diff --git a/packages/page-accounts/src/Accounts/index.tsx b/packages/page-accounts/src/Accounts/index.tsx index f378484af4..cf454cb743 100644 --- a/packages/page-accounts/src/Accounts/index.tsx +++ b/packages/page-accounts/src/Accounts/index.tsx @@ -1,11 +1,11 @@ // Copyright 2017-2021 @polkadot/app-accounts authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { ActionStatus } from '@polkadot/react-components/Status/types'; import type { AccountId, ProxyDefinition, ProxyType, Voting } from '@polkadot/types/interfaces'; import type { Delegation, SortedAccount } from '../types'; -import BN from 'bn.js'; import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'; import styled from 'styled-components'; diff --git a/packages/page-accounts/src/Accounts/useProxies.ts b/packages/page-accounts/src/Accounts/useProxies.ts index 4afad5608f..cce6670237 100644 --- a/packages/page-accounts/src/Accounts/useProxies.ts +++ b/packages/page-accounts/src/Accounts/useProxies.ts @@ -1,11 +1,11 @@ // Copyright 2017-2021 @polkadot/app-accounts authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { Vec } from '@polkadot/types'; import type { AccountId, BalanceOf, ProxyDefinition, ProxyType } from '@polkadot/types/interfaces'; import type { ITuple } from '@polkadot/types/types'; -import BN from 'bn.js'; import { useEffect, useState } from 'react'; import { useAccounts, useApi, useIsMountedRef } from '@polkadot/react-hooks'; diff --git a/packages/page-accounts/src/modals/Delegate.tsx b/packages/page-accounts/src/modals/Delegate.tsx index 5123a70803..711744f266 100644 --- a/packages/page-accounts/src/modals/Delegate.tsx +++ b/packages/page-accounts/src/modals/Delegate.tsx @@ -1,10 +1,10 @@ // Copyright 2017-2021 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { Conviction } from '@polkadot/types/interfaces'; import type { AmountValidateState } from '../Accounts/types'; -import BN from 'bn.js'; import React, { useState } from 'react'; import { ConvictionDropdown, InputAddress, InputBalance, Modal, TxButton } from '@polkadot/react-components'; diff --git a/packages/page-accounts/src/modals/InputValidateAmount.tsx b/packages/page-accounts/src/modals/InputValidateAmount.tsx index 752735fbc8..19063d885e 100644 --- a/packages/page-accounts/src/modals/InputValidateAmount.tsx +++ b/packages/page-accounts/src/modals/InputValidateAmount.tsx @@ -1,10 +1,10 @@ // Copyright 2017-2021 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { DeriveBalancesAll } from '@polkadot/api-derive/types'; import type { AmountValidateState } from '../Accounts/types'; -import BN from 'bn.js'; import React, { useEffect, useState } from 'react'; import { MarkError, MarkWarning } from '@polkadot/react-components'; diff --git a/packages/page-accounts/src/modals/MultisigApprove.tsx b/packages/page-accounts/src/modals/MultisigApprove.tsx index bdd8d03ebc..0d6c1b5348 100644 --- a/packages/page-accounts/src/modals/MultisigApprove.tsx +++ b/packages/page-accounts/src/modals/MultisigApprove.tsx @@ -3,11 +3,12 @@ import type { SubmittableExtrinsic } from '@polkadot/api/types'; import type { AccountId, Call, H256, Multisig } from '@polkadot/types/interfaces'; +import type { CallFunction } from '@polkadot/types/types'; -import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'; +import React, { useEffect, useMemo, useRef, useState } from 'react'; import styled from 'styled-components'; -import { AddressMini, Dropdown, Expander, Input, InputAddress, MarkError, Modal, Toggle, TxButton } from '@polkadot/react-components'; +import { AddressMini, Call as CallDisplay, Dropdown, Expander, Input, InputAddress, MarkError, Modal, Toggle, TxButton } from '@polkadot/react-components'; import { useAccounts, useApi, useWeight } from '@polkadot/react-hooks'; import { assert, isHex } from '@polkadot/util'; @@ -35,15 +36,21 @@ interface Option { interface CallData { callData: Call | null; callError: string | null; + callInfo: CallFunction | null; } -const EMPTY_CALL: CallData = { callData: null, callError: null }; +const EMPTY_CALL: CallData = { + callData: null, + callError: null, + callInfo: null +}; function MultisigApprove ({ className = '', onClose, ongoing, threshold, who }: Props): React.ReactElement { const { t } = useTranslation(); const { api } = useApi(); const { allAccounts } = useAccounts(); - const [{ callData, callError }, setCallData] = useState(EMPTY_CALL); + const [callHex, setCallHex] = useState(''); + const [{ callData, callError, callInfo }, setCallData] = useState(EMPTY_CALL); const [callWeight] = useWeight(callData); const [hash, setHash] = useState(ongoing[0][0].toHex()); const [{ isMultiCall, multisig }, setMultisig] = useState({ isMultiCall: false, multisig: null }); @@ -101,6 +108,27 @@ function MultisigApprove ({ className = '', onClose, ongoing, threshold, who }: ); }, [api, allAccounts, multisig, threshold, type, who]); + // when the hex changes, re-evaluate + useEffect((): void => { + if (callHex) { + try { + assert(isHex(callHex), 'Hex call data required'); + + const callData = api.createType('Call', callHex); + + assert(callData.hash.eq(hash), 'Call data does not match the existing call hash'); + + const callInfo = api.registry.findMetaCall(callData.callIndex); + + setCallData({ callData, callError: null, callInfo }); + } catch (error) { + setCallData({ callData: null, callError: (error as Error).message, callInfo: null }); + } + } else { + setCallData(EMPTY_CALL); + } + }, [api, callHex, hash]); + // based on the type, multisig, others create the tx. This can be either an approval or final call useEffect((): void => { const multiMod = api.tx.multisig || api.tx.utility; @@ -126,24 +154,6 @@ function MultisigApprove ({ className = '', onClose, ongoing, threshold, who }: ); }, [api, callData, callWeight, hash, isCallOverride, isMultiCall, others, multisig, threshold, type]); - // when the actual call input changes, create a call and set it - const _setCallData = useCallback( - (callHex: string): void => { - try { - assert(isHex(callHex), 'Hex call data required'); - - const callData = api.createType('Call', callHex); - - assert(callData.hash.eq(hash), 'Call data does not match the existing call hash'); - - setCallData({ callData, callError: null }); - } catch (error) { - setCallData({ callData: null, callError: (error as Error).message }); - } - }, - [api, hash] - ); - const isAye = type === 'aye'; return ( @@ -217,13 +227,28 @@ function MultisigApprove ({ className = '', onClose, ongoing, threshold, who }: <> {isCallOverride && ( - + {callData && callInfo + ? ( + + + + ) + : ( + + )} {callError && ( )} diff --git a/packages/page-accounts/src/modals/ProxyOverview.tsx b/packages/page-accounts/src/modals/ProxyOverview.tsx index 4fc20a0191..e775830dc1 100644 --- a/packages/page-accounts/src/modals/ProxyOverview.tsx +++ b/packages/page-accounts/src/modals/ProxyOverview.tsx @@ -1,11 +1,11 @@ // Copyright 2017-2021 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { ApiPromise } from '@polkadot/api'; import type { SubmittableExtrinsic } from '@polkadot/api/types'; import type { AccountId, ProxyDefinition, ProxyType } from '@polkadot/types/interfaces'; -import BN from 'bn.js'; import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'; import styled from 'styled-components'; diff --git a/packages/page-accounts/src/modals/RecoverSetup.tsx b/packages/page-accounts/src/modals/RecoverSetup.tsx index 78da262d49..0cf4bcd0c6 100644 --- a/packages/page-accounts/src/modals/RecoverSetup.tsx +++ b/packages/page-accounts/src/modals/RecoverSetup.tsx @@ -1,7 +1,8 @@ // Copyright 2017-2021 @polkadot/app-accounts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import BN from 'bn.js'; +import type BN from 'bn.js'; + import React, { useState } from 'react'; import { InputAddress, InputAddressMulti, InputNumber, Modal, TxButton } from '@polkadot/react-components'; diff --git a/packages/page-accounts/src/modals/Transfer.tsx b/packages/page-accounts/src/modals/Transfer.tsx index f36652184b..8a96471496 100644 --- a/packages/page-accounts/src/modals/Transfer.tsx +++ b/packages/page-accounts/src/modals/Transfer.tsx @@ -1,10 +1,10 @@ // Copyright 2017-2021 @polkadot/app-accounts authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { DeriveBalancesAll } from '@polkadot/api-derive/types'; import type { AccountInfoWithProviders, AccountInfoWithRefCount } from '@polkadot/types/interfaces'; -import BN from 'bn.js'; import React, { useEffect, useState } from 'react'; import styled from 'styled-components'; diff --git a/packages/page-addresses/package.json b/packages/page-addresses/package.json index 74ae897c89..65c832cf48 100644 --- a/packages/page-addresses/package.json +++ b/packages/page-addresses/package.json @@ -2,11 +2,11 @@ "name": "@polkadot/app-addresses", "private": true, "type": "module", - "version": "0.91.3-68", + "version": "0.91.3-76", "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.14.0", - "@polkadot/react-components": "^0.91.3-68", + "@polkadot/react-components": "^0.91.3-76", "file-saver": "^2.0.5" }, "devDependencies": { diff --git a/packages/page-assets/package.json b/packages/page-assets/package.json index 19829fa993..a835595a00 100644 --- a/packages/page-assets/package.json +++ b/packages/page-assets/package.json @@ -2,10 +2,10 @@ "name": "@polkadot/app-assets", "private": true, "type": "module", - "version": "0.91.3-68", + "version": "0.91.3-76", "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.14.0", - "@polkadot/react-components": "^0.91.3-68" + "@polkadot/react-components": "^0.91.3-76" } } diff --git a/packages/page-bounties/package.json b/packages/page-bounties/package.json index b026b06024..fe0c1d5a73 100644 --- a/packages/page-bounties/package.json +++ b/packages/page-bounties/package.json @@ -2,13 +2,13 @@ "name": "@polkadot/app-bounties", "private": true, "type": "module", - "version": "0.91.3-68", + "version": "0.91.3-76", "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.14.0", - "@polkadot/react-components": "^0.91.3-68" + "@polkadot/react-components": "^0.91.3-76" }, "devDependencies": { - "@polkadot/test-support": "0.91.3-68" + "@polkadot/test-support": "0.91.3-76" } } diff --git a/packages/page-bounties/src/BountyActions/BountyAcceptCurator.tsx b/packages/page-bounties/src/BountyActions/BountyAcceptCurator.tsx index 29451a37c8..da6d922b48 100644 --- a/packages/page-bounties/src/BountyActions/BountyAcceptCurator.tsx +++ b/packages/page-bounties/src/BountyActions/BountyAcceptCurator.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2021 @polkadot/app-bounties authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { AccountId, BountyIndex } from '@polkadot/types/interfaces'; -import BN from 'bn.js'; import React, { useMemo } from 'react'; import { Button, InputAddress, InputBalance, Modal, TxButton } from '@polkadot/react-components'; diff --git a/packages/page-bounties/src/BountyActions/BountyClaimAction.tsx b/packages/page-bounties/src/BountyActions/BountyClaimAction.tsx index 84f8e5cfc4..1cfe2a14dd 100644 --- a/packages/page-bounties/src/BountyActions/BountyClaimAction.tsx +++ b/packages/page-bounties/src/BountyActions/BountyClaimAction.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2021 @polkadot/app-bounties authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { AccountId, BountyIndex } from '@polkadot/types/interfaces'; -import BN from 'bn.js'; import React, { useMemo } from 'react'; import { useBounties } from '@polkadot/app-bounties/hooks'; diff --git a/packages/page-bounties/src/BountyActions/index.tsx b/packages/page-bounties/src/BountyActions/index.tsx index dfbd744e61..ecf9819e05 100644 --- a/packages/page-bounties/src/BountyActions/index.tsx +++ b/packages/page-bounties/src/BountyActions/index.tsx @@ -1,10 +1,10 @@ // Copyright 2017-2021 @polkadot/app-bounties authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { DeriveCollectiveProposal } from '@polkadot/api-derive/types'; import type { Balance, BlockNumber, BountyIndex, BountyStatus } from '@polkadot/types/interfaces'; -import BN from 'bn.js'; import React, { useMemo } from 'react'; import { useBountyStatus } from '../hooks'; diff --git a/packages/page-bounties/src/BountyCreate.tsx b/packages/page-bounties/src/BountyCreate.tsx index 99926ea6aa..fd077a0254 100644 --- a/packages/page-bounties/src/BountyCreate.tsx +++ b/packages/page-bounties/src/BountyCreate.tsx @@ -1,7 +1,8 @@ // Copyright 2017-2021 @polkadot/app-bounties authors & contributors // SPDX-License-Identifier: Apache-2.0 -import BN from 'bn.js'; +import type BN from 'bn.js'; + import React, { useCallback, useEffect, useState } from 'react'; import { useBalance, useBounties } from '@polkadot/app-bounties/hooks'; diff --git a/packages/page-bounties/src/DueBlocks.tsx b/packages/page-bounties/src/DueBlocks.tsx index c6ab6ad902..b95764a171 100644 --- a/packages/page-bounties/src/DueBlocks.tsx +++ b/packages/page-bounties/src/DueBlocks.tsx @@ -1,7 +1,8 @@ // Copyright 2017-2021 @polkadot/app-bounties authors & contributors // SPDX-License-Identifier: Apache-2.0 -import BN from 'bn.js'; +import type BN from 'bn.js'; + import React from 'react'; import { BlockToTime } from '@polkadot/react-query'; diff --git a/packages/page-bounties/src/helpers/calculateBountyBond.ts b/packages/page-bounties/src/helpers/calculateBountyBond.ts index c43939f087..66d7e5870e 100644 --- a/packages/page-bounties/src/helpers/calculateBountyBond.ts +++ b/packages/page-bounties/src/helpers/calculateBountyBond.ts @@ -1,7 +1,7 @@ // Copyright 2017-2021 @polkadot/app-bounties authors & contributors // SPDX-License-Identifier: Apache-2.0 -import BN from 'bn.js'; +import type BN from 'bn.js'; export function calculateBountyBond (description: string, depositBase: BN, depositPerByte: BN): BN { return depositBase.add(depositPerByte.muln(countUtf8Bytes(description))); diff --git a/packages/page-bounties/src/helpers/determineUnassignCuratorAction.ts b/packages/page-bounties/src/helpers/determineUnassignCuratorAction.ts index 151b8f0919..7b51f8ffe6 100644 --- a/packages/page-bounties/src/helpers/determineUnassignCuratorAction.ts +++ b/packages/page-bounties/src/helpers/determineUnassignCuratorAction.ts @@ -1,10 +1,9 @@ // Copyright 2017-2021 @polkadot/app-bounties authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { BountyStatus } from '@polkadot/types/interfaces'; -import BN from 'bn.js'; - import { BN_ZERO } from '@polkadot/util'; import { UserRole, ValidUnassignCuratorAction } from '../types'; diff --git a/packages/page-bounties/src/helpers/increaseDateByBlocks.ts b/packages/page-bounties/src/helpers/increaseDateByBlocks.ts index a1b4c04581..0d2921c747 100644 --- a/packages/page-bounties/src/helpers/increaseDateByBlocks.ts +++ b/packages/page-bounties/src/helpers/increaseDateByBlocks.ts @@ -1,7 +1,7 @@ // Copyright 2017-2021 @polkadot/app-treasury authors & contributors // SPDX-License-Identifier: Apache-2.0 -import BN from 'bn.js'; +import type BN from 'bn.js'; export function increaseDateByBlocks (blocks: BN, blockTime: number): Date { return new Date(Date.now() + blocks.muln(blockTime).toNumber()); diff --git a/packages/page-bounties/src/helpers/isClaimable.ts b/packages/page-bounties/src/helpers/isClaimable.ts index 335f4df861..1d4bd4f0e5 100644 --- a/packages/page-bounties/src/helpers/isClaimable.ts +++ b/packages/page-bounties/src/helpers/isClaimable.ts @@ -1,10 +1,9 @@ // Copyright 2017-2021 @polkadot/app-bounties authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { AccountId } from '@polkadot/types/interfaces'; -import BN from 'bn.js'; - export function isClaimable (accounts: string[], beneficiary: AccountId, payoutDue: BN): boolean { return payoutDue.ltn(0) && accounts.includes(beneficiary.toString()); } diff --git a/packages/page-bounties/src/helpers/permillOf.ts b/packages/page-bounties/src/helpers/permillOf.ts index ff1db95bf3..0dda91b87f 100644 --- a/packages/page-bounties/src/helpers/permillOf.ts +++ b/packages/page-bounties/src/helpers/permillOf.ts @@ -1,7 +1,7 @@ // Copyright 2017-2021 @polkadot/app-bounties authors & contributors // SPDX-License-Identifier: Apache-2.0 -import BN from 'bn.js'; +import type BN from 'bn.js'; import { BN_MILLION } from '@polkadot/util'; diff --git a/packages/page-bounties/src/hooks/useBounties.tsx b/packages/page-bounties/src/hooks/useBounties.tsx index 3f689b49f6..dee9dc39de 100644 --- a/packages/page-bounties/src/hooks/useBounties.tsx +++ b/packages/page-bounties/src/hooks/useBounties.tsx @@ -1,10 +1,9 @@ // Copyright 2017-2021 @polkadot/app-bounties authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { SubmittableExtrinsic } from '@polkadot/api/types'; -import BN from 'bn.js'; - import { DeriveBounties } from '@polkadot/api-derive/types'; import { useApi, useBestNumber, useCall } from '@polkadot/react-hooks'; import { BalanceOf, BlockNumber, BountyIndex } from '@polkadot/types/interfaces'; diff --git a/packages/page-calendar/package.json b/packages/page-calendar/package.json index 39c31330cf..95d581e3eb 100644 --- a/packages/page-calendar/package.json +++ b/packages/page-calendar/package.json @@ -2,10 +2,10 @@ "name": "@polkadot/app-calendar", "private": true, "type": "module", - "version": "0.91.3-68", + "version": "0.91.3-76", "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.14.0", - "@polkadot/react-components": "^0.91.3-68" + "@polkadot/react-components": "^0.91.3-76" } } diff --git a/packages/page-claims/package.json b/packages/page-claims/package.json index 2a205d027d..02fba726c8 100644 --- a/packages/page-claims/package.json +++ b/packages/page-claims/package.json @@ -2,11 +2,11 @@ "name": "@polkadot/app-claims", "private": true, "type": "module", - "version": "0.91.3-68", + "version": "0.91.3-76", "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.14.0", - "@polkadot/react-components": "^0.91.3-68", + "@polkadot/react-components": "^0.91.3-76", "secp256k1": "^3.8.0" } } diff --git a/packages/page-contracts/package.json b/packages/page-contracts/package.json index bb82ef54ac..15367701ab 100644 --- a/packages/page-contracts/package.json +++ b/packages/page-contracts/package.json @@ -2,10 +2,10 @@ "name": "@polkadot/app-contracts", "private": true, "type": "module", - "version": "0.91.3-68", + "version": "0.91.3-76", "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.14.0", - "@polkadot/api-contract": "^4.12.2-8" + "@polkadot/api-contract": "^4.12.2-11" } } diff --git a/packages/page-contracts/src/Contracts/Summary.tsx b/packages/page-contracts/src/Contracts/Summary.tsx index 3d730b078d..ec5ab57f3c 100644 --- a/packages/page-contracts/src/Contracts/Summary.tsx +++ b/packages/page-contracts/src/Contracts/Summary.tsx @@ -1,7 +1,8 @@ // Copyright 2017-2021 @polkadot/app-contracts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import BN from 'bn.js'; +import type BN from 'bn.js'; + import React, { useEffect, useState } from 'react'; import { CardSummary, SummaryBox } from '@polkadot/react-components'; diff --git a/packages/page-contracts/src/shared/InputMegaGas.tsx b/packages/page-contracts/src/shared/InputMegaGas.tsx index a5059c2c86..2a7ed8b978 100644 --- a/packages/page-contracts/src/shared/InputMegaGas.tsx +++ b/packages/page-contracts/src/shared/InputMegaGas.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2021 @polkadot/app-contracts authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { UseWeight } from '../types'; -import BN from 'bn.js'; import React, { useEffect, useMemo, useState } from 'react'; import styled from 'styled-components'; diff --git a/packages/page-contracts/src/types.ts b/packages/page-contracts/src/types.ts index a1d014982a..99b908c1d9 100644 --- a/packages/page-contracts/src/types.ts +++ b/packages/page-contracts/src/types.ts @@ -1,9 +1,8 @@ // Copyright 2017-2021 @polkadot/app-contracts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import BN from 'bn.js'; - -import { Abi } from '@polkadot/api-contract'; +import type BN from 'bn.js'; +import type { Abi } from '@polkadot/api-contract'; export interface CodeJson { abi?: string | null; diff --git a/packages/page-contracts/src/useWeight.ts b/packages/page-contracts/src/useWeight.ts index e4637f4895..a4823fa380 100644 --- a/packages/page-contracts/src/useWeight.ts +++ b/packages/page-contracts/src/useWeight.ts @@ -1,10 +1,10 @@ // Copyright 2017-2021 @polkadot/react-hooks authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { Weight } from '@polkadot/types/interfaces'; import type { UseWeight } from './types'; -import BN from 'bn.js'; import { useCallback, useMemo, useState } from 'react'; import { useApi, useBlockTime } from '@polkadot/react-hooks'; diff --git a/packages/page-council/package.json b/packages/page-council/package.json index 164989113a..05d8c140d5 100644 --- a/packages/page-council/package.json +++ b/packages/page-council/package.json @@ -2,11 +2,11 @@ "name": "@polkadot/app-council", "private": true, "type": "module", - "version": "0.91.3-68", + "version": "0.91.3-76", "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.14.0", - "@polkadot/react-components": "^0.91.3-68", - "@polkadot/react-query": "^0.91.3-68" + "@polkadot/react-components": "^0.91.3-76", + "@polkadot/react-query": "^0.91.3-76" } } diff --git a/packages/page-council/src/Overview/types.ts b/packages/page-council/src/Overview/types.ts index 944322332e..3b01c59526 100644 --- a/packages/page-council/src/Overview/types.ts +++ b/packages/page-council/src/Overview/types.ts @@ -1,11 +1,10 @@ // Copyright 2017-2021 @polkadot/app-democracy authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { DeriveElectionsInfo } from '@polkadot/api-derive/types'; import type { SetIndex } from '@polkadot/types/interfaces'; -import BN from 'bn.js'; - export interface ComponentProps { electionsInfo?: DeriveElectionsInfo; } diff --git a/packages/page-democracy/package.json b/packages/page-democracy/package.json index b8090c25f5..7db8637d87 100644 --- a/packages/page-democracy/package.json +++ b/packages/page-democracy/package.json @@ -2,11 +2,11 @@ "name": "@polkadot/app-democracy", "private": true, "type": "module", - "version": "0.91.3-68", + "version": "0.91.3-76", "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.14.0", - "@polkadot/react-components": "^0.91.3-68", - "@polkadot/react-query": "^0.91.3-68" + "@polkadot/react-components": "^0.91.3-76", + "@polkadot/react-query": "^0.91.3-76" } } diff --git a/packages/page-democracy/src/Overview/Propose.tsx b/packages/page-democracy/src/Overview/Propose.tsx index 2ece7a32fb..88536b3b7b 100644 --- a/packages/page-democracy/src/Overview/Propose.tsx +++ b/packages/page-democracy/src/Overview/Propose.tsx @@ -1,7 +1,8 @@ // Copyright 2017-2021 @polkadot/app-democracy authors & contributors // SPDX-License-Identifier: Apache-2.0 -import BN from 'bn.js'; +import type BN from 'bn.js'; + import React, { useCallback, useState } from 'react'; import { Input, InputAddress, InputBalance, Modal, TxButton } from '@polkadot/react-components'; diff --git a/packages/page-democracy/src/Overview/ReferendumVotes.tsx b/packages/page-democracy/src/Overview/ReferendumVotes.tsx index 17f24133a1..114c0e3c8a 100644 --- a/packages/page-democracy/src/Overview/ReferendumVotes.tsx +++ b/packages/page-democracy/src/Overview/ReferendumVotes.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2021 @polkadot/app-democracy authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { DeriveReferendumVote } from '@polkadot/api-derive/types'; -import BN from 'bn.js'; import React, { useMemo } from 'react'; import { Expander } from '@polkadot/react-components'; diff --git a/packages/page-democracy/src/Overview/Seconding.tsx b/packages/page-democracy/src/Overview/Seconding.tsx index 0c1c6ca3f1..dc849e6695 100644 --- a/packages/page-democracy/src/Overview/Seconding.tsx +++ b/packages/page-democracy/src/Overview/Seconding.tsx @@ -1,10 +1,10 @@ // Copyright 2017-2021 @polkadot/app-democracy authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { DeriveProposalImage } from '@polkadot/api-derive/types'; import type { AccountId, Balance } from '@polkadot/types/interfaces'; -import BN from 'bn.js'; import React, { useState } from 'react'; import { Button, InputAddress, InputBalance, Modal, ProposedAction, TxButton } from '@polkadot/react-components'; diff --git a/packages/page-democracy/src/Overview/Summary.tsx b/packages/page-democracy/src/Overview/Summary.tsx index 93709fbad3..66d776dc14 100644 --- a/packages/page-democracy/src/Overview/Summary.tsx +++ b/packages/page-democracy/src/Overview/Summary.tsx @@ -1,7 +1,8 @@ // Copyright 2017-2021 @polkadot/app-democracy authors & contributors // SPDX-License-Identifier: Apache-2.0 -import BN from 'bn.js'; +import type BN from 'bn.js'; + import React from 'react'; import { CardSummary, SummaryBox } from '@polkadot/react-components'; diff --git a/packages/page-democracy/src/Overview/Voting.tsx b/packages/page-democracy/src/Overview/Voting.tsx index 2583b4a80f..9bcfe2dcb3 100644 --- a/packages/page-democracy/src/Overview/Voting.tsx +++ b/packages/page-democracy/src/Overview/Voting.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2021 @polkadot/app-democracy authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { PropIndex, Proposal } from '@polkadot/types/interfaces'; -import BN from 'bn.js'; import React, { useMemo, useState } from 'react'; import { Button, ConvictionDropdown, Modal, ProposedAction, TxButton, VoteAccount, VoteValue } from '@polkadot/react-components'; diff --git a/packages/page-democracy/src/useChangeCalc.ts b/packages/page-democracy/src/useChangeCalc.ts index 2b5d122796..df7830c9e9 100644 --- a/packages/page-democracy/src/useChangeCalc.ts +++ b/packages/page-democracy/src/useChangeCalc.ts @@ -1,9 +1,9 @@ // Copyright 2017-2021 @polkadot/app-democracy authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { VoteThreshold } from '@polkadot/types/interfaces'; -import BN from 'bn.js'; import { useEffect, useState } from 'react'; import { useApi, useCall } from '@polkadot/react-hooks'; diff --git a/packages/page-explorer/package.json b/packages/page-explorer/package.json index d67e04f034..29e944fabc 100644 --- a/packages/page-explorer/package.json +++ b/packages/page-explorer/package.json @@ -2,10 +2,10 @@ "name": "@polkadot/app-explorer", "private": true, "type": "module", - "version": "0.91.3-68", + "version": "0.91.3-76", "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.14.0", - "@polkadot/react-components": "^0.91.3-68" + "@polkadot/react-components": "^0.91.3-76" } } diff --git a/packages/page-extrinsics/package.json b/packages/page-extrinsics/package.json index 073c28aee9..25cf6ffb91 100644 --- a/packages/page-extrinsics/package.json +++ b/packages/page-extrinsics/package.json @@ -2,12 +2,12 @@ "name": "@polkadot/app-extrinsics", "private": true, "type": "module", - "version": "0.91.3-68", + "version": "0.91.3-76", "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.14.0", - "@polkadot/react-components": "^0.91.3-68", - "@polkadot/react-params": "^0.91.3-68", - "@polkadot/react-signer": "^0.91.3-68" + "@polkadot/react-components": "^0.91.3-76", + "@polkadot/react-params": "^0.91.3-76", + "@polkadot/react-signer": "^0.91.3-76" } } diff --git a/packages/page-gilt/package.json b/packages/page-gilt/package.json index e44d7503cb..5873df091b 100644 --- a/packages/page-gilt/package.json +++ b/packages/page-gilt/package.json @@ -2,10 +2,10 @@ "name": "@polkadot/app-gilt", "private": true, "type": "module", - "version": "0.91.3-68", + "version": "0.91.3-76", "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.14.0", - "@polkadot/react-components": "^0.91.3-68" + "@polkadot/react-components": "^0.91.3-76" } } diff --git a/packages/page-js/package.json b/packages/page-js/package.json index adc709ec27..f587b6307f 100644 --- a/packages/page-js/package.json +++ b/packages/page-js/package.json @@ -2,10 +2,10 @@ "name": "@polkadot/app-js", "private": true, "type": "module", - "version": "0.91.3-68", + "version": "0.91.3-76", "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.14.0", - "@polkadot/react-components": "^0.91.3-68" + "@polkadot/react-components": "^0.91.3-76" } } diff --git a/packages/page-membership/package.json b/packages/page-membership/package.json index b961209d04..b828ae6970 100644 --- a/packages/page-membership/package.json +++ b/packages/page-membership/package.json @@ -2,11 +2,11 @@ "name": "@polkadot/app-membership", "private": true, "type": "module", - "version": "0.91.3-68", + "version": "0.91.3-76", "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.14.0", - "@polkadot/react-components": "^0.91.3-68", - "@polkadot/react-query": "^0.91.3-68" + "@polkadot/react-components": "^0.91.3-76", + "@polkadot/react-query": "^0.91.3-76" } } diff --git a/packages/page-parachains/package.json b/packages/page-parachains/package.json index 30f856a703..3cb20bc6a9 100644 --- a/packages/page-parachains/package.json +++ b/packages/page-parachains/package.json @@ -2,11 +2,11 @@ "name": "@polkadot/app-parachains", "private": true, "type": "module", - "version": "0.91.3-68", + "version": "0.91.3-76", "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.14.0", - "@polkadot/react-components": "^0.91.3-68", - "@polkadot/react-query": "^0.91.3-68" + "@polkadot/react-components": "^0.91.3-76", + "@polkadot/react-query": "^0.91.3-76" } } diff --git a/packages/page-parachains/src/Overview/Parachains.tsx b/packages/page-parachains/src/Overview/Parachains.tsx index e42578c7df..4864a6f64c 100644 --- a/packages/page-parachains/src/Overview/Parachains.tsx +++ b/packages/page-parachains/src/Overview/Parachains.tsx @@ -1,6 +1,7 @@ // Copyright 2017-2021 @polkadot/app-parachains authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { ApiPromise } from '@polkadot/api'; import type { SignedBlockExtended } from '@polkadot/api-derive/types'; import type { AccountId, CandidateReceipt, CoreAssignment, Event, GroupIndex, ParaId, ParaValidatorIndex } from '@polkadot/types/interfaces'; @@ -8,7 +9,6 @@ import type { IEvent } from '@polkadot/types/types'; import type { LeasePeriod, QueuedAction, ScheduledProposals } from '../types'; import type { EventMapInfo, ValidatorInfo } from './types'; -import BN from 'bn.js'; import React, { useEffect, useMemo, useRef, useState } from 'react'; import { Table } from '@polkadot/react-components'; diff --git a/packages/page-parachains/src/Overview/Periods.tsx b/packages/page-parachains/src/Overview/Periods.tsx index 9ce1b8d3b9..8281ad5ed0 100644 --- a/packages/page-parachains/src/Overview/Periods.tsx +++ b/packages/page-parachains/src/Overview/Periods.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2021 @polkadot/app-parachains authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { LeasePeriod } from '../types'; -import BN from 'bn.js'; import React, { useMemo } from 'react'; import { BN_ONE, formatNumber } from '@polkadot/util'; diff --git a/packages/page-parachains/src/Teleport.tsx b/packages/page-parachains/src/Teleport.tsx index e979323c91..fe208d93de 100644 --- a/packages/page-parachains/src/Teleport.tsx +++ b/packages/page-parachains/src/Teleport.tsx @@ -1,10 +1,13 @@ // Copyright 2017-2021 @polkadot/app-parachains authors & contributors // SPDX-License-Identifier: Apache-2.0 -import BN from 'bn.js'; +import type BN from 'bn.js'; +import type { LinkOption } from '@polkadot/apps-config/endpoints/types'; +import type { Option } from '@polkadot/apps-config/settings/types'; + import React, { useMemo, useState } from 'react'; -import { Dropdown, InputAddress, InputBalance, Modal, TxButton } from '@polkadot/react-components'; +import { ChainImg, Dropdown, InputAddress, InputBalance, Modal, TxButton } from '@polkadot/react-components'; import { useApi, useTeleport } from '@polkadot/react-hooks'; import { Available } from '@polkadot/react-query'; import { BN_ZERO } from '@polkadot/util'; @@ -16,7 +19,25 @@ interface Props { } const INVALID_PARAID = Number.MAX_SAFE_INTEGER; -const DEFAULT_WEIGHT = 100_000_000; // 30_000_000 as per the code, add a margin +const DEFAULT_WEIGHT = 30_000_000 * 2; // 30_000_000 as per the code, add a margin + +function createOption ({ info, paraId, text }: LinkOption, index: number): Option { + return { + text: ( +
+ +
{text}
+
+ ), + value: paraId || index + }; +} function Teleport ({ onClose }: Props): React.ReactElement | null { const { t } = useTranslation(); @@ -31,7 +52,7 @@ function Teleport ({ onClose }: Props): React.ReactElement | null { const { allowTeleport, destinations, isParachain } = useTeleport(); const chainOpts = useMemo( - () => destinations.map(({ paraId, text }, index) => ({ text, value: paraId || index })), + () => destinations.map(createOption), [destinations] ); diff --git a/packages/page-poll/package.json b/packages/page-poll/package.json index a63cb7ab3c..28caed3798 100644 --- a/packages/page-poll/package.json +++ b/packages/page-poll/package.json @@ -2,10 +2,10 @@ "name": "@polkadot/app-poll", "private": true, "type": "module", - "version": "0.91.3-68", + "version": "0.91.3-76", "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.14.0", - "@polkadot/react-components": "^0.91.3-68" + "@polkadot/react-components": "^0.91.3-76" } } diff --git a/packages/page-rpc/package.json b/packages/page-rpc/package.json index 92f60fb9b0..2679965331 100644 --- a/packages/page-rpc/package.json +++ b/packages/page-rpc/package.json @@ -2,10 +2,10 @@ "name": "@polkadot/app-rpc", "private": true, "type": "module", - "version": "0.91.3-68", + "version": "0.91.3-76", "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.14.0", - "@polkadot/react-components": "^0.91.3-68" + "@polkadot/react-components": "^0.91.3-76" } } diff --git a/packages/page-rpc/src/Rpc/Account.tsx b/packages/page-rpc/src/Rpc/Account.tsx index 0be9d769d1..9e703211da 100644 --- a/packages/page-rpc/src/Rpc/Account.tsx +++ b/packages/page-rpc/src/Rpc/Account.tsx @@ -1,7 +1,8 @@ // Copyright 2017-2021 @polkadot/app-rpc authors & contributors // SPDX-License-Identifier: Apache-2.0 -import BN from 'bn.js'; +import type BN from 'bn.js'; + import React, { useEffect, useState } from 'react'; import styled from 'styled-components'; diff --git a/packages/page-settings/package.json b/packages/page-settings/package.json index 766a7b0201..151673962d 100644 --- a/packages/page-settings/package.json +++ b/packages/page-settings/package.json @@ -2,13 +2,13 @@ "name": "@polkadot/app-settings", "private": true, "type": "module", - "version": "0.91.3-68", + "version": "0.91.3-76", "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.14.0", - "@polkadot/apps-config": "^0.91.3-68", - "@polkadot/react-components": "^0.91.3-68", - "@polkadot/react-query": "^0.91.3-68", + "@polkadot/apps-config": "^0.91.3-76", + "@polkadot/react-components": "^0.91.3-76", + "@polkadot/react-query": "^0.91.3-76", "query-string": "^7.0.0" } } diff --git a/packages/page-signing/package.json b/packages/page-signing/package.json index 0d9fde0914..041dc94582 100644 --- a/packages/page-signing/package.json +++ b/packages/page-signing/package.json @@ -2,10 +2,10 @@ "name": "@polkadot/app-signing", "private": true, "type": "module", - "version": "0.91.3-68", + "version": "0.91.3-76", "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.14.0", - "@polkadot/react-components": "^0.91.3-68" + "@polkadot/react-components": "^0.91.3-76" } } diff --git a/packages/page-society/package.json b/packages/page-society/package.json index 4d9b294b47..6ad9c2d5eb 100644 --- a/packages/page-society/package.json +++ b/packages/page-society/package.json @@ -2,10 +2,10 @@ "name": "@polkadot/app-society", "private": true, "type": "module", - "version": "0.91.3-68", + "version": "0.91.3-76", "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.14.0", - "@polkadot/react-components": "^0.91.3-68" + "@polkadot/react-components": "^0.91.3-76" } } diff --git a/packages/page-society/src/Candidates/BidNew.tsx b/packages/page-society/src/Candidates/BidNew.tsx index 32a9a77aa2..14469c9453 100644 --- a/packages/page-society/src/Candidates/BidNew.tsx +++ b/packages/page-society/src/Candidates/BidNew.tsx @@ -1,7 +1,8 @@ // Copyright 2017-2021 @polkadot/app-society authors & contributors // SPDX-License-Identifier: Apache-2.0 -import BN from 'bn.js'; +import type BN from 'bn.js'; + import React, { useState } from 'react'; import { InputAddress, InputBalance, Modal, TxButton } from '@polkadot/react-components'; diff --git a/packages/page-staking/package.json b/packages/page-staking/package.json index 6d855a835a..2ee139b34c 100644 --- a/packages/page-staking/package.json +++ b/packages/page-staking/package.json @@ -2,12 +2,12 @@ "name": "@polkadot/app-staking", "private": true, "type": "module", - "version": "0.91.3-68", + "version": "0.91.3-76", "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.14.0", - "@polkadot/app-explorer": "^0.91.3-68", - "@polkadot/react-components": "^0.91.3-68", - "@polkadot/react-query": "^0.91.3-68" + "@polkadot/app-explorer": "^0.91.3-76", + "@polkadot/react-components": "^0.91.3-76", + "@polkadot/react-query": "^0.91.3-76" } } diff --git a/packages/page-staking/src/Actions/Account/InputValidationUnstakeThreshold.tsx b/packages/page-staking/src/Actions/Account/InputValidationUnstakeThreshold.tsx index 50aa1509f0..0a975dab23 100644 --- a/packages/page-staking/src/Actions/Account/InputValidationUnstakeThreshold.tsx +++ b/packages/page-staking/src/Actions/Account/InputValidationUnstakeThreshold.tsx @@ -1,7 +1,8 @@ // Copyright 2017-2021 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import BN from 'bn.js'; +import type BN from 'bn.js'; + import React, { useEffect, useState } from 'react'; import { MarkWarning } from '@polkadot/react-components'; diff --git a/packages/page-staking/src/Actions/Account/ListNominees.tsx b/packages/page-staking/src/Actions/Account/ListNominees.tsx index 80e82e943b..1b69fa1cfe 100644 --- a/packages/page-staking/src/Actions/Account/ListNominees.tsx +++ b/packages/page-staking/src/Actions/Account/ListNominees.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2021 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { DeriveEraExposure, DeriveSessionIndexes } from '@polkadot/api-derive/types'; -import BN from 'bn.js'; import React, { useMemo } from 'react'; import { AddressMini, Expander, MarkWarning } from '@polkadot/react-components'; diff --git a/packages/page-staking/src/Actions/Account/Unbond.tsx b/packages/page-staking/src/Actions/Account/Unbond.tsx index ab7990eb6b..77bd135df7 100644 --- a/packages/page-staking/src/Actions/Account/Unbond.tsx +++ b/packages/page-staking/src/Actions/Account/Unbond.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2021 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { AccountId, StakingLedger } from '@polkadot/types/interfaces'; -import BN from 'bn.js'; import React, { useState } from 'react'; import styled from 'styled-components'; diff --git a/packages/page-staking/src/Actions/partials/Bond.tsx b/packages/page-staking/src/Actions/partials/Bond.tsx index 48a344e872..8cf7a2368c 100644 --- a/packages/page-staking/src/Actions/partials/Bond.tsx +++ b/packages/page-staking/src/Actions/partials/Bond.tsx @@ -1,11 +1,11 @@ // Copyright 2017-2021 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { DeriveBalancesAll } from '@polkadot/api-derive/types'; import type { AmountValidateState, DestinationType } from '../types'; import type { BondInfo } from './types'; -import BN from 'bn.js'; import React, { useCallback, useEffect, useMemo, useState } from 'react'; import { Dropdown, InputAddress, InputBalance, MarkError, Modal, Static } from '@polkadot/react-components'; diff --git a/packages/page-staking/src/Actions/types.ts b/packages/page-staking/src/Actions/types.ts index 1a71c7fe51..b7166350ba 100644 --- a/packages/page-staking/src/Actions/types.ts +++ b/packages/page-staking/src/Actions/types.ts @@ -1,10 +1,9 @@ // Copyright 2017-2021 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { AccountId, Balance, UnappliedSlashOther } from '@polkadot/types/interfaces'; -import BN from 'bn.js'; - export interface AmountValidateState { error: string | null; warning: string | null; diff --git a/packages/page-staking/src/Actions/useUnbondDuration.ts b/packages/page-staking/src/Actions/useUnbondDuration.ts index fa96951101..6b5a6cb99f 100644 --- a/packages/page-staking/src/Actions/useUnbondDuration.ts +++ b/packages/page-staking/src/Actions/useUnbondDuration.ts @@ -1,9 +1,9 @@ // Copyright 2017-2021 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { DeriveSessionInfo } from '@polkadot/api-derive/types'; -import BN from 'bn.js'; import { useMemo } from 'react'; import { useApi, useCall } from '@polkadot/react-hooks'; diff --git a/packages/page-staking/src/Overview/Address/Status.tsx b/packages/page-staking/src/Overview/Address/Status.tsx index 9299f233e1..08ab7c59b3 100644 --- a/packages/page-staking/src/Overview/Address/Status.tsx +++ b/packages/page-staking/src/Overview/Address/Status.tsx @@ -1,7 +1,8 @@ // Copyright 2017-2021 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import BN from 'bn.js'; +import type BN from 'bn.js'; + import React, { useMemo } from 'react'; import { Badge, Icon } from '@polkadot/react-components'; diff --git a/packages/page-staking/src/Overview/Address/index.tsx b/packages/page-staking/src/Overview/Address/index.tsx index 49c9b0496b..19a1a11cf4 100644 --- a/packages/page-staking/src/Overview/Address/index.tsx +++ b/packages/page-staking/src/Overview/Address/index.tsx @@ -1,13 +1,13 @@ // Copyright 2017-2021 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { DeriveAccountInfo, DeriveHeartbeatAuthor } from '@polkadot/api-derive/types'; import type { Option } from '@polkadot/types'; import type { SlashingSpans, ValidatorPrefs } from '@polkadot/types/interfaces'; import type { NominatedBy as NominatedByType, ValidatorInfo } from '../../types'; import type { NominatorValue } from './types'; -import BN from 'bn.js'; import React, { useCallback, useMemo } from 'react'; import { ApiPromise } from '@polkadot/api'; diff --git a/packages/page-staking/src/Payouts/Stash.tsx b/packages/page-staking/src/Payouts/Stash.tsx index 01b6714938..57b8a74c6f 100644 --- a/packages/page-staking/src/Payouts/Stash.tsx +++ b/packages/page-staking/src/Payouts/Stash.tsx @@ -1,11 +1,11 @@ // Copyright 2017-2021 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { SubmittableExtrinsic } from '@polkadot/api/types'; import type { DeriveStakerReward, DeriveStakingAccount } from '@polkadot/api-derive/types'; import type { PayoutStash } from './types'; -import BN from 'bn.js'; import React, { useEffect, useState } from 'react'; import { ApiPromise } from '@polkadot/api'; diff --git a/packages/page-staking/src/Payouts/Validator.tsx b/packages/page-staking/src/Payouts/Validator.tsx index 7dd1ce959d..9b512fd06b 100644 --- a/packages/page-staking/src/Payouts/Validator.tsx +++ b/packages/page-staking/src/Payouts/Validator.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2021 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { PayoutValidator } from './types'; -import BN from 'bn.js'; import React, { useMemo } from 'react'; import { AddressMini, AddressSmall, Expander } from '@polkadot/react-components'; diff --git a/packages/page-staking/src/Payouts/types.ts b/packages/page-staking/src/Payouts/types.ts index a5630e3d3b..a93b8af6e4 100644 --- a/packages/page-staking/src/Payouts/types.ts +++ b/packages/page-staking/src/Payouts/types.ts @@ -1,11 +1,10 @@ // Copyright 2017-2021 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { DeriveStakerReward } from '@polkadot/api-derive/types'; import type { Balance, EraIndex } from '@polkadot/types/interfaces'; -import BN from 'bn.js'; - export interface PayoutEraValidator { era: EraIndex; stashes: Record; diff --git a/packages/page-staking/src/Payouts/useEraBlocks.ts b/packages/page-staking/src/Payouts/useEraBlocks.ts index b2c1420dee..81fb72f8d8 100644 --- a/packages/page-staking/src/Payouts/useEraBlocks.ts +++ b/packages/page-staking/src/Payouts/useEraBlocks.ts @@ -1,10 +1,10 @@ // Copyright 2017-2021 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { DeriveSessionProgress } from '@polkadot/api-derive/types'; import type { Forcing } from '@polkadot/types/interfaces'; -import BN from 'bn.js'; import { useMemo } from 'react'; import { useApi, useCall } from '@polkadot/react-hooks'; diff --git a/packages/page-staking/src/Payouts/useStakerPayouts.ts b/packages/page-staking/src/Payouts/useStakerPayouts.ts index b8bed6187a..ef1637a4d9 100644 --- a/packages/page-staking/src/Payouts/useStakerPayouts.ts +++ b/packages/page-staking/src/Payouts/useStakerPayouts.ts @@ -1,10 +1,10 @@ // Copyright 2017-2021 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { Option } from '@polkadot/types'; import type { EraIndex } from '@polkadot/types/interfaces'; -import BN from 'bn.js'; import { useMemo } from 'react'; import { useApi, useCall } from '@polkadot/react-hooks'; diff --git a/packages/page-staking/src/Payouts/util.tsx b/packages/page-staking/src/Payouts/util.tsx index 57555a8768..62f54cf641 100644 --- a/packages/page-staking/src/Payouts/util.tsx +++ b/packages/page-staking/src/Payouts/util.tsx @@ -1,7 +1,8 @@ // Copyright 2017-2021 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import BN from 'bn.js'; +import type BN from 'bn.js'; + import React from 'react'; import { BN_ONE, formatNumber } from '@polkadot/util'; diff --git a/packages/page-staking/src/Query/types.ts b/packages/page-staking/src/Query/types.ts index a5f091c045..f77b1411af 100644 --- a/packages/page-staking/src/Query/types.ts +++ b/packages/page-staking/src/Query/types.ts @@ -1,7 +1,7 @@ // Copyright 2017-2021 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import BN from 'bn.js'; +import type BN from 'bn.js'; export interface Props { className?: string; diff --git a/packages/page-staking/src/Query/util.ts b/packages/page-staking/src/Query/util.ts index 8d81d40b33..de97ebdd5f 100644 --- a/packages/page-staking/src/Query/util.ts +++ b/packages/page-staking/src/Query/util.ts @@ -1,7 +1,7 @@ // Copyright 2017-2021 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import BN from 'bn.js'; +import type BN from 'bn.js'; import { BN_THOUSAND, BN_ZERO, isBn, isFunction } from '@polkadot/util'; diff --git a/packages/page-staking/src/Slashes/types.ts b/packages/page-staking/src/Slashes/types.ts index 93899d918b..5db5a5478f 100644 --- a/packages/page-staking/src/Slashes/types.ts +++ b/packages/page-staking/src/Slashes/types.ts @@ -1,10 +1,9 @@ // Copyright 2017-2021 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { UnappliedSlash } from '@polkadot/types/interfaces'; -import BN from 'bn.js'; - export interface Slash { era: BN; isMine: boolean; diff --git a/packages/page-staking/src/Targets/Summary.tsx b/packages/page-staking/src/Targets/Summary.tsx index 1292179fa7..f7d2812626 100644 --- a/packages/page-staking/src/Targets/Summary.tsx +++ b/packages/page-staking/src/Targets/Summary.tsx @@ -1,11 +1,11 @@ // Copyright 2017-2021 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { DeriveSessionIndexes } from '@polkadot/api-derive/types'; import type { Option } from '@polkadot/types'; import type { Balance } from '@polkadot/types/interfaces'; -import BN from 'bn.js'; import React, { useMemo } from 'react'; import { CardSummary, SummaryBox } from '@polkadot/react-components'; diff --git a/packages/page-staking/src/Targets/Validator.tsx b/packages/page-staking/src/Targets/Validator.tsx index ee30881e4e..aad15af152 100644 --- a/packages/page-staking/src/Targets/Validator.tsx +++ b/packages/page-staking/src/Targets/Validator.tsx @@ -1,11 +1,11 @@ // Copyright 2017-2021 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { DeriveAccountInfo } from '@polkadot/api-derive/types'; import type { UnappliedSlash } from '@polkadot/types/interfaces'; import type { NominatedBy, ValidatorInfo } from '../types'; -import BN from 'bn.js'; import React, { useCallback, useMemo } from 'react'; import { AddressSmall, Badge, Checkbox, Icon } from '@polkadot/react-components'; diff --git a/packages/page-staking/src/Targets/index.tsx b/packages/page-staking/src/Targets/index.tsx index 937196c3fe..77d08f9907 100644 --- a/packages/page-staking/src/Targets/index.tsx +++ b/packages/page-staking/src/Targets/index.tsx @@ -1,11 +1,11 @@ // Copyright 2017-2021 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { DeriveHasIdentity, DeriveStakingOverview } from '@polkadot/api-derive/types'; import type { StakerState } from '@polkadot/react-hooks/types'; import type { NominatedBy, SortedTargets, TargetSortBy, ValidatorInfo } from '../types'; -import BN from 'bn.js'; import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'; import styled from 'styled-components'; diff --git a/packages/page-staking/src/types.ts b/packages/page-staking/src/types.ts index 4b290b24e1..508e04f3f8 100644 --- a/packages/page-staking/src/types.ts +++ b/packages/page-staking/src/types.ts @@ -1,11 +1,10 @@ // Copyright 2017-2021 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { Inflation } from '@polkadot/react-hooks/types'; import type { AccountId, Balance, BlockNumber, EraIndex, Exposure, Hash, SessionIndex, ValidatorPrefs, ValidatorPrefsTo196 } from '@polkadot/types/interfaces'; -import BN from 'bn.js'; - export type Nominators = Record; export type AccountFilter = 'all' | 'controller' | 'session' | 'stash' | 'unbonded'; diff --git a/packages/page-storage/package.json b/packages/page-storage/package.json index 60f06a6703..4eac9b2639 100644 --- a/packages/page-storage/package.json +++ b/packages/page-storage/package.json @@ -2,11 +2,11 @@ "name": "@polkadot/app-storage", "private": true, "type": "module", - "version": "0.91.3-68", + "version": "0.91.3-76", "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.14.0", - "@polkadot/react-components": "^0.91.3-68", - "@polkadot/react-params": "^0.91.3-68" + "@polkadot/react-components": "^0.91.3-76", + "@polkadot/react-params": "^0.91.3-76" } } diff --git a/packages/page-sudo/package.json b/packages/page-sudo/package.json index e7445931cf..166004f6dc 100644 --- a/packages/page-sudo/package.json +++ b/packages/page-sudo/package.json @@ -2,10 +2,10 @@ "name": "@polkadot/app-sudo", "private": true, "type": "module", - "version": "0.91.3-68", + "version": "0.91.3-76", "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.14.0", - "@polkadot/react-components": "^0.91.3-68" + "@polkadot/react-components": "^0.91.3-76" } } diff --git a/packages/page-sudo/src/Sudo.tsx b/packages/page-sudo/src/Sudo.tsx index d6fd5841fe..bd97611da8 100644 --- a/packages/page-sudo/src/Sudo.tsx +++ b/packages/page-sudo/src/Sudo.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2021 @polkadot/app-js authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { SubmittableExtrinsic } from '@polkadot/api/types'; -import BN from 'bn.js'; import React, { useCallback, useState } from 'react'; import styled from 'styled-components'; diff --git a/packages/page-tech-comm/package.json b/packages/page-tech-comm/package.json index 0b1b18f861..4f12f87616 100644 --- a/packages/page-tech-comm/package.json +++ b/packages/page-tech-comm/package.json @@ -2,11 +2,11 @@ "name": "@polkadot/app-tech-comm", "private": true, "type": "module", - "version": "0.91.3-68", + "version": "0.91.3-76", "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.14.0", - "@polkadot/react-components": "^0.91.3-68", - "@polkadot/react-query": "^0.91.3-68" + "@polkadot/react-components": "^0.91.3-76", + "@polkadot/react-query": "^0.91.3-76" } } diff --git a/packages/page-tech-comm/src/Proposals/Voting.tsx b/packages/page-tech-comm/src/Proposals/Voting.tsx index dab28c91b6..2190f42b06 100644 --- a/packages/page-tech-comm/src/Proposals/Voting.tsx +++ b/packages/page-tech-comm/src/Proposals/Voting.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2021 @polkadot/app-tech-comm authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { AccountId, Hash } from '@polkadot/types/interfaces'; -import BN from 'bn.js'; import React, { useState } from 'react'; import { Button, MarkWarning, Modal, TxButton, VoteAccount } from '@polkadot/react-components'; diff --git a/packages/page-treasury/package.json b/packages/page-treasury/package.json index b84b6268b6..a55c44944e 100644 --- a/packages/page-treasury/package.json +++ b/packages/page-treasury/package.json @@ -2,11 +2,11 @@ "name": "@polkadot/app-treasury", "private": true, "type": "module", - "version": "0.91.3-68", + "version": "0.91.3-76", "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.14.0", - "@polkadot/react-components": "^0.91.3-68", - "@polkadot/react-query": "^0.91.3-68" + "@polkadot/react-components": "^0.91.3-76", + "@polkadot/react-query": "^0.91.3-76" } } diff --git a/packages/page-treasury/src/Overview/ProposalCreate.tsx b/packages/page-treasury/src/Overview/ProposalCreate.tsx index 8596f74422..93f206c736 100644 --- a/packages/page-treasury/src/Overview/ProposalCreate.tsx +++ b/packages/page-treasury/src/Overview/ProposalCreate.tsx @@ -1,7 +1,8 @@ // Copyright 2017-2021 @polkadot/app-treasury authors & contributors // SPDX-License-Identifier: Apache-2.0 -import BN from 'bn.js'; +import type BN from 'bn.js'; + import React, { useMemo, useState } from 'react'; import { Button, InputAddress, InputBalance, MarkWarning, Modal, Static, TxButton } from '@polkadot/react-components'; diff --git a/packages/page-treasury/src/Overview/Summary.tsx b/packages/page-treasury/src/Overview/Summary.tsx index 1109448c29..ec39aaca0e 100644 --- a/packages/page-treasury/src/Overview/Summary.tsx +++ b/packages/page-treasury/src/Overview/Summary.tsx @@ -1,7 +1,8 @@ // Copyright 2017-2021 @polkadot/app-treasury authors & contributors // SPDX-License-Identifier: Apache-2.0 -import BN from 'bn.js'; +import type BN from 'bn.js'; + import React from 'react'; import { CardSummary, SummaryBox } from '@polkadot/react-components'; diff --git a/packages/page-treasury/src/Tips/Tip.tsx b/packages/page-treasury/src/Tips/Tip.tsx index 6e5e2ab871..b678e1266c 100644 --- a/packages/page-treasury/src/Tips/Tip.tsx +++ b/packages/page-treasury/src/Tips/Tip.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2021 @polkadot/app-treasury authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { AccountId, Balance, BlockNumber, OpenTip, OpenTipTo225 } from '@polkadot/types/interfaces'; -import BN from 'bn.js'; import React, { useEffect, useMemo, useState } from 'react'; import styled from 'styled-components'; diff --git a/packages/page-treasury/src/Tips/TipCreate.tsx b/packages/page-treasury/src/Tips/TipCreate.tsx index 32a2cb6f7d..bcab92d852 100644 --- a/packages/page-treasury/src/Tips/TipCreate.tsx +++ b/packages/page-treasury/src/Tips/TipCreate.tsx @@ -1,7 +1,8 @@ // Copyright 2017-2021 @polkadot/app-treasury authors & contributors // SPDX-License-Identifier: Apache-2.0 -import BN from 'bn.js'; +import type BN from 'bn.js'; + import React, { useEffect, useState } from 'react'; import { Button, Input, InputAddress, InputBalance, Modal, TxButton } from '@polkadot/react-components'; diff --git a/packages/page-treasury/src/Tips/TipEndorse.tsx b/packages/page-treasury/src/Tips/TipEndorse.tsx index aab26e5495..e92292eba5 100644 --- a/packages/page-treasury/src/Tips/TipEndorse.tsx +++ b/packages/page-treasury/src/Tips/TipEndorse.tsx @@ -1,7 +1,8 @@ // Copyright 2017-2021 @polkadot/app-treasury authors & contributors // SPDX-License-Identifier: Apache-2.0 -import BN from 'bn.js'; +import type BN from 'bn.js'; + import React, { useState } from 'react'; import { Button, InputAddress, InputBalance, Modal, TxButton } from '@polkadot/react-components'; diff --git a/packages/page-treasury/src/Tips/Tips.tsx b/packages/page-treasury/src/Tips/Tips.tsx index afd962f48a..adb4c1dee1 100644 --- a/packages/page-treasury/src/Tips/Tips.tsx +++ b/packages/page-treasury/src/Tips/Tips.tsx @@ -1,10 +1,10 @@ // Copyright 2017-2021 @polkadot/app-treasury authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { Option } from '@polkadot/types'; import type { OpenTip, OpenTipTo225 } from '@polkadot/types/interfaces'; -import BN from 'bn.js'; import React, { useMemo, useRef, useState } from 'react'; import styled from 'styled-components'; diff --git a/packages/page-treasury/src/Tips/index.tsx b/packages/page-treasury/src/Tips/index.tsx index 245a962641..7c1f37d8c0 100644 --- a/packages/page-treasury/src/Tips/index.tsx +++ b/packages/page-treasury/src/Tips/index.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2021 @polkadot/app-treasury authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { SubmittableExtrinsic } from '@polkadot/api/types'; -import BN from 'bn.js'; import React, { useCallback, useMemo, useState } from 'react'; import { Button, TxButton } from '@polkadot/react-components'; diff --git a/packages/react-api/package.json b/packages/react-api/package.json index b6d2750843..0b67bc70b0 100644 --- a/packages/react-api/package.json +++ b/packages/react-api/package.json @@ -2,13 +2,13 @@ "name": "@polkadot/react-api", "private": true, "type": "module", - "version": "0.91.3-68", + "version": "0.91.3-76", "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.14.0", - "@polkadot/api": "^4.12.2-8", - "@polkadot/extension-dapp": "^0.38.4-4", - "@polkadot/x-rxjs": "^6.6.1", + "@polkadot/api": "^4.12.2-11", + "@polkadot/extension-dapp": "^0.38.4-7", + "@polkadot/x-rxjs": "^6.6.2-8", "fflate": "^0.7.0" } } diff --git a/packages/react-components/package.json b/packages/react-components/package.json index 631db7dfc6..6eb0b4f82b 100644 --- a/packages/react-components/package.json +++ b/packages/react-components/package.json @@ -2,22 +2,22 @@ "name": "@polkadot/react-components", "private": true, "type": "module", - "version": "0.91.3-68", + "version": "0.91.3-76", "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.14.0", "@fortawesome/fontawesome-svg-core": "^1.2.35", "@fortawesome/free-solid-svg-icons": "^5.15.3", "@fortawesome/react-fontawesome": "^0.1.14", - "@polkadot/keyring": "^6.6.1", - "@polkadot/react-api": "^0.91.3-68", - "@polkadot/react-identicon": "^0.78.2-5", - "@polkadot/react-qr": "^0.78.2-5", - "@polkadot/react-query": "^0.91.3-68", - "@polkadot/ui-keyring": "^0.78.2-5", - "@polkadot/ui-settings": "^0.78.2-5", - "@polkadot/util": "^6.6.1", - "@polkadot/util-crypto": "^6.6.1", + "@polkadot/keyring": "^6.6.2-8", + "@polkadot/react-api": "^0.91.3-76", + "@polkadot/react-identicon": "^0.78.2-9", + "@polkadot/react-qr": "^0.78.2-9", + "@polkadot/react-query": "^0.91.3-76", + "@polkadot/ui-keyring": "^0.78.2-9", + "@polkadot/ui-settings": "^0.78.2-9", + "@polkadot/util": "^6.6.2-8", + "@polkadot/util-crypto": "^6.6.2-8", "chart.js": "^2.9.4", "codeflask": "^1.4.1", "i18next": "^19.9.2", diff --git a/packages/react-components/src/AddressInfo.tsx b/packages/react-components/src/AddressInfo.tsx index d643f56729..14cd209c76 100644 --- a/packages/react-components/src/AddressInfo.tsx +++ b/packages/react-components/src/AddressInfo.tsx @@ -1,11 +1,11 @@ // Copyright 2017-2021 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { TFunction } from 'i18next'; import type { DeriveBalancesAccountData, DeriveBalancesAll, DeriveDemocracyLock, DeriveStakingAccount } from '@polkadot/api-derive/types'; import type { BlockNumber, LockIdentifier, ValidatorPrefsTo145, Voting } from '@polkadot/types/interfaces'; -import BN from 'bn.js'; import React, { useRef } from 'react'; import styled from 'styled-components'; diff --git a/packages/react-components/src/AddressMini.tsx b/packages/react-components/src/AddressMini.tsx index 146888df87..2d831bd751 100644 --- a/packages/react-components/src/AddressMini.tsx +++ b/packages/react-components/src/AddressMini.tsx @@ -1,10 +1,10 @@ // Copyright 2017-2021 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { AccountId, AccountIndex, Address } from '@polkadot/types/interfaces'; import type { KeyringItemType } from '@polkadot/ui-keyring/types'; -import BN from 'bn.js'; import React from 'react'; import styled from 'styled-components'; diff --git a/packages/react-components/src/Balance.tsx b/packages/react-components/src/Balance.tsx index 415b30e9af..de1e48302b 100644 --- a/packages/react-components/src/Balance.tsx +++ b/packages/react-components/src/Balance.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2021 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { AccountId, AccountIndex, Address } from '@polkadot/types/interfaces'; -import BN from 'bn.js'; import React from 'react'; import { Balance, FormatBalance } from '@polkadot/react-query'; diff --git a/packages/react-components/src/Bonded.tsx b/packages/react-components/src/Bonded.tsx index 835b82f696..1d7148ebe8 100644 --- a/packages/react-components/src/Bonded.tsx +++ b/packages/react-components/src/Bonded.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2021 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { AccountId, AccountIndex, Address } from '@polkadot/types/interfaces'; -import BN from 'bn.js'; import React from 'react'; import { Bonded } from '@polkadot/react-query'; diff --git a/packages/react-components/src/Call.tsx b/packages/react-components/src/Call.tsx index f0e26f9755..85a03532f3 100644 --- a/packages/react-components/src/Call.tsx +++ b/packages/react-components/src/Call.tsx @@ -1,10 +1,10 @@ // Copyright 2017-2021 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { ExtrinsicSignature } from '@polkadot/types/interfaces'; import type { Codec, IExtrinsic, IMethod, TypeDef } from '@polkadot/types/types'; -import BN from 'bn.js'; import React, { useEffect, useState } from 'react'; import styled from 'styled-components'; diff --git a/packages/react-components/src/CardSummary.tsx b/packages/react-components/src/CardSummary.tsx index 76e1477a61..fe4c8ab37d 100644 --- a/packages/react-components/src/CardSummary.tsx +++ b/packages/react-components/src/CardSummary.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2021 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { UInt } from '@polkadot/types'; -import BN from 'bn.js'; import React from 'react'; import styled from 'styled-components'; diff --git a/packages/react-components/src/Chart/Line.tsx b/packages/react-components/src/Chart/Line.tsx index 791dd0b626..398c1ea6ce 100644 --- a/packages/react-components/src/Chart/Line.tsx +++ b/packages/react-components/src/Chart/Line.tsx @@ -1,13 +1,15 @@ // Copyright 2017-2021 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { LineProps } from './types'; -import BN from 'bn.js'; import ChartJs from 'chart.js'; import React, { useMemo } from 'react'; import * as Chart from 'react-chartjs-2'; +import { isBn } from '@polkadot/util'; + interface State { chartData: ChartJs.ChartData; chartOptions: ChartJs.ChartOptions; @@ -50,7 +52,7 @@ const chartOptions = { function calculateOptions (colors: (string | undefined)[] = [], legends: string[], labels: string[], values: (number | BN)[][]): State { const chartData = values.reduce((chartData, values, index): Config => { const color = colors[index] || alphaColor(COLORS[index]); - const data = values.map((value): number => BN.isBN(value) ? value.toNumber() : value); + const data = values.map((value): number => isBn(value) ? value.toNumber() : value); chartData.datasets.push({ backgroundColor: color, diff --git a/packages/react-components/src/Chart/types.ts b/packages/react-components/src/Chart/types.ts index 2a75c3f5de..93d597dd04 100644 --- a/packages/react-components/src/Chart/types.ts +++ b/packages/react-components/src/Chart/types.ts @@ -1,7 +1,7 @@ // Copyright 2017-2021 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import BN from 'bn.js'; +import type BN from 'bn.js'; export interface DoughnutValue { colors: string[]; diff --git a/packages/react-components/src/DemocracyLocks.tsx b/packages/react-components/src/DemocracyLocks.tsx index 250fa953e0..64ece827fc 100644 --- a/packages/react-components/src/DemocracyLocks.tsx +++ b/packages/react-components/src/DemocracyLocks.tsx @@ -1,11 +1,11 @@ // Copyright 2017-2021 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { TFunction } from 'i18next'; import type { DeriveDemocracyLock } from '@polkadot/api-derive/types'; import type { Balance } from '@polkadot/types/interfaces'; -import BN from 'bn.js'; import React, { useEffect, useState } from 'react'; import styled from 'styled-components'; diff --git a/packages/react-components/src/LinkExternal.tsx b/packages/react-components/src/LinkExternal.tsx index aa38201cdd..d01136a2b5 100644 --- a/packages/react-components/src/LinkExternal.tsx +++ b/packages/react-components/src/LinkExternal.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2021 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { LinkTypes } from '@polkadot/apps-config/links/types'; -import BN from 'bn.js'; import React, { useMemo } from 'react'; import styled from 'styled-components'; diff --git a/packages/react-components/src/Progress.tsx b/packages/react-components/src/Progress.tsx index b7aa0479ed..d6f80f0d1e 100644 --- a/packages/react-components/src/Progress.tsx +++ b/packages/react-components/src/Progress.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2021 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { UInt } from '@polkadot/types'; -import BN from 'bn.js'; import React from 'react'; import styled from 'styled-components'; diff --git a/packages/react-components/src/ProposedAction.tsx b/packages/react-components/src/ProposedAction.tsx index 9643c6726f..0bf940a638 100644 --- a/packages/react-components/src/ProposedAction.tsx +++ b/packages/react-components/src/ProposedAction.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2021 @polkadot/app-democracy authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { Proposal } from '@polkadot/types/interfaces'; -import BN from 'bn.js'; import React from 'react'; import styled from 'styled-components'; diff --git a/packages/react-components/src/VoteValue.tsx b/packages/react-components/src/VoteValue.tsx index 9472975046..5767e9ed4c 100644 --- a/packages/react-components/src/VoteValue.tsx +++ b/packages/react-components/src/VoteValue.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2021 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { DeriveBalancesAll } from '@polkadot/api-derive/types'; -import BN from 'bn.js'; import React, { useCallback, useEffect, useState } from 'react'; import { useApi, useCall } from '@polkadot/react-hooks'; diff --git a/packages/react-hooks/package.json b/packages/react-hooks/package.json index a39611310a..4879c76bb4 100644 --- a/packages/react-hooks/package.json +++ b/packages/react-hooks/package.json @@ -2,7 +2,7 @@ "name": "@polkadot/react-hooks", "private": true, "type": "module", - "version": "0.91.3-68", + "version": "0.91.3-76", "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.14.0" diff --git a/packages/react-hooks/src/useInflation.ts b/packages/react-hooks/src/useInflation.ts index 23be4cae1a..8a4fd06d4d 100644 --- a/packages/react-hooks/src/useInflation.ts +++ b/packages/react-hooks/src/useInflation.ts @@ -1,10 +1,10 @@ // Copyright 2017-2021 @polkadot/react-hooks authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { ApiPromise } from '@polkadot/api'; import type { Inflation } from './types'; -import BN from 'bn.js'; import { useEffect, useState } from 'react'; import { getInflationParams } from '@polkadot/apps-config'; diff --git a/packages/react-hooks/src/useLedger.ts b/packages/react-hooks/src/useLedger.ts index 615f7813fe..999dad80a5 100644 --- a/packages/react-hooks/src/useLedger.ts +++ b/packages/react-hooks/src/useLedger.ts @@ -30,15 +30,19 @@ const EMPTY_STATE: StateBase = { const hasWebUsb = !!(window as unknown as { USB?: unknown }).USB; const ledgerChains = networks.filter((n) => !!n.hasLedgerSupport); let ledger: Ledger | null = null; +let ledgerType: LedgerTypes | null = null; function retrieveLedger (api: ApiPromise): Ledger { - if (!ledger) { + const currType = uiSettings.ledgerConn as LedgerTypes; + + if (!ledger || ledgerType !== currType) { const genesisHex = api.genesisHash.toHex(); const def = ledgerChains.find(({ genesisHash }) => genesisHash[0] === genesisHex); assert(def, `Unable to find supported chain for ${genesisHex}`); - ledger = new Ledger(uiSettings.ledgerConn as LedgerTypes, def.network); + ledger = new Ledger(currType, def.network); + ledgerType = currType; } return ledger; diff --git a/packages/react-hooks/src/useTeleport.ts b/packages/react-hooks/src/useTeleport.ts index c4836d9246..e897c6c5cc 100644 --- a/packages/react-hooks/src/useTeleport.ts +++ b/packages/react-hooks/src/useTeleport.ts @@ -7,6 +7,7 @@ import type { ParaId } from '@polkadot/types/interfaces'; import { useEffect, useState } from 'react'; import { createWsEndpoints } from '@polkadot/apps-config'; +import { isNumber } from '@polkadot/util'; import { useApi } from './useApi'; import { useCall } from './useCall'; @@ -18,9 +19,22 @@ interface Teleport { paraId?: ParaId; } -const endpoints = createWsEndpoints((k: string, v: string | undefined) => v || k).filter(({ allowTeleport }) => allowTeleport); +interface ExtLinkOption extends LinkOption { + teleport: number[]; +} -function extractRelayDestinations (relayGenesis: string, filter: (l: LinkOption) => boolean): LinkOption[] { +const DEFAULT_STATE: Teleport = { + allowTeleport: false, + destinations: [], + isParachain: false +}; + +const endpoints = createWsEndpoints((k: string, v: string | undefined) => v || k).filter((v): v is ExtLinkOption => + !!v.teleport && + !!v.teleport.length +); + +function extractRelayDestinations (relayGenesis: string, filter: (l: ExtLinkOption) => boolean): ExtLinkOption[] { return endpoints .filter((l) => ( @@ -28,7 +42,7 @@ function extractRelayDestinations (relayGenesis: string, filter: (l: LinkOption) l.genesisHash === relayGenesis ) && filter(l) ) - .reduce((result: LinkOption[], curr): LinkOption[] => { + .reduce((result: ExtLinkOption[], curr): ExtLinkOption[] => { if (!result.some(({ genesisHash, paraId }) => paraId === curr.paraId || genesisHash === curr.genesisHash)) { result.push(curr); } @@ -47,24 +61,29 @@ function extractRelayDestinations (relayGenesis: string, filter: (l: LinkOption) export function useTeleport (): Teleport { const { api, apiUrl, isApiReady } = useApi(); const chainParaId = useCall(isApiReady && api.query.parachainInfo?.parachainId); - const [state, setState] = useState(() => ({ - allowTeleport: false, - destinations: [], - isParachain: false - })); + const [state, setState] = useState(() => ({ ...DEFAULT_STATE })); useEffect((): void => { if (isApiReady) { const relayGenesis = api.genesisHash.toHex(); - const destinations = extractRelayDestinations(relayGenesis, ({ genesisHash }) => relayGenesis !== genesisHash); + const endpoint = endpoints.find(({ value }) => + value === apiUrl + ); - setState((prev) => ({ - ...prev, - allowTeleport: destinations.length !== 0, - destinations - })); + if (endpoint) { + const destinations = extractRelayDestinations(relayGenesis, ({ paraId }) => + isNumber(paraId) && + endpoint.teleport.includes(paraId) + ); + + setState((prev) => ({ + ...prev, + allowTeleport: destinations.length !== 0, + destinations + })); + } } - }, [api, isApiReady]); + }, [api, apiUrl, isApiReady]); useEffect((): void => { if (chainParaId) { @@ -77,8 +96,9 @@ export function useTeleport (): Teleport { ...prev, allowTeleport: !!endpoint, destinations: endpoint && endpoint.genesisHashRelay - // FIXME we probably just want to check for !chainParaId.eq(paraId) || !!genesisHash (would affect Teleport modal) - ? extractRelayDestinations(endpoint.genesisHashRelay, ({ genesisHash }) => !!genesisHash) + ? extractRelayDestinations(endpoint.genesisHashRelay, ({ paraId }) => + endpoint.teleport.includes(isNumber(paraId) ? paraId : -1) + ) : [], isParachain: true, paraId: chainParaId diff --git a/packages/react-hooks/src/useTreasury.ts b/packages/react-hooks/src/useTreasury.ts index d58c44f0df..2b77b19467 100644 --- a/packages/react-hooks/src/useTreasury.ts +++ b/packages/react-hooks/src/useTreasury.ts @@ -1,9 +1,9 @@ // Copyright 2017-2020 @polkadot/react-hooks authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { Balance } from '@polkadot/types/interfaces'; -import BN from 'bn.js'; import { useEffect, useState } from 'react'; import { DeriveBalancesAccount } from '@polkadot/api-derive/types'; diff --git a/packages/react-hooks/src/useVotingStatus.ts b/packages/react-hooks/src/useVotingStatus.ts index cf20b24a0c..981190f79c 100644 --- a/packages/react-hooks/src/useVotingStatus.ts +++ b/packages/react-hooks/src/useVotingStatus.ts @@ -1,9 +1,9 @@ // Copyright 2017-2021 @polkadot/react-hooks authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { BlockNumber, Votes } from '@polkadot/types/interfaces'; -import BN from 'bn.js'; import { useMemo } from 'react'; import { ApiPromise } from '@polkadot/api'; diff --git a/packages/react-hooks/src/useWeight.ts b/packages/react-hooks/src/useWeight.ts index 3ad77a5007..66c85defc7 100644 --- a/packages/react-hooks/src/useWeight.ts +++ b/packages/react-hooks/src/useWeight.ts @@ -1,9 +1,9 @@ // Copyright 2017-2021 @polkadot/react-hooks authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { Call } from '@polkadot/types/interfaces'; -import BN from 'bn.js'; import { useEffect, useState } from 'react'; import { BN_ZERO, isFunction } from '@polkadot/util'; diff --git a/packages/react-params/package.json b/packages/react-params/package.json index a63881fe11..0d9065cb0d 100644 --- a/packages/react-params/package.json +++ b/packages/react-params/package.json @@ -2,10 +2,10 @@ "name": "@polkadot/react-params", "private": true, "type": "module", - "version": "0.91.3-68", + "version": "0.91.3-76", "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.14.0", - "@polkadot/react-components": "^0.91.3-68" + "@polkadot/react-components": "^0.91.3-76" } } diff --git a/packages/react-params/src/Param/Amount.tsx b/packages/react-params/src/Param/Amount.tsx index 1af1ffb875..5f7b1ba54d 100644 --- a/packages/react-params/src/Param/Amount.tsx +++ b/packages/react-params/src/Param/Amount.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2021 @polkadot/react-params authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { Props } from '../types'; -import BN from 'bn.js'; import React, { useCallback, useMemo } from 'react'; import { Input, InputNumber } from '@polkadot/react-components'; diff --git a/packages/react-params/src/Param/Vote.tsx b/packages/react-params/src/Param/Vote.tsx index 58dd5357a5..dff113fe40 100644 --- a/packages/react-params/src/Param/Vote.tsx +++ b/packages/react-params/src/Param/Vote.tsx @@ -3,11 +3,11 @@ import type { Props } from '../types'; -import BN from 'bn.js'; import React, { useRef } from 'react'; import { Dropdown } from '@polkadot/react-components'; import { GenericVote } from '@polkadot/types'; +import { isBn } from '@polkadot/util'; import { useTranslation } from '../translate'; import Bare from './Bare'; @@ -39,7 +39,7 @@ function Vote ({ className = '', defaultValue: { value }, isDisabled, isError, o { text: t('Locked6x'), value: 6 } ]); - const defaultValue = value instanceof BN + const defaultValue = isBn(value) ? value.toNumber() : value instanceof GenericVote ? (value.isAye ? -1 : 0) diff --git a/packages/react-query/package.json b/packages/react-query/package.json index 5e1408ec5e..bedcf1389f 100644 --- a/packages/react-query/package.json +++ b/packages/react-query/package.json @@ -2,7 +2,7 @@ "name": "@polkadot/react-query", "private": true, "type": "module", - "version": "0.91.3-68", + "version": "0.91.3-76", "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.14.0" diff --git a/packages/react-query/src/BlockToTime.tsx b/packages/react-query/src/BlockToTime.tsx index ea9cca0b09..cbe4a6c028 100644 --- a/packages/react-query/src/BlockToTime.tsx +++ b/packages/react-query/src/BlockToTime.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2021 @polkadot/react-query authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { ApiPromise } from '@polkadot/api'; -import BN from 'bn.js'; import React from 'react'; import styled from 'styled-components'; diff --git a/packages/react-query/src/Elapsed.tsx b/packages/react-query/src/Elapsed.tsx index e73164a757..e643756014 100644 --- a/packages/react-query/src/Elapsed.tsx +++ b/packages/react-query/src/Elapsed.tsx @@ -1,7 +1,8 @@ // Copyright 2017-2021 @polkadot/react-query authors & contributors // SPDX-License-Identifier: Apache-2.0 -import BN from 'bn.js'; +import type BN from 'bn.js'; + import React, { useEffect, useState } from 'react'; import styled from 'styled-components'; diff --git a/packages/react-query/src/FormatBalance.tsx b/packages/react-query/src/FormatBalance.tsx index 10dc41456a..e149d71845 100644 --- a/packages/react-query/src/FormatBalance.tsx +++ b/packages/react-query/src/FormatBalance.tsx @@ -1,10 +1,10 @@ // Copyright 2017-2021 @polkadot/react-query authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { Compact } from '@polkadot/types'; import type { Registry } from '@polkadot/types/types'; -import BN from 'bn.js'; import React, { useMemo } from 'react'; import styled from 'styled-components'; diff --git a/packages/react-query/src/Nonce.tsx b/packages/react-query/src/Nonce.tsx index 3121c29452..49de71872d 100644 --- a/packages/react-query/src/Nonce.tsx +++ b/packages/react-query/src/Nonce.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2021 @polkadot/react-query authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { DeriveBalancesAll } from '@polkadot/api-derive/types'; -import BN from 'bn.js'; import React from 'react'; import { useApi, useCall } from '@polkadot/react-hooks'; diff --git a/packages/react-query/src/SessionToTime.tsx b/packages/react-query/src/SessionToTime.tsx index 1b9890e8e0..1b2596763b 100644 --- a/packages/react-query/src/SessionToTime.tsx +++ b/packages/react-query/src/SessionToTime.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2021 @polkadot/react-query authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { DeriveSessionProgress } from '@polkadot/api-derive/types'; -import BN from 'bn.js'; import React, { useMemo } from 'react'; import { useApi, useCall } from '@polkadot/react-hooks'; diff --git a/packages/react-query/src/TimeNow.tsx b/packages/react-query/src/TimeNow.tsx index 99a814fbb5..b867201d14 100644 --- a/packages/react-query/src/TimeNow.tsx +++ b/packages/react-query/src/TimeNow.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2021 @polkadot/react-query authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { Moment } from '@polkadot/types/interfaces'; -import BN from 'bn.js'; import React, { useEffect, useState } from 'react'; import { useApi, useCall } from '@polkadot/react-hooks'; diff --git a/packages/react-signer/package.json b/packages/react-signer/package.json index b40ea3cf4b..d31dc77ff2 100644 --- a/packages/react-signer/package.json +++ b/packages/react-signer/package.json @@ -2,10 +2,10 @@ "name": "@polkadot/react-signer", "private": true, "type": "module", - "version": "0.91.3-68", + "version": "0.91.3-76", "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.14.0", - "@polkadot/react-components": "^0.91.3-68" + "@polkadot/react-components": "^0.91.3-76" } } diff --git a/packages/react-signer/src/PaymentInfo.tsx b/packages/react-signer/src/PaymentInfo.tsx index be2dce92d3..8dc883e23e 100644 --- a/packages/react-signer/src/PaymentInfo.tsx +++ b/packages/react-signer/src/PaymentInfo.tsx @@ -1,11 +1,11 @@ // Copyright 2017-2021 @polkadot/react-signer authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { SubmittableExtrinsic } from '@polkadot/api/promise/types'; import type { DeriveBalancesAll } from '@polkadot/api-derive/types'; import type { RuntimeDispatchInfo } from '@polkadot/types/interfaces'; -import BN from 'bn.js'; import React, { useEffect, useState } from 'react'; import { Trans } from 'react-i18next'; diff --git a/packages/react-signer/src/Tip.tsx b/packages/react-signer/src/Tip.tsx index cc03c6a7a0..330aa2b4f5 100644 --- a/packages/react-signer/src/Tip.tsx +++ b/packages/react-signer/src/Tip.tsx @@ -1,7 +1,8 @@ // Copyright 2017-2021 @polkadot/react-signer authors & contributors // SPDX-License-Identifier: Apache-2.0 -import BN from 'bn.js'; +import type BN from 'bn.js'; + import React, { useEffect, useState } from 'react'; import { InputBalance, Modal, Toggle } from '@polkadot/react-components'; diff --git a/packages/react-signer/src/Transaction.tsx b/packages/react-signer/src/Transaction.tsx index 774eeccbde..cb01f2b2fa 100644 --- a/packages/react-signer/src/Transaction.tsx +++ b/packages/react-signer/src/Transaction.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2021 @polkadot/react-signer authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; import type { QueueTx } from '@polkadot/react-components/Status/types'; -import BN from 'bn.js'; import React from 'react'; import styled from 'styled-components'; diff --git a/packages/test-support/package.json b/packages/test-support/package.json index 0175229ba8..989a5517aa 100644 --- a/packages/test-support/package.json +++ b/packages/test-support/package.json @@ -2,7 +2,7 @@ "name": "@polkadot/test-support", "private": true, "type": "module", - "version": "0.91.3-68", + "version": "0.91.3-76", "license": "Apache-2.0", "dependencies": { "@testing-library/react": "^11.2.7", diff --git a/packages/test-support/scripts/lib/changeBountyStateFunctions.ts b/packages/test-support/scripts/lib/changeBountyStateFunctions.ts index 784b19eeef..3f4d1e209f 100644 --- a/packages/test-support/scripts/lib/changeBountyStateFunctions.ts +++ b/packages/test-support/scripts/lib/changeBountyStateFunctions.ts @@ -1,11 +1,10 @@ // Copyright 2017-2021 @polkadot/test-support authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type BN from 'bn.js'; +import type { ApiPromise } from '@polkadot/api'; import type { KeyringPair } from '@polkadot/keyring/types'; -import BN from 'bn.js'; - -import { ApiPromise } from '@polkadot/api'; import { execute } from '@polkadot/test-support/transaction'; import { acceptMotion, fillTreasury, getMotion, proposeMotion } from './helpers'; diff --git a/yarn.lock b/yarn.lock index 00fc279ef5..374f70a656 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1954,6 +1954,18 @@ __metadata: languageName: node linkType: hard +"@ledgerhq/hw-transport-webhid@npm:^5.51.1": + version: 5.51.1 + resolution: "@ledgerhq/hw-transport-webhid@npm:5.51.1" + dependencies: + "@ledgerhq/devices": ^5.51.1 + "@ledgerhq/errors": ^5.50.0 + "@ledgerhq/hw-transport": ^5.51.1 + "@ledgerhq/logs": ^5.50.0 + checksum: 5082457cdc60a6600f808d81fba0f7a2754eadad9d841420400325fa8e2d28a7e8467ff361ab55854b098dec2bd84f467ef484e1acf9507e5756686ff3ab8e9c + languageName: node + linkType: hard + "@ledgerhq/hw-transport-webusb@npm:^5.51.1": version: 5.51.1 resolution: "@ledgerhq/hw-transport-webusb@npm:5.51.1" @@ -2218,54 +2230,54 @@ __metadata: languageName: node linkType: hard -"@polkadot/api-contract@npm:^4.12.2-8": - version: 4.12.2-8 - resolution: "@polkadot/api-contract@npm:4.12.2-8" +"@polkadot/api-contract@npm:^4.12.2-11": + version: 4.12.2-11 + resolution: "@polkadot/api-contract@npm:4.12.2-11" dependencies: "@babel/runtime": ^7.14.0 - "@polkadot/api": 4.12.2-8 - "@polkadot/types": 4.12.2-8 + "@polkadot/api": 4.12.2-11 + "@polkadot/types": 4.12.2-11 "@polkadot/util": ^6.6.1 "@polkadot/x-rxjs": ^6.6.1 bn.js: ^4.11.9 - checksum: 0db33836ec4c873061181374495a7705c34790aebeef9a9e2f41ae9c1344b563f8e63b1ab2c5f7623cebc9eb507496b3af6bcb81884ae824ade34a9577f1273b + checksum: d3afaa9462af0c9987b6a2d008d6a10f712e455a4afc0810493a1a078a00870ac6484c89f5da83c4649e88a41d129297a9e745585dfbcf808efef6cdc0f43d7b languageName: node linkType: hard -"@polkadot/api-derive@npm:4.12.2-8": - version: 4.12.2-8 - resolution: "@polkadot/api-derive@npm:4.12.2-8" +"@polkadot/api-derive@npm:4.12.2-11": + version: 4.12.2-11 + resolution: "@polkadot/api-derive@npm:4.12.2-11" dependencies: "@babel/runtime": ^7.14.0 - "@polkadot/api": 4.12.2-8 - "@polkadot/rpc-core": 4.12.2-8 - "@polkadot/types": 4.12.2-8 + "@polkadot/api": 4.12.2-11 + "@polkadot/rpc-core": 4.12.2-11 + "@polkadot/types": 4.12.2-11 "@polkadot/util": ^6.6.1 "@polkadot/util-crypto": ^6.6.1 "@polkadot/x-rxjs": ^6.6.1 bn.js: ^4.11.9 - checksum: 83ca157f2618ea48c4ddadf18409ce5c0d1537e0665014902bb08965760dcc8e55181326a1134a9ee2cf155f34f628ddabab3838e7d8ecd41740dd12512b0ffd + checksum: dc4b47c2fa95e899171029c3a66d3e1a015ae1e363c7f0b26b347a2fb330cc3d3bd380aec0fc2235a3bf5a5fed0381d2387c718b7327784ae8bcb8b7dd21f971 languageName: node linkType: hard -"@polkadot/api@npm:^4.12.2-8": - version: 4.12.2-8 - resolution: "@polkadot/api@npm:4.12.2-8" +"@polkadot/api@npm:^4.12.2-11": + version: 4.12.2-11 + resolution: "@polkadot/api@npm:4.12.2-11" dependencies: "@babel/runtime": ^7.14.0 - "@polkadot/api-derive": 4.12.2-8 + "@polkadot/api-derive": 4.12.2-11 "@polkadot/keyring": ^6.6.1 - "@polkadot/metadata": 4.12.2-8 - "@polkadot/rpc-core": 4.12.2-8 - "@polkadot/rpc-provider": 4.12.2-8 - "@polkadot/types": 4.12.2-8 - "@polkadot/types-known": 4.12.2-8 + "@polkadot/metadata": 4.12.2-11 + "@polkadot/rpc-core": 4.12.2-11 + "@polkadot/rpc-provider": 4.12.2-11 + "@polkadot/types": 4.12.2-11 + "@polkadot/types-known": 4.12.2-11 "@polkadot/util": ^6.6.1 "@polkadot/util-crypto": ^6.6.1 "@polkadot/x-rxjs": ^6.6.1 bn.js: ^4.11.9 eventemitter3: ^4.0.7 - checksum: 3c3e86cd58bca96f18ce2961ac83aad56984d58710526c5f43c7dda5578829fd877320c7f6af78f8f0e0743bb86406e4439b2b235c1f9bbdb32f3a5bf266531e + checksum: 3a42da403c4300ebc676675922913e19a389fd30d50fff5727b75c892b4e5e1224468a144a5877a33964f79d87c2f0dfb028f0fed6f5cf0e15e6aed3a6d24ecd languageName: node linkType: hard @@ -2274,10 +2286,10 @@ __metadata: resolution: "@polkadot/app-accounts@workspace:packages/page-accounts" dependencies: "@babel/runtime": ^7.14.0 - "@polkadot/phishing": ^0.6.174 - "@polkadot/react-components": ^0.91.3-68 - "@polkadot/test-support": 0.91.3-68 - "@polkadot/vanitygen": ^0.36.2-5 + "@polkadot/phishing": ^0.6.175 + "@polkadot/react-components": ^0.91.3-76 + "@polkadot/test-support": 0.91.3-76 + "@polkadot/vanitygen": ^0.36.2-6 detect-browser: ^5.2.0 file-saver: ^2.0.5 languageName: unknown @@ -2288,7 +2300,7 @@ __metadata: resolution: "@polkadot/app-addresses@workspace:packages/page-addresses" dependencies: "@babel/runtime": ^7.14.0 - "@polkadot/react-components": ^0.91.3-68 + "@polkadot/react-components": ^0.91.3-76 "@testing-library/react": ^11.2.7 file-saver: ^2.0.5 testcontainers: ^7.11.1 @@ -2300,7 +2312,7 @@ __metadata: resolution: "@polkadot/app-assets@workspace:packages/page-assets" dependencies: "@babel/runtime": ^7.14.0 - "@polkadot/react-components": ^0.91.3-68 + "@polkadot/react-components": ^0.91.3-76 languageName: unknown linkType: soft @@ -2309,8 +2321,8 @@ __metadata: resolution: "@polkadot/app-bounties@workspace:packages/page-bounties" dependencies: "@babel/runtime": ^7.14.0 - "@polkadot/react-components": ^0.91.3-68 - "@polkadot/test-support": 0.91.3-68 + "@polkadot/react-components": ^0.91.3-76 + "@polkadot/test-support": 0.91.3-76 languageName: unknown linkType: soft @@ -2319,7 +2331,7 @@ __metadata: resolution: "@polkadot/app-calendar@workspace:packages/page-calendar" dependencies: "@babel/runtime": ^7.14.0 - "@polkadot/react-components": ^0.91.3-68 + "@polkadot/react-components": ^0.91.3-76 languageName: unknown linkType: soft @@ -2328,7 +2340,7 @@ __metadata: resolution: "@polkadot/app-claims@workspace:packages/page-claims" dependencies: "@babel/runtime": ^7.14.0 - "@polkadot/react-components": ^0.91.3-68 + "@polkadot/react-components": ^0.91.3-76 secp256k1: ^3.8.0 languageName: unknown linkType: soft @@ -2338,7 +2350,7 @@ __metadata: resolution: "@polkadot/app-contracts@workspace:packages/page-contracts" dependencies: "@babel/runtime": ^7.14.0 - "@polkadot/api-contract": ^4.12.2-8 + "@polkadot/api-contract": ^4.12.2-11 languageName: unknown linkType: soft @@ -2347,8 +2359,8 @@ __metadata: resolution: "@polkadot/app-council@workspace:packages/page-council" dependencies: "@babel/runtime": ^7.14.0 - "@polkadot/react-components": ^0.91.3-68 - "@polkadot/react-query": ^0.91.3-68 + "@polkadot/react-components": ^0.91.3-76 + "@polkadot/react-query": ^0.91.3-76 languageName: unknown linkType: soft @@ -2357,17 +2369,17 @@ __metadata: resolution: "@polkadot/app-democracy@workspace:packages/page-democracy" dependencies: "@babel/runtime": ^7.14.0 - "@polkadot/react-components": ^0.91.3-68 - "@polkadot/react-query": ^0.91.3-68 + "@polkadot/react-components": ^0.91.3-76 + "@polkadot/react-query": ^0.91.3-76 languageName: unknown linkType: soft -"@polkadot/app-explorer@^0.91.3-68, @polkadot/app-explorer@workspace:packages/page-explorer": +"@polkadot/app-explorer@^0.91.3-76, @polkadot/app-explorer@workspace:packages/page-explorer": version: 0.0.0-use.local resolution: "@polkadot/app-explorer@workspace:packages/page-explorer" dependencies: "@babel/runtime": ^7.14.0 - "@polkadot/react-components": ^0.91.3-68 + "@polkadot/react-components": ^0.91.3-76 languageName: unknown linkType: soft @@ -2376,9 +2388,9 @@ __metadata: resolution: "@polkadot/app-extrinsics@workspace:packages/page-extrinsics" dependencies: "@babel/runtime": ^7.14.0 - "@polkadot/react-components": ^0.91.3-68 - "@polkadot/react-params": ^0.91.3-68 - "@polkadot/react-signer": ^0.91.3-68 + "@polkadot/react-components": ^0.91.3-76 + "@polkadot/react-params": ^0.91.3-76 + "@polkadot/react-signer": ^0.91.3-76 languageName: unknown linkType: soft @@ -2387,7 +2399,7 @@ __metadata: resolution: "@polkadot/app-gilt@workspace:packages/page-gilt" dependencies: "@babel/runtime": ^7.14.0 - "@polkadot/react-components": ^0.91.3-68 + "@polkadot/react-components": ^0.91.3-76 languageName: unknown linkType: soft @@ -2396,7 +2408,7 @@ __metadata: resolution: "@polkadot/app-js@workspace:packages/page-js" dependencies: "@babel/runtime": ^7.14.0 - "@polkadot/react-components": ^0.91.3-68 + "@polkadot/react-components": ^0.91.3-76 languageName: unknown linkType: soft @@ -2405,8 +2417,8 @@ __metadata: resolution: "@polkadot/app-membership@workspace:packages/page-membership" dependencies: "@babel/runtime": ^7.14.0 - "@polkadot/react-components": ^0.91.3-68 - "@polkadot/react-query": ^0.91.3-68 + "@polkadot/react-components": ^0.91.3-76 + "@polkadot/react-query": ^0.91.3-76 languageName: unknown linkType: soft @@ -2415,8 +2427,8 @@ __metadata: resolution: "@polkadot/app-parachains@workspace:packages/page-parachains" dependencies: "@babel/runtime": ^7.14.0 - "@polkadot/react-components": ^0.91.3-68 - "@polkadot/react-query": ^0.91.3-68 + "@polkadot/react-components": ^0.91.3-76 + "@polkadot/react-query": ^0.91.3-76 languageName: unknown linkType: soft @@ -2425,7 +2437,7 @@ __metadata: resolution: "@polkadot/app-poll@workspace:packages/page-poll" dependencies: "@babel/runtime": ^7.14.0 - "@polkadot/react-components": ^0.91.3-68 + "@polkadot/react-components": ^0.91.3-76 languageName: unknown linkType: soft @@ -2434,7 +2446,7 @@ __metadata: resolution: "@polkadot/app-rpc@workspace:packages/page-rpc" dependencies: "@babel/runtime": ^7.14.0 - "@polkadot/react-components": ^0.91.3-68 + "@polkadot/react-components": ^0.91.3-76 languageName: unknown linkType: soft @@ -2443,9 +2455,9 @@ __metadata: resolution: "@polkadot/app-settings@workspace:packages/page-settings" dependencies: "@babel/runtime": ^7.14.0 - "@polkadot/apps-config": ^0.91.3-68 - "@polkadot/react-components": ^0.91.3-68 - "@polkadot/react-query": ^0.91.3-68 + "@polkadot/apps-config": ^0.91.3-76 + "@polkadot/react-components": ^0.91.3-76 + "@polkadot/react-query": ^0.91.3-76 query-string: ^7.0.0 languageName: unknown linkType: soft @@ -2455,7 +2467,7 @@ __metadata: resolution: "@polkadot/app-signing@workspace:packages/page-signing" dependencies: "@babel/runtime": ^7.14.0 - "@polkadot/react-components": ^0.91.3-68 + "@polkadot/react-components": ^0.91.3-76 languageName: unknown linkType: soft @@ -2464,7 +2476,7 @@ __metadata: resolution: "@polkadot/app-society@workspace:packages/page-society" dependencies: "@babel/runtime": ^7.14.0 - "@polkadot/react-components": ^0.91.3-68 + "@polkadot/react-components": ^0.91.3-76 languageName: unknown linkType: soft @@ -2473,9 +2485,9 @@ __metadata: resolution: "@polkadot/app-staking@workspace:packages/page-staking" dependencies: "@babel/runtime": ^7.14.0 - "@polkadot/app-explorer": ^0.91.3-68 - "@polkadot/react-components": ^0.91.3-68 - "@polkadot/react-query": ^0.91.3-68 + "@polkadot/app-explorer": ^0.91.3-76 + "@polkadot/react-components": ^0.91.3-76 + "@polkadot/react-query": ^0.91.3-76 languageName: unknown linkType: soft @@ -2484,8 +2496,8 @@ __metadata: resolution: "@polkadot/app-storage@workspace:packages/page-storage" dependencies: "@babel/runtime": ^7.14.0 - "@polkadot/react-components": ^0.91.3-68 - "@polkadot/react-params": ^0.91.3-68 + "@polkadot/react-components": ^0.91.3-76 + "@polkadot/react-params": ^0.91.3-76 languageName: unknown linkType: soft @@ -2494,7 +2506,7 @@ __metadata: resolution: "@polkadot/app-sudo@workspace:packages/page-sudo" dependencies: "@babel/runtime": ^7.14.0 - "@polkadot/react-components": ^0.91.3-68 + "@polkadot/react-components": ^0.91.3-76 languageName: unknown linkType: soft @@ -2503,8 +2515,8 @@ __metadata: resolution: "@polkadot/app-tech-comm@workspace:packages/page-tech-comm" dependencies: "@babel/runtime": ^7.14.0 - "@polkadot/react-components": ^0.91.3-68 - "@polkadot/react-query": ^0.91.3-68 + "@polkadot/react-components": ^0.91.3-76 + "@polkadot/react-query": ^0.91.3-76 languageName: unknown linkType: soft @@ -2513,12 +2525,12 @@ __metadata: resolution: "@polkadot/app-treasury@workspace:packages/page-treasury" dependencies: "@babel/runtime": ^7.14.0 - "@polkadot/react-components": ^0.91.3-68 - "@polkadot/react-query": ^0.91.3-68 + "@polkadot/react-components": ^0.91.3-76 + "@polkadot/react-query": ^0.91.3-76 languageName: unknown linkType: soft -"@polkadot/apps-config@^0.91.3-68, @polkadot/apps-config@workspace:packages/apps-config": +"@polkadot/apps-config@^0.91.3-76, @polkadot/apps-config@workspace:packages/apps-config": version: 0.0.0-use.local resolution: "@polkadot/apps-config@workspace:packages/apps-config" dependencies: @@ -2532,7 +2544,7 @@ __metadata: "@kiltprotocol/type-definitions": ^0.1.5 "@laminar/type-definitions": ^0.3.1 "@phala/typedefs": ^0.1.3 - "@polkadot/networks": ^6.6.1 + "@polkadot/networks": ^6.6.2-8 "@polymathnetwork/polymesh-types": ^0.0.2 "@snowfork/snowbridge-types": ^0.2.3 "@sora-substrate/type-definitions": ^1.3.15 @@ -2550,8 +2562,8 @@ __metadata: dependencies: "@babel/core": ^7.14.3 "@babel/polyfill": ^7.12.1 - "@polkadot/dev": ^0.62.29 - "@polkadot/react-components": ^0.91.3-68 + "@polkadot/dev": ^0.62.30 + "@polkadot/react-components": ^0.91.3-76 "@types/react-dom": ^17.0.5 "@types/tmp": ^0.2.0 babel-loader: ^8.2.2 @@ -2567,7 +2579,7 @@ __metadata: languageName: unknown linkType: soft -"@polkadot/apps-routing@^0.91.3-68, @polkadot/apps-routing@workspace:packages/apps-routing": +"@polkadot/apps-routing@^0.91.3-76, @polkadot/apps-routing@workspace:packages/apps-routing": version: 0.0.0-use.local resolution: "@polkadot/apps-routing@workspace:packages/apps-routing" dependencies: @@ -2582,15 +2594,15 @@ __metadata: "@babel/core": ^7.14.3 "@babel/polyfill": ^7.12.1 "@babel/runtime": ^7.14.0 - "@polkadot/apps-config": ^0.91.3-68 - "@polkadot/apps-routing": ^0.91.3-68 - "@polkadot/dev": ^0.62.29 - "@polkadot/react-api": ^0.91.3-68 - "@polkadot/react-components": ^0.91.3-68 - "@polkadot/react-hooks": ^0.91.3-68 - "@polkadot/react-params": ^0.91.3-68 - "@polkadot/react-query": ^0.91.3-68 - "@polkadot/react-signer": ^0.91.3-68 + "@polkadot/apps-config": ^0.91.3-76 + "@polkadot/apps-routing": ^0.91.3-76 + "@polkadot/dev": ^0.62.30 + "@polkadot/react-api": ^0.91.3-76 + "@polkadot/react-components": ^0.91.3-76 + "@polkadot/react-hooks": ^0.91.3-76 + "@polkadot/react-params": ^0.91.3-76 + "@polkadot/react-query": ^0.91.3-76 + "@polkadot/react-signer": ^0.91.3-76 "@types/punycode": ^2.1.0 babel-loader: ^8.2.2 buffer: ^6.0.3 @@ -2617,9 +2629,9 @@ __metadata: languageName: unknown linkType: soft -"@polkadot/dev@npm:^0.62.29": - version: 0.62.29 - resolution: "@polkadot/dev@npm:0.62.29" +"@polkadot/dev@npm:^0.62.30": + version: 0.62.30 + resolution: "@polkadot/dev@npm:0.62.30" dependencies: "@babel/cli": ^7.14.3 "@babel/core": ^7.14.3 @@ -2699,125 +2711,126 @@ __metadata: polkadot-exec-prettier: scripts/polkadot-exec-prettier.cjs polkadot-exec-tsc: scripts/polkadot-exec-tsc.cjs polkadot-exec-webpack: scripts/polkadot-exec-webpack.cjs - checksum: c8446eb434ba650c1993ad4e96daee591f9d47a520aae38411050c3f1ab4fcb48cd83529f834fa416f08da5d3acaaa77101dca1bc336139b01d97ffb15345787 + checksum: ab8b37d80a6c9ecd3490331eb87dd71a006dd07b4240c6b88803ea875fb54c208c530842b4d47ee0d6867cfd2e9d61df8bbb149d0e43061fde94ec190cb8caae languageName: node linkType: hard -"@polkadot/extension-dapp@npm:^0.38.4-4": - version: 0.38.4-4 - resolution: "@polkadot/extension-dapp@npm:0.38.4-4" +"@polkadot/extension-dapp@npm:^0.38.4-7": + version: 0.38.4-7 + resolution: "@polkadot/extension-dapp@npm:0.38.4-7" dependencies: "@babel/runtime": ^7.14.0 - "@polkadot/extension-inject": ^0.38.4-4 + "@polkadot/extension-inject": ^0.38.4-7 "@polkadot/util": ^6.6.1 "@polkadot/util-crypto": ^6.6.1 peerDependencies: "@polkadot/api": "*" "@polkadot/util": "*" "@polkadot/util-crypto": "*" - checksum: 3e9bf3ad4f0719761ce299ae581ec7d7ec553d152a91930b5b67b60382b32d3acf9f12933aee120851c1fc196afd217f5d2501bda6db6cd93b3bb6bd5faf7d29 + checksum: ac8f8f27d78dd861eae628f2cb15876b1e9e7e51f1eb5843f2d2fa78121467552025ab65521dcebe214d4fd2463ac731727aeadd20b998cd2360988b013ebd2c languageName: node linkType: hard -"@polkadot/extension-inject@npm:^0.38.4-4": - version: 0.38.4-4 - resolution: "@polkadot/extension-inject@npm:0.38.4-4" +"@polkadot/extension-inject@npm:^0.38.4-7": + version: 0.38.4-7 + resolution: "@polkadot/extension-inject@npm:0.38.4-7" dependencies: "@babel/runtime": ^7.14.0 peerDependencies: "@polkadot/api": "*" - checksum: dab9f9e1ff12dae6d2fa364c7516a2632099cd5734161cadb5a186cc79e44cd991c7f461da0da2b5dccf86c7ca175e8f0f3cb7aad2a5c56829777363f3d1ff95 + checksum: 94693b2ceb9aa708b52b031f592bef8c89683aa75a9563563d946dcf2e475d9e82895549ab28b550c32c2cbf1846fdaa595aaa9b39c2005ab7380541f5462676 languageName: node linkType: hard -"@polkadot/hw-ledger-transports@npm:6.6.1": - version: 6.6.1 - resolution: "@polkadot/hw-ledger-transports@npm:6.6.1" +"@polkadot/hw-ledger-transports@npm:6.6.2-8": + version: 6.6.2-8 + resolution: "@polkadot/hw-ledger-transports@npm:6.6.2-8" dependencies: "@babel/runtime": ^7.14.0 "@ledgerhq/hw-transport-node-hid-singleton": ^5.51.1 + "@ledgerhq/hw-transport-webhid": ^5.51.1 "@ledgerhq/hw-transport-webusb": ^5.51.1 dependenciesMeta: "@ledgerhq/hw-transport-node-hid-singleton": optional: true - checksum: ab59b08970e1c38522ae9abc33d953c266b0544def711663887e623e42347e3e85a2ee2c571c6748b44fa0fb59c165b1812d49caa57e26f8fd0f7e99d614a870 + checksum: 2631d9ead5c541de3b336636574eb7e1e13432f27a268c3a58b6fed5262c2d51c1600c141e9576cc48c2263445d651ed0d8b24f4e3464dc7becc99bd63db1b60 languageName: node linkType: hard -"@polkadot/hw-ledger@npm:^6.6.1": - version: 6.6.1 - resolution: "@polkadot/hw-ledger@npm:6.6.1" +"@polkadot/hw-ledger@npm:^6.6.2-8": + version: 6.6.2-8 + resolution: "@polkadot/hw-ledger@npm:6.6.2-8" dependencies: "@babel/runtime": ^7.14.0 - "@polkadot/hw-ledger-transports": 6.6.1 - "@polkadot/util": ^6.6.1 + "@polkadot/hw-ledger-transports": 6.6.2-8 + "@polkadot/util": ^6.6.2-8 "@zondax/ledger-polkadot": ^0.14.0 - checksum: accffe5e3874e2da949926664c7da3707d829e9ec82eba5d605b133da0c938ffcffaea4718c0e8bf49bb18ef35d9cca45296ca77def9f63da7b2533325d6973c + checksum: 01a0b33fca5341e287456d94cc8916a02aa9286b14e6660925ccfbc14def8e42c0ef602eb6fabdee7b44dcdfe78fc4f6c5ef6daa542510a9a05375260673e860 languageName: node linkType: hard -"@polkadot/keyring@npm:^6.6.1": - version: 6.6.1 - resolution: "@polkadot/keyring@npm:6.6.1" +"@polkadot/keyring@npm:^6.6.2-8": + version: 6.6.2-8 + resolution: "@polkadot/keyring@npm:6.6.2-8" dependencies: "@babel/runtime": ^7.14.0 - "@polkadot/util": 6.6.1 - "@polkadot/util-crypto": 6.6.1 + "@polkadot/util": 6.6.2-8 + "@polkadot/util-crypto": 6.6.2-8 peerDependencies: - "@polkadot/util": 6.6.1 - "@polkadot/util-crypto": 6.6.1 - checksum: 6a31403288f55f4f2319f83bf62d9f3d2934b4f03d732bf312b4df721c7043ee1c8de1a873f1bc012fea50ac2412c491e6ce83e768edc4f12c5e97d998bf591f + "@polkadot/util": 6.6.2-8 + "@polkadot/util-crypto": 6.6.2-8 + checksum: 41ddbecc632a679945a0482644b55120fa64ee9f048dcf0e7ff34454453702844043c88a243090473cc19eb2a9cc76d9068ccbb10083bc3aa660d606c076c683 languageName: node linkType: hard -"@polkadot/metadata@npm:4.12.2-8": - version: 4.12.2-8 - resolution: "@polkadot/metadata@npm:4.12.2-8" +"@polkadot/metadata@npm:4.12.2-11": + version: 4.12.2-11 + resolution: "@polkadot/metadata@npm:4.12.2-11" dependencies: "@babel/runtime": ^7.14.0 - "@polkadot/types": 4.12.2-8 - "@polkadot/types-known": 4.12.2-8 + "@polkadot/types": 4.12.2-11 + "@polkadot/types-known": 4.12.2-11 "@polkadot/util": ^6.6.1 "@polkadot/util-crypto": ^6.6.1 bn.js: ^4.11.9 - checksum: 7550fb4ac1bbce263f35150da208fc975019114f29f349867c598f473a0b98b6e2600ff4d75a55fd7bcfd6cc83b048ad5e52f2ad6b668fae34e1db19e16dda58 + checksum: a6775544ab126c3fbfa3f8f78a0b959446f85f9fdf692352a4d9da71a50e4ca4e7bfe9082178a7179faeb56526f494718d8cf43eff7c79ed84edee4e19dd3fae languageName: node linkType: hard -"@polkadot/networks@npm:^6.6.1": - version: 6.6.1 - resolution: "@polkadot/networks@npm:6.6.1" +"@polkadot/networks@npm:^6.6.2-8": + version: 6.6.2-8 + resolution: "@polkadot/networks@npm:6.6.2-8" dependencies: "@babel/runtime": ^7.14.0 - checksum: b9ce07315a91c4db4e1e23776111ec3b5c9c7ffac3b6ebfcefc4bfd612ce4bb146a2b7dfc44ec857216e47984deb290218cb7d3eb24514600fad5f23d150939d + checksum: a15bfa6b1174d637c6678cd9ce1b0ff634ba97cd82fb813aa7a3cd287c93a7896195b6c20d33a3d64bb527d22ac0a8a99ff168acb90d09771ea8b864c1abcb30 languageName: node linkType: hard -"@polkadot/phishing@npm:^0.6.174": - version: 0.6.174 - resolution: "@polkadot/phishing@npm:0.6.174" +"@polkadot/phishing@npm:^0.6.175": + version: 0.6.175 + resolution: "@polkadot/phishing@npm:0.6.175" dependencies: "@babel/runtime": ^7.14.0 "@polkadot/util": ^6.6.1 "@polkadot/util-crypto": ^6.6.1 "@polkadot/x-fetch": ^6.6.1 - checksum: 011cf4e9b7ba06291d1ffc55acc3dabaf8c5c105d0daf7cd5f9b652bd4b7530b280c47a4ff058084f3f5e11bf6d8766f875e2d5cd4abd630aef7e240cfcfd212 + checksum: 38a5d81993505f754baedde46217409b042d40ec0cacfa9af53c1c2791d5cb71c0749f770be3d664847d10401a72df58d01474f2ecd78b2d2525bbaa1edb279d languageName: node linkType: hard -"@polkadot/react-api@^0.91.3-68, @polkadot/react-api@workspace:packages/react-api": +"@polkadot/react-api@^0.91.3-76, @polkadot/react-api@workspace:packages/react-api": version: 0.0.0-use.local resolution: "@polkadot/react-api@workspace:packages/react-api" dependencies: "@babel/runtime": ^7.14.0 - "@polkadot/api": ^4.12.2-8 - "@polkadot/extension-dapp": ^0.38.4-4 - "@polkadot/x-rxjs": ^6.6.1 + "@polkadot/api": ^4.12.2-11 + "@polkadot/extension-dapp": ^0.38.4-7 + "@polkadot/x-rxjs": ^6.6.2-8 fflate: ^0.7.0 languageName: unknown linkType: soft -"@polkadot/react-components@^0.91.3-68, @polkadot/react-components@workspace:packages/react-components": +"@polkadot/react-components@^0.91.3-76, @polkadot/react-components@workspace:packages/react-components": version: 0.0.0-use.local resolution: "@polkadot/react-components@workspace:packages/react-components" dependencies: @@ -2825,15 +2838,15 @@ __metadata: "@fortawesome/fontawesome-svg-core": ^1.2.35 "@fortawesome/free-solid-svg-icons": ^5.15.3 "@fortawesome/react-fontawesome": ^0.1.14 - "@polkadot/keyring": ^6.6.1 - "@polkadot/react-api": ^0.91.3-68 - "@polkadot/react-identicon": ^0.78.2-5 - "@polkadot/react-qr": ^0.78.2-5 - "@polkadot/react-query": ^0.91.3-68 - "@polkadot/ui-keyring": ^0.78.2-5 - "@polkadot/ui-settings": ^0.78.2-5 - "@polkadot/util": ^6.6.1 - "@polkadot/util-crypto": ^6.6.1 + "@polkadot/keyring": ^6.6.2-8 + "@polkadot/react-api": ^0.91.3-76 + "@polkadot/react-identicon": ^0.78.2-9 + "@polkadot/react-qr": ^0.78.2-9 + "@polkadot/react-query": ^0.91.3-76 + "@polkadot/ui-keyring": ^0.78.2-9 + "@polkadot/ui-settings": ^0.78.2-9 + "@polkadot/util": ^6.6.2-8 + "@polkadot/util-crypto": ^6.6.2-8 "@types/codeflask": ^1.4.2 "@types/owasp-password-strength-test": ^1.3.0 chart.js: ^2.9.4 @@ -2860,7 +2873,7 @@ __metadata: languageName: unknown linkType: soft -"@polkadot/react-hooks@^0.91.3-68, @polkadot/react-hooks@workspace:packages/react-hooks": +"@polkadot/react-hooks@^0.91.3-76, @polkadot/react-hooks@workspace:packages/react-hooks": version: 0.0.0-use.local resolution: "@polkadot/react-hooks@workspace:packages/react-hooks" dependencies: @@ -2868,16 +2881,16 @@ __metadata: languageName: unknown linkType: soft -"@polkadot/react-identicon@npm:^0.78.2-5": - version: 0.78.2-5 - resolution: "@polkadot/react-identicon@npm:0.78.2-5" +"@polkadot/react-identicon@npm:^0.78.2-9": + version: 0.78.2-9 + resolution: "@polkadot/react-identicon@npm:0.78.2-9" dependencies: "@babel/runtime": ^7.14.0 - "@polkadot/keyring": ^6.6.1 - "@polkadot/ui-settings": 0.78.2-5 - "@polkadot/ui-shared": 0.78.2-5 - "@polkadot/util": ^6.6.1 - "@polkadot/util-crypto": ^6.6.1 + "@polkadot/keyring": ^6.6.2-8 + "@polkadot/ui-settings": 0.78.2-9 + "@polkadot/ui-shared": 0.78.2-9 + "@polkadot/util": ^6.6.2-8 + "@polkadot/util-crypto": ^6.6.2-8 color: ^3.1.3 ethereum-blockies-base64: ^1.0.2 jdenticon: 3.1.0 @@ -2891,26 +2904,26 @@ __metadata: react-dom: "*" react-is: "*" styled-components: "*" - checksum: 8700d209f5a574d127305ea6859e3ce25050cfadf7ffa3e408624ed8efdcbe17fe9394894b982e912569fbe1c9cab2888a281c6befff09530473100299710860 + checksum: 2ed30daa03145d3cb40fc9b9471314ca4c0761db2dd304f4b5fad74e39ab40e9784e7a69ba8ffb10bc5d44a97e906b0ec0fa02f6fca7c2ad23a923ec16267afd languageName: node linkType: hard -"@polkadot/react-params@^0.91.3-68, @polkadot/react-params@workspace:packages/react-params": +"@polkadot/react-params@^0.91.3-76, @polkadot/react-params@workspace:packages/react-params": version: 0.0.0-use.local resolution: "@polkadot/react-params@workspace:packages/react-params" dependencies: "@babel/runtime": ^7.14.0 - "@polkadot/react-components": ^0.91.3-68 + "@polkadot/react-components": ^0.91.3-76 languageName: unknown linkType: soft -"@polkadot/react-qr@npm:^0.78.2-5": - version: 0.78.2-5 - resolution: "@polkadot/react-qr@npm:0.78.2-5" +"@polkadot/react-qr@npm:^0.78.2-9": + version: 0.78.2-9 + resolution: "@polkadot/react-qr@npm:0.78.2-9" dependencies: "@babel/runtime": ^7.14.0 - "@polkadot/util": ^6.6.1 - "@polkadot/util-crypto": ^6.6.1 + "@polkadot/util": ^6.6.2-8 + "@polkadot/util-crypto": ^6.6.2-8 qrcode-generator: ^1.4.4 react-qr-reader: ^2.2.1 styled-components: ^5.3.0 @@ -2920,11 +2933,11 @@ __metadata: react: "*" react-dom: "*" styled-components: "*" - checksum: d89cac6a72c7243a4f2152ca329bb89fb10faa39ef78bfac28e68329ba0d5b48cfcae58fff85b06787a1a481aab2bb7da60d4c51891da0ccd00f39a5ce636d9c + checksum: 4b6928cdeb49bb4f4ac4501ab13401f86db11d33ff52086eb9b304681dcb6e0673158b14760ec6a90a8d180851c9071a39aa930bfdd17d1fae02ff3c6036bf59 languageName: node linkType: hard -"@polkadot/react-query@^0.91.3-68, @polkadot/react-query@workspace:packages/react-query": +"@polkadot/react-query@^0.91.3-76, @polkadot/react-query@workspace:packages/react-query": version: 0.0.0-use.local resolution: "@polkadot/react-query@workspace:packages/react-query" dependencies: @@ -2932,35 +2945,35 @@ __metadata: languageName: unknown linkType: soft -"@polkadot/react-signer@^0.91.3-68, @polkadot/react-signer@workspace:packages/react-signer": +"@polkadot/react-signer@^0.91.3-76, @polkadot/react-signer@workspace:packages/react-signer": version: 0.0.0-use.local resolution: "@polkadot/react-signer@workspace:packages/react-signer" dependencies: "@babel/runtime": ^7.14.0 - "@polkadot/react-components": ^0.91.3-68 + "@polkadot/react-components": ^0.91.3-76 languageName: unknown linkType: soft -"@polkadot/rpc-core@npm:4.12.2-8": - version: 4.12.2-8 - resolution: "@polkadot/rpc-core@npm:4.12.2-8" +"@polkadot/rpc-core@npm:4.12.2-11": + version: 4.12.2-11 + resolution: "@polkadot/rpc-core@npm:4.12.2-11" dependencies: "@babel/runtime": ^7.14.0 - "@polkadot/metadata": 4.12.2-8 - "@polkadot/rpc-provider": 4.12.2-8 - "@polkadot/types": 4.12.2-8 + "@polkadot/metadata": 4.12.2-11 + "@polkadot/rpc-provider": 4.12.2-11 + "@polkadot/types": 4.12.2-11 "@polkadot/util": ^6.6.1 "@polkadot/x-rxjs": ^6.6.1 - checksum: afb4ae8fa49aa85ca99ba4bfbe5e6ff803c85e3591d3f04a60d727c72d21f9e6228d90ea010fb817ed73c7d487c9f480c096f3c07d18145ce6297bde36e09e49 + checksum: e2e8787a1ce904698be6a609b04292f80c845e089af63c015a8b563273c1a047dd13f4ec3c0b0d5157d3873499cd9b8f9bc2b604918dbc9ce719a184297e2c5a languageName: node linkType: hard -"@polkadot/rpc-provider@npm:4.12.2-8": - version: 4.12.2-8 - resolution: "@polkadot/rpc-provider@npm:4.12.2-8" +"@polkadot/rpc-provider@npm:4.12.2-11": + version: 4.12.2-11 + resolution: "@polkadot/rpc-provider@npm:4.12.2-11" dependencies: "@babel/runtime": ^7.14.0 - "@polkadot/types": 4.12.2-8 + "@polkadot/types": 4.12.2-11 "@polkadot/util": ^6.6.1 "@polkadot/util-crypto": ^6.6.1 "@polkadot/x-fetch": ^6.6.1 @@ -2968,11 +2981,11 @@ __metadata: "@polkadot/x-ws": ^6.6.1 bn.js: ^4.11.9 eventemitter3: ^4.0.7 - checksum: ad6493da3525bb05ce8e005c28f1d2df5124793b4b3f292d83975f4bc8f9f22d4c1a43f9aacd948a46993c744808a1307661548a1bac642d4778e05f202ad7e1 + checksum: fb346a0d56e60805e330221e81ed08c247f1a9ea9ab3c261a75e924cff7df1e6cb0121bdd5cbf8f62ff49d0d240cd47cb7a5bcec7faca8984bb972c7e45df37b languageName: node linkType: hard -"@polkadot/test-support@0.91.3-68, @polkadot/test-support@workspace:packages/test-support": +"@polkadot/test-support@0.91.3-76, @polkadot/test-support@workspace:packages/test-support": version: 0.0.0-use.local resolution: "@polkadot/test-support@workspace:packages/test-support" dependencies: @@ -2983,101 +2996,101 @@ __metadata: languageName: unknown linkType: soft -"@polkadot/ts@npm:^0.3.77": - version: 0.3.77 - resolution: "@polkadot/ts@npm:0.3.77" +"@polkadot/ts@npm:^0.3.78": + version: 0.3.78 + resolution: "@polkadot/ts@npm:0.3.78" dependencies: "@types/chrome": ^0.0.143 - checksum: 80aac67026becbce772df3e324d1e823b968f850a963a51d8bf023368392dc2affbba1287768d9e5560e3d67becec869feaa2851c529583d848a6c0b80f06c39 + checksum: d15417f527022d22e560440d167cfdc8fc2beeda8cbad0b409b65067e0e155ec35ca6b351f69d9e857f418e94aafafc14532499f578dc2234d30a58f87c31f60 languageName: node linkType: hard -"@polkadot/types-known@npm:4.12.2-8": - version: 4.12.2-8 - resolution: "@polkadot/types-known@npm:4.12.2-8" +"@polkadot/types-known@npm:4.12.2-11": + version: 4.12.2-11 + resolution: "@polkadot/types-known@npm:4.12.2-11" dependencies: "@babel/runtime": ^7.14.0 "@polkadot/networks": ^6.6.1 - "@polkadot/types": 4.12.2-8 + "@polkadot/types": 4.12.2-11 "@polkadot/util": ^6.6.1 bn.js: ^4.11.9 - checksum: 19751384f5c667cec3b4f5c33575908b5dcd4fc5dd9b39262fc832523bf588c188606f4fe71ce35edc878d64885a6e199771063691f2d65b13215d5e38577156 + checksum: c0aa15c8d67a4de524494bfdc96889a6f04caf4087bed394208fbdf3691c31e9d959633b6d52e952bd2dd2475737a0958bd29812bcc5aca7f3144feb34ee187e languageName: node linkType: hard -"@polkadot/types@npm:^4.12.2-8": - version: 4.12.2-8 - resolution: "@polkadot/types@npm:4.12.2-8" +"@polkadot/types@npm:^4.12.2-11": + version: 4.12.2-11 + resolution: "@polkadot/types@npm:4.12.2-11" dependencies: "@babel/runtime": ^7.14.0 - "@polkadot/metadata": 4.12.2-8 + "@polkadot/metadata": 4.12.2-11 "@polkadot/util": ^6.6.1 "@polkadot/util-crypto": ^6.6.1 "@polkadot/x-rxjs": ^6.6.1 "@types/bn.js": ^4.11.6 bn.js: ^4.11.9 - checksum: 3e01d10da326c9152d06ff25fd253b4e38b7f9ae98027c94c475cca4019b44c57aabedc217e8a824d7ddf515aa1bda3f9a832727da8c2f1b45982bdf6046627c + checksum: 7a7caadcc70d9b74b9241e4cc27635e3874781b368501aa73718b68950395ffd51d9ae4b98508b925c874d266b68a3ee0bd8d5c19cf738c532585c653a45fd58 languageName: node linkType: hard -"@polkadot/ui-keyring@npm:^0.78.2-5": - version: 0.78.2-5 - resolution: "@polkadot/ui-keyring@npm:0.78.2-5" +"@polkadot/ui-keyring@npm:^0.78.2-9": + version: 0.78.2-9 + resolution: "@polkadot/ui-keyring@npm:0.78.2-9" dependencies: "@babel/runtime": ^7.14.0 - "@polkadot/hw-ledger": ^6.6.1 - "@polkadot/keyring": ^6.6.1 - "@polkadot/ui-settings": 0.78.2-5 - "@polkadot/util": ^6.6.1 - "@polkadot/x-rxjs": ^6.6.1 + "@polkadot/hw-ledger": ^6.6.2-8 + "@polkadot/keyring": ^6.6.2-8 + "@polkadot/ui-settings": 0.78.2-9 + "@polkadot/util": ^6.6.2-8 + "@polkadot/x-rxjs": ^6.6.2-8 mkdirp: ^1.0.4 store: ^2.0.12 peerDependencies: "@polkadot/keyring": "*" "@polkadot/ui-settings": "*" "@polkadot/util": "*" - checksum: 65f4318d395a6f01fc8c94f18af54aa5e1f6a69bd1ea247ebfbec9c364aee74752bb7aae0e2a18b3a2fb8013853a6fb2a66a8411cb887d5ea40bfb12d74f48f8 + checksum: 70fe6c56094b3e801f15805e1aeb1789dbc1c4a33d53565face2825ca6daa5d44282e74c419c12d244af113774f8fb0d347ea1e969f925525b7e4107a48c7cdf languageName: node linkType: hard -"@polkadot/ui-settings@npm:0.78.2-5, @polkadot/ui-settings@npm:^0.78.2-5": - version: 0.78.2-5 - resolution: "@polkadot/ui-settings@npm:0.78.2-5" +"@polkadot/ui-settings@npm:0.78.2-9, @polkadot/ui-settings@npm:^0.78.2-9": + version: 0.78.2-9 + resolution: "@polkadot/ui-settings@npm:0.78.2-9" dependencies: "@babel/runtime": ^7.14.0 - "@polkadot/networks": ^6.6.1 - "@polkadot/util": ^6.6.1 + "@polkadot/networks": ^6.6.2-8 + "@polkadot/util": ^6.6.2-8 eventemitter3: ^4.0.7 store: ^2.0.12 peerDependencies: "@polkadot/networks": "*" "@polkadot/util": "*" - checksum: 77ce415b7f2583ce09a590426973b2cac81d4e6c293151fb81c25cef533794913e0ad49f0cc4a81d398ea467d3b284d8201f2cd7c5a394577f5847b4232daeb8 + checksum: 09514891bf159c03473dff7610a7a4bfe5dcb551df6cf6d9fe65350793cb78c289509b55e8e0f6917ceaecd583b35687b47f4927bf4ff90ae51b82f889b3eda3 languageName: node linkType: hard -"@polkadot/ui-shared@npm:0.78.2-5": - version: 0.78.2-5 - resolution: "@polkadot/ui-shared@npm:0.78.2-5" +"@polkadot/ui-shared@npm:0.78.2-9": + version: 0.78.2-9 + resolution: "@polkadot/ui-shared@npm:0.78.2-9" dependencies: "@babel/runtime": ^7.14.0 color: ^3.1.3 peerDependencies: "@polkadot/util": "*" "@polkadot/util-crypto": "*" - checksum: b8fb61f31fa777b60f5f53263e73f531fbe4e69fec0d7f3a2940a53794685215c639b875cab4425c119d7b8cbb46c9f2a4dded186cdb605bffbac5a0e8f5b198 + checksum: 82d09692d08733f8e59c674bdc1d3a5f6046866806248e976777f115ae6349f868b09cd879918bb7c3e6da72d689f74f21df2091f2361af9f0361440f56a1d47 languageName: node linkType: hard -"@polkadot/util-crypto@npm:^6.6.1": - version: 6.6.1 - resolution: "@polkadot/util-crypto@npm:6.6.1" +"@polkadot/util-crypto@npm:^6.6.2-8": + version: 6.6.2-8 + resolution: "@polkadot/util-crypto@npm:6.6.2-8" dependencies: "@babel/runtime": ^7.14.0 - "@polkadot/networks": 6.6.1 - "@polkadot/util": 6.6.1 + "@polkadot/networks": 6.6.2-8 + "@polkadot/util": 6.6.2-8 "@polkadot/wasm-crypto": ^4.0.2 - "@polkadot/x-randomvalues": 6.6.1 + "@polkadot/x-randomvalues": 6.6.2-8 base-x: ^3.0.8 base64-js: ^1.5.1 blakejs: ^1.1.0 @@ -3090,29 +3103,29 @@ __metadata: tweetnacl: ^1.0.3 xxhashjs: ^0.2.2 peerDependencies: - "@polkadot/util": 6.6.1 - checksum: c933697cea6e8c1a955a2d0480663e526767ca72b9fa4efedd7171e83747bd12cf8b4ff56061f20a2acf1174460cf6fffed66ad8d042fb2c8ab75255b4019bab + "@polkadot/util": 6.6.2-8 + checksum: 6df56d3b845b0aaadb8971ef7d9b6dccd3e181ef12c53be4956d08fbac5272d4e8388ec0c8f6ad2d2864a15af77359ca1dec63c893dc32527989025c8d44d204 languageName: node linkType: hard -"@polkadot/util@npm:^6.6.1": - version: 6.6.1 - resolution: "@polkadot/util@npm:6.6.1" +"@polkadot/util@npm:^6.6.2-8": + version: 6.6.2-8 + resolution: "@polkadot/util@npm:6.6.2-8" dependencies: "@babel/runtime": ^7.14.0 - "@polkadot/x-textdecoder": 6.6.1 - "@polkadot/x-textencoder": 6.6.1 + "@polkadot/x-textdecoder": 6.6.2-8 + "@polkadot/x-textencoder": 6.6.2-8 "@types/bn.js": ^4.11.6 bn.js: ^4.11.9 camelcase: ^5.3.1 ip-regex: ^4.3.0 - checksum: 1536e7806cfdc4a439eee8dc4dffe9337df1e48ce9b2e717478cef6f497be7212756673b71eb00a9c5835e936cdde4931ed993c9b8230916cfde6ff37dd7127e + checksum: 2fedfb79c5aacee6d240d1967a8c00f7afdf4e91d1d87d13fa422d0815842a01e8285063311ac075529afad4de36a3fb1819d623bc08bac61e0fd6a8cc129db7 languageName: node linkType: hard -"@polkadot/vanitygen@npm:^0.36.2-5": - version: 0.36.2-5 - resolution: "@polkadot/vanitygen@npm:0.36.2-5" +"@polkadot/vanitygen@npm:^0.36.2-6": + version: 0.36.2-6 + resolution: "@polkadot/vanitygen@npm:0.36.2-6" dependencies: "@babel/core": ^7.14.3 "@babel/register": ^7.13.16 @@ -3123,7 +3136,7 @@ __metadata: yargs: ^17.0.1 bin: polkadot-js-vanitygen: index.cjs - checksum: 2aa0e2a00a5feb0bb11422802618ff0dbdc2296c0b9d1546bd18e84265d9268e7608df5127263bd1da59fdbfc828944e4f3ed28517cc5c7108001cda1512c782 + checksum: dd56faa811edcea69a715e5492cace0b6452d55d88f17a807c5b7ee760f443ec823a76c12bea027ea7e7c37031656d998bb24c86d36c8a2f553d49b73b0e100c languageName: node linkType: hard @@ -3182,43 +3195,54 @@ __metadata: languageName: node linkType: hard -"@polkadot/x-randomvalues@npm:6.6.1": - version: 6.6.1 - resolution: "@polkadot/x-randomvalues@npm:6.6.1" +"@polkadot/x-global@npm:6.6.2-8": + version: 6.6.2-8 + resolution: "@polkadot/x-global@npm:6.6.2-8" dependencies: "@babel/runtime": ^7.14.0 - "@polkadot/x-global": 6.6.1 - checksum: c07ff6985145b01bed7f798d81dc83836d236c6e0515202c7aecb1a0b763428fdbadad1912b04577decd5bc26977bc815132b23274133dd915aca17d00b67e5e + "@types/node-fetch": ^2.5.10 + node-fetch: ^2.6.1 + checksum: e3dd69c5ce24e24447ab0537ab001d679ee1d075cc8ddba327b01b259cb286d9379faad80e37280cbab49e303ba56994c963ad2c69baf3364dc91661f51816bb languageName: node linkType: hard -"@polkadot/x-rxjs@npm:^6.6.1": - version: 6.6.1 - resolution: "@polkadot/x-rxjs@npm:6.6.1" +"@polkadot/x-randomvalues@npm:6.6.2-8": + version: 6.6.2-8 + resolution: "@polkadot/x-randomvalues@npm:6.6.2-8" + dependencies: + "@babel/runtime": ^7.14.0 + "@polkadot/x-global": 6.6.2-8 + checksum: 0d216e04bd1998f657c5446fdf4190a0a150c10fd6e9e8f79bfa6606a65b0dca3b5eb13155f0f2b33d86e90a2ed56374de96a39c363b6b5c8a12821b3c60e393 + languageName: node + linkType: hard + +"@polkadot/x-rxjs@npm:^6.6.2-8": + version: 6.6.2-8 + resolution: "@polkadot/x-rxjs@npm:6.6.2-8" dependencies: "@babel/runtime": ^7.14.0 rxjs: ^6.6.7 - checksum: 81afb1fe6c177937ec721a648b9b442d25481911de2e2e7fc571d7436f4b3cb2c85d315865953f1ebd0c92425558522d83241659451654dae19a92ea845e5a5d + checksum: 5832e4b1ab0b29c39ea1a316216f573661079d79f42ecfcc7f788d7921bf9f2a1b8bc02f9f84c1d1003678bc23bb58a4c3d9ad23d9a121fe876c43ea9c1f5cf5 languageName: node linkType: hard -"@polkadot/x-textdecoder@npm:6.6.1": - version: 6.6.1 - resolution: "@polkadot/x-textdecoder@npm:6.6.1" +"@polkadot/x-textdecoder@npm:6.6.2-8": + version: 6.6.2-8 + resolution: "@polkadot/x-textdecoder@npm:6.6.2-8" dependencies: "@babel/runtime": ^7.14.0 - "@polkadot/x-global": 6.6.1 - checksum: 8b37b8e101b7efa2db57ac6d87c2743a507cf1d5c9a000cb4b3051a9104c243bbbfc8cff770ad45db0905783511efa7a99e7195c3dfcb882f5b5eb9872423c2e + "@polkadot/x-global": 6.6.2-8 + checksum: 7409bf98dd04c66a23fb357852e6dddfb5a0dff31b3800d26b4c0f103bed940a7ff087eac795ec19b53cc70199d2d4b6d1eb8e3986352ad8b97b76e96ef13cea languageName: node linkType: hard -"@polkadot/x-textencoder@npm:6.6.1": - version: 6.6.1 - resolution: "@polkadot/x-textencoder@npm:6.6.1" +"@polkadot/x-textencoder@npm:6.6.2-8": + version: 6.6.2-8 + resolution: "@polkadot/x-textencoder@npm:6.6.2-8" dependencies: "@babel/runtime": ^7.14.0 - "@polkadot/x-global": 6.6.1 - checksum: 80c01a5bd0dcb76100797d8730a2835d2d835b1c54ce2d641c104edc66fe934a18c69985c80043604e39fdba534b181bc9af14d9e94fadbf45011ab378fbaf8d + "@polkadot/x-global": 6.6.2-8 + checksum: 7f5e90bc478d9bbf5ed2da5e59c96804fc2fbf1c61961be84067175157f5d914e3db13fd68f1ea45e2356bf1e5950e5674663ffdd6d3caa546e26ff14269632d languageName: node linkType: hard @@ -14953,8 +14977,8 @@ fsevents@~2.1.2: "@babel/runtime": ^7.14.0 "@crustio/crust-pin": ^0.0.1 "@pinata/sdk": ^1.1.20 - "@polkadot/dev": ^0.62.29 - "@polkadot/ts": ^0.3.77 + "@polkadot/dev": ^0.62.30 + "@polkadot/ts": ^0.3.78 "@types/bn.js": ^4.11.6 "@types/chart.js": ^2.9.32 "@types/file-saver": ^2.0.2