Merge branch 'master' into jg-para-relay
This commit is contained in:
commit
210aed00c5
2
.github/workflows/stale.yml
vendored
2
.github/workflows/stale.yml
vendored
@ -1,7 +1,7 @@
|
||||
name: 'Close stale issues and PRs'
|
||||
on:
|
||||
schedule:
|
||||
- cron: cron: '2 2 * * *'
|
||||
- cron: '2 2 * * *'
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
|
||||
26
package.json
26
package.json
@ -6,24 +6,24 @@
|
||||
"author": "Jaco Greeff <jacogr@gmail.com>",
|
||||
"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",
|
||||
|
||||
@ -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",
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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'
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@ -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")
|
||||
//
|
||||
|
||||
@ -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<string, string>;
|
||||
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;
|
||||
}
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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';
|
||||
|
||||
|
||||
@ -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';
|
||||
|
||||
|
||||
@ -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';
|
||||
|
||||
|
||||
@ -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';
|
||||
|
||||
|
||||
@ -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';
|
||||
|
||||
|
||||
@ -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';
|
||||
|
||||
|
||||
@ -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';
|
||||
|
||||
|
||||
@ -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' };
|
||||
|
||||
@ -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<string, string> = [
|
||||
['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<string, string> = [
|
||||
['Encointer Node', nodeEncointerNotee],
|
||||
['Encointer Node noTEE', nodeEncointerNotee],
|
||||
['Encointer Node TEE proxy', nodeEncointerTeeproxy],
|
||||
['Equilibrium node', nodeEquilibrium],
|
||||
['Galital', nodeGalital],
|
||||
['Galital Parachain Collator', nodeGalital],
|
||||
['GamePower Node', nodeGamePower],
|
||||
|
||||
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |
7
packages/apps-config/src/ui/logos/chains/genshiro.svg
Normal file
7
packages/apps-config/src/ui/logos/chains/genshiro.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 15 KiB |
@ -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<string, unknown> = [
|
||||
['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<string, unknown> = [
|
||||
['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<string, unknown> = {
|
||||
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<string, unknown> = {
|
||||
rococoDataHighway: nodeDataHighway,
|
||||
rococoEave: nodeEave,
|
||||
rococoEncointer: nodeEncointerNotee,
|
||||
rococoEquilibrium: nodeEquilibrium,
|
||||
rococoGalital: nodeGalital,
|
||||
rococoHydrate: chainHydrate,
|
||||
rococoIdavoll: nodeIdavoll,
|
||||
|
||||
@ -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"
|
||||
},
|
||||
|
||||
@ -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"
|
||||
|
||||
@ -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"
|
||||
},
|
||||
|
||||
@ -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' };
|
||||
|
||||
@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@ -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';
|
||||
|
||||
|
||||
@ -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';
|
||||
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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<Props> {
|
||||
const { t } = useTranslation();
|
||||
const { api } = useApi();
|
||||
const { allAccounts } = useAccounts();
|
||||
const [{ callData, callError }, setCallData] = useState<CallData>(EMPTY_CALL);
|
||||
const [callHex, setCallHex] = useState<string>('');
|
||||
const [{ callData, callError, callInfo }, setCallData] = useState<CallData>(EMPTY_CALL);
|
||||
const [callWeight] = useWeight(callData);
|
||||
const [hash, setHash] = useState<string | null>(ongoing[0][0].toHex());
|
||||
const [{ isMultiCall, multisig }, setMultisig] = useState<MultiInfo>({ 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 && (
|
||||
<Modal.Columns hint={t('The call data for this transaction matching the hash. Once sent, the multisig will be executed against this.')}>
|
||||
<Input
|
||||
autoFocus
|
||||
help={t('For final approvals, the actual full call data is required to execute the transaction')}
|
||||
isError={!callData}
|
||||
label={t('call data for final approval')}
|
||||
onChange={_setCallData}
|
||||
/>
|
||||
{callData && callInfo
|
||||
? (
|
||||
<Expander
|
||||
isPadded
|
||||
summary={`${callInfo.section}.${callInfo.method}`}
|
||||
summaryMeta={callInfo.meta}
|
||||
>
|
||||
<CallDisplay
|
||||
className='details'
|
||||
value={callData}
|
||||
/>
|
||||
</Expander>
|
||||
)
|
||||
: (
|
||||
<Input
|
||||
autoFocus
|
||||
help={t('For final approvals, the actual full call data is required to execute the transaction')}
|
||||
isError={!callHex || !!callError}
|
||||
label={t('call data for final approval')}
|
||||
onChange={setCallHex}
|
||||
/>
|
||||
)}
|
||||
{callError && (
|
||||
<MarkError content={callError} />
|
||||
)}
|
||||
|
||||
@ -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';
|
||||
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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';
|
||||
|
||||
|
||||
@ -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": {
|
||||
|
||||
@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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)));
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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());
|
||||
|
||||
@ -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());
|
||||
}
|
||||
|
||||
@ -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';
|
||||
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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';
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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: (
|
||||
<div
|
||||
className='ui--Dropdown-item'
|
||||
key={paraId}
|
||||
>
|
||||
<ChainImg
|
||||
className='ui--Dropdown-icon'
|
||||
logo={info}
|
||||
/>
|
||||
<div className='ui--Dropdown-name'>{text}</div>
|
||||
</div>
|
||||
),
|
||||
value: paraId || index
|
||||
};
|
||||
}
|
||||
|
||||
function Teleport ({ onClose }: Props): React.ReactElement<Props> | null {
|
||||
const { t } = useTranslation();
|
||||
@ -31,7 +52,7 @@ function Teleport ({ onClose }: Props): React.ReactElement<Props> | null {
|
||||
const { allowTeleport, destinations, isParachain } = useTeleport();
|
||||
|
||||
const chainOpts = useMemo(
|
||||
() => destinations.map(({ paraId, text }, index) => ({ text, value: paraId || index })),
|
||||
() => destinations.map(createOption),
|
||||
[destinations]
|
||||
);
|
||||
|
||||
|
||||
@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@ -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';
|
||||
|
||||
|
||||
@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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';
|
||||
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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<string, Balance>;
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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';
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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';
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user