Enable validator overview (#1872)
* Enable validator overview * CallDiv indicator for consts
This commit is contained in:
parent
c9e9fc55bc
commit
e7e4efebeb
@ -10,10 +10,10 @@
|
||||
"packages/*"
|
||||
],
|
||||
"resolutions": {
|
||||
"@polkadot/api": "^0.97.0-beta.2",
|
||||
"@polkadot/api-contract": "^0.97.0-beta.2",
|
||||
"@polkadot/api": "^0.97.0-beta.3",
|
||||
"@polkadot/api-contract": "^0.97.0-beta.3",
|
||||
"@polkadot/keyring": "^1.7.0-beta.6",
|
||||
"@polkadot/types": "^0.97.0-beta.2",
|
||||
"@polkadot/types": "^0.97.0-beta.3",
|
||||
"@polkadot/util": "^1.7.0-beta.6",
|
||||
"@polkadot/util-crypto": "^1.7.0-beta.6",
|
||||
"babel-core": "^7.0.0-bridge.0",
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.7.1",
|
||||
"@polkadot/api-contract": "^0.97.0-beta.2",
|
||||
"@polkadot/api-contract": "^0.97.0-beta.3",
|
||||
"@polkadot/react-components": "^0.37.0-beta.72"
|
||||
}
|
||||
}
|
||||
|
||||
@ -47,7 +47,7 @@ interface StakingState {
|
||||
const WITH_VALIDATOR_PREFS = { validatorPayment: true };
|
||||
|
||||
function Address ({ address, authorsMap, className, defaultName, filter, isElected, isFavorite, lastAuthors, myAccounts, onFavorite, points, recentlyOnline, stakingInfo, t, withNominations = true }: Props): React.ReactElement<Props> | null {
|
||||
const { isSubstrateV2 } = useContext(ApiContext);
|
||||
const { api, isSubstrateV2 } = useContext(ApiContext);
|
||||
const [extraInfo, setExtraInfo] = useState<[React.ReactNode, React.ReactNode][] | undefined>();
|
||||
const [hasActivity, setHasActivity] = useState(true);
|
||||
const [{ balanceOpts, controllerId, hasNominators, isNominatorMe, nominators, sessionId, stashId }, setStakingState] = useState<StakingState>({
|
||||
@ -123,6 +123,9 @@ function Address ({ address, authorsMap, className, defaultName, filter, isElect
|
||||
const lastBlockNumber = authorsMap[stashId];
|
||||
const isAuthor = lastAuthors && lastAuthors.includes(stashId);
|
||||
const _onFavorite = (): void => onFavorite(stashId);
|
||||
const _onQueryStats = (): void => {
|
||||
window.location.hash = `/staking/query/${stashId}`;
|
||||
};
|
||||
|
||||
return (
|
||||
<AddressCard
|
||||
@ -183,6 +186,15 @@ function Address ({ address, authorsMap, className, defaultName, filter, isElect
|
||||
</>
|
||||
}
|
||||
isDisabled={isSubstrateV2 && !hasActivity}
|
||||
overlay={
|
||||
api.query.imOnline?.authoredBlocks && (
|
||||
<Icon
|
||||
className='staking--stats'
|
||||
name='line graph'
|
||||
onClick={_onQueryStats}
|
||||
/>
|
||||
)
|
||||
}
|
||||
stakingInfo={stakingInfo}
|
||||
value={stashId}
|
||||
withBalance={balanceOpts}
|
||||
@ -275,6 +287,13 @@ export default withMulti(
|
||||
.staking--label.controllerSpacer {
|
||||
margin-top: 0.5rem;
|
||||
}
|
||||
|
||||
.staking--stats {
|
||||
bottom: 0.75rem;
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
right: 0.5rem;
|
||||
}
|
||||
`,
|
||||
translate,
|
||||
withCalls<Props>(
|
||||
|
||||
@ -14,7 +14,7 @@ import Summary from './Summary';
|
||||
|
||||
interface Props extends BareProps, ComponentProps {}
|
||||
|
||||
export default function Overview ({ allControllers, allStashes, recentlyOnline, stakingOverview }: Props): React.ReactElement<Props> {
|
||||
export default function Overview ({ allControllers, allStashes, className, recentlyOnline, stakingOverview }: Props): React.ReactElement<Props> {
|
||||
const { isSubstrateV2 } = useContext(ApiContext);
|
||||
const { byAuthor, lastBlockAuthors, lastBlockNumber } = useContext(BlockAuthorsContext);
|
||||
const [next, setNext] = useState<string[]>([]);
|
||||
@ -31,7 +31,7 @@ export default function Overview ({ allControllers, allStashes, recentlyOnline,
|
||||
}, [allControllers, allStashes, validators]);
|
||||
|
||||
return (
|
||||
<div className='staking--Overview'>
|
||||
<div className={`staking--Overview ${className}`}>
|
||||
<Summary
|
||||
allControllers={allControllers}
|
||||
lastBlock={lastBlockNumber}
|
||||
|
||||
@ -20,16 +20,14 @@ interface Props extends I18nProps {
|
||||
validatorId: string;
|
||||
}
|
||||
|
||||
interface Value {
|
||||
label: string;
|
||||
value: BN;
|
||||
}
|
||||
// assuming 4 hrs sessions, we we grab results for 10 days
|
||||
const SESSIONS = 10 * (24 / 4);
|
||||
|
||||
function getIndexRange (currentIndex: SessionIndex): BN[] {
|
||||
const range: BN[] = [];
|
||||
let thisIndex: BN = currentIndex;
|
||||
|
||||
while (thisIndex.gtn(0) && range.length < 50) {
|
||||
while (thisIndex.gtn(0) && range.length < SESSIONS) {
|
||||
range.push(thisIndex);
|
||||
|
||||
thisIndex = thisIndex.subn(1);
|
||||
@ -40,7 +38,7 @@ function getIndexRange (currentIndex: SessionIndex): BN[] {
|
||||
|
||||
function Validator ({ blockCounts, className, currentIndex, t }: Props): React.ReactElement<Props> {
|
||||
const [labels, setLabels] = useState<string[]>([]);
|
||||
const [values, setValues] = useState<Value[]>([]);
|
||||
const [{ avgSet, idxSet }, setValues] = useState<{ avgSet: number[]; idxSet: BN[] }>({ avgSet: [], idxSet: [] });
|
||||
|
||||
useEffect((): void => {
|
||||
setLabels(
|
||||
@ -50,19 +48,29 @@ function Validator ({ blockCounts, className, currentIndex, t }: Props): React.R
|
||||
|
||||
useEffect((): void => {
|
||||
if (blockCounts) {
|
||||
setValues(
|
||||
blockCounts.map((value, index): Value => ({
|
||||
label: labels[index],
|
||||
value
|
||||
}))
|
||||
);
|
||||
const avgSet: number[] = [];
|
||||
const idxSet: BN[] = [];
|
||||
|
||||
blockCounts.reduce((total: BN, value, index): BN => {
|
||||
total = total.add(value);
|
||||
|
||||
avgSet.push(total.toNumber() / (index + 1));
|
||||
idxSet.push(value);
|
||||
|
||||
return total;
|
||||
}, new BN(0));
|
||||
|
||||
setValues({ avgSet, idxSet });
|
||||
}
|
||||
}, [blockCounts, labels]);
|
||||
|
||||
return (
|
||||
<div className={className}>
|
||||
<h1>{t('blocks per session')}</h1>
|
||||
<Chart.Line values={values} />
|
||||
<Chart.Line
|
||||
labels={labels}
|
||||
legends={[t('blocks'), t('average')]}
|
||||
values={[idxSet, avgSet]} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@ -2,15 +2,17 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { BareProps } from '@polkadot/react-components/types';
|
||||
import { I18nProps } from '@polkadot/react-components/types';
|
||||
import { ComponentProps } from '../types';
|
||||
|
||||
import React from 'react';
|
||||
import React, { useState } from 'react';
|
||||
import { withRouter, RouteComponentProps } from 'react-router-dom';
|
||||
import { Button, InputAddressSimple } from '@polkadot/react-components';
|
||||
|
||||
import translate from '../translate';
|
||||
import Validator from './Validator';
|
||||
|
||||
interface Props extends BareProps, ComponentProps, RouteComponentProps<{}> {
|
||||
interface Props extends I18nProps, ComponentProps, RouteComponentProps<{}> {
|
||||
match: {
|
||||
isExact: boolean;
|
||||
params: {
|
||||
@ -21,17 +23,62 @@ interface Props extends BareProps, ComponentProps, RouteComponentProps<{}> {
|
||||
};
|
||||
}
|
||||
|
||||
function Query ({ stakingOverview, match: { params: { value } } }: Props): React.ReactElement<Props> {
|
||||
if (!stakingOverview) {
|
||||
return <div>loading</div>;
|
||||
}
|
||||
// const _onQuery = (): void => {
|
||||
// if (isValid && value.length !== 0) {
|
||||
// window.location.hash = `/explorer/query/${value}`;
|
||||
// }
|
||||
// };
|
||||
|
||||
// return (
|
||||
// <FilterOverlay className={className}>
|
||||
// <Input
|
||||
// className='explorer--query'
|
||||
// defaultValue={propsValue}
|
||||
// isError={!isValid && value.length !== 0}
|
||||
// placeholder={t('block hash or number to query')}
|
||||
// onChange={_setHash}
|
||||
// onEnter={_onQuery}
|
||||
// withLabel={false}
|
||||
// >
|
||||
// <Button
|
||||
// icon='play'
|
||||
// onClick={_onQuery}
|
||||
// />
|
||||
// </Input>
|
||||
|
||||
function Query ({ className, stakingOverview, match: { params: { value } }, t }: Props): React.ReactElement<Props> {
|
||||
const [validatorId, setValidatorId] = useState<string | null>(value || null);
|
||||
|
||||
const _onQuery = (): void => {
|
||||
if (validatorId) {
|
||||
window.location.hash = `/staking/query/${validatorId}`;
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<Validator
|
||||
currentIndex={stakingOverview.currentIndex}
|
||||
validatorId={value}
|
||||
/>
|
||||
<div className={className}>
|
||||
<InputAddressSimple
|
||||
className='staking--queryInput'
|
||||
defaultValue={value}
|
||||
help={t('Display overview information for the selected validator, including blocks produced.')}
|
||||
label={t('validator to query')}
|
||||
onChange={setValidatorId}
|
||||
onEnter={_onQuery}
|
||||
>
|
||||
<Button
|
||||
icon='play'
|
||||
isDisabled={!validatorId}
|
||||
onClick={_onQuery}
|
||||
/>
|
||||
</InputAddressSimple>
|
||||
{value && stakingOverview && (
|
||||
<Validator
|
||||
currentIndex={stakingOverview.currentIndex}
|
||||
validatorId={value}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default withRouter(Query);
|
||||
export default translate(withRouter(Query));
|
||||
|
||||
@ -9,13 +9,14 @@ import { AccountId, BlockNumber } from '@polkadot/types/interfaces';
|
||||
import { SubjectInfo } from '@polkadot/ui-keyring/observable/types';
|
||||
import { ComponentProps } from './types';
|
||||
|
||||
import React from 'react';
|
||||
import React, { useContext } from 'react';
|
||||
import { Route, Switch } from 'react-router';
|
||||
import { useRouteMatch } from 'react-router-dom';
|
||||
import styled from 'styled-components';
|
||||
import { Option } from '@polkadot/types';
|
||||
import { HelpOverlay } from '@polkadot/react-components';
|
||||
import Tabs from '@polkadot/react-components/Tabs';
|
||||
import { withCalls, withMulti, withObservable } from '@polkadot/react-api';
|
||||
import { ApiContext, withCalls, withMulti, withObservable } from '@polkadot/react-api';
|
||||
import accountObservable from '@polkadot/ui-keyring/observable/accounts';
|
||||
|
||||
import Accounts from './Actions/Accounts';
|
||||
@ -36,7 +37,9 @@ const EMPY_ACCOUNTS: string[] = [];
|
||||
const EMPTY_ALL: [string[], string[]] = [EMPY_ACCOUNTS, EMPY_ACCOUNTS];
|
||||
|
||||
function App ({ allAccounts, allStashesAndControllers: [allStashes, allControllers] = EMPTY_ALL, basePath, className, recentlyOnline, stakingOverview, t }: Props): React.ReactElement<Props> {
|
||||
const _renderComponent = (Component: React.ComponentType<ComponentProps>): () => React.ReactNode => {
|
||||
const { api } = useContext(ApiContext);
|
||||
const routeMatch = useRouteMatch({ path: basePath, strict: true });
|
||||
const _renderComponent = (Component: React.ComponentType<ComponentProps>, className?: string): () => React.ReactNode => {
|
||||
// eslint-disable-next-line react/display-name
|
||||
return (): React.ReactNode => {
|
||||
if (!allAccounts) {
|
||||
@ -48,6 +51,7 @@ function App ({ allAccounts, allStashesAndControllers: [allStashes, allControlle
|
||||
allAccounts={allAccounts}
|
||||
allControllers={allControllers}
|
||||
allStashes={allStashes}
|
||||
className={className}
|
||||
recentlyOnline={recentlyOnline}
|
||||
stakingOverview={stakingOverview}
|
||||
/>
|
||||
@ -63,8 +67,10 @@ function App ({ allAccounts, allStashesAndControllers: [allStashes, allControlle
|
||||
basePath={basePath}
|
||||
hidden={
|
||||
!allAccounts || Object.keys(allAccounts).length === 0
|
||||
? ['actions']
|
||||
: []
|
||||
? ['actions', 'query']
|
||||
: api.query.imOnline?.authoredBlocks
|
||||
? []
|
||||
: ['query']
|
||||
}
|
||||
items={[
|
||||
{
|
||||
@ -75,6 +81,11 @@ function App ({ allAccounts, allStashesAndControllers: [allStashes, allControlle
|
||||
{
|
||||
name: 'actions',
|
||||
text: t('Account actions')
|
||||
},
|
||||
{
|
||||
hasParams: true,
|
||||
name: 'query',
|
||||
text: t('Validator stats')
|
||||
}
|
||||
]}
|
||||
/>
|
||||
@ -82,8 +93,9 @@ function App ({ allAccounts, allStashesAndControllers: [allStashes, allControlle
|
||||
<Switch>
|
||||
<Route path={`${basePath}/actions`} render={_renderComponent(Accounts)} />
|
||||
<Route path={`${basePath}/query/:value`} render={_renderComponent(Query)} />
|
||||
<Route render={_renderComponent(Overview)} />
|
||||
<Route path={`${basePath}/query`} render={_renderComponent(Query)} />
|
||||
</Switch>
|
||||
{_renderComponent(Overview, routeMatch?.isExact ? '' : 'staking--hidden')()}
|
||||
</main>
|
||||
);
|
||||
}
|
||||
@ -93,6 +105,14 @@ export default withMulti(
|
||||
.rx--updated {
|
||||
background: transparent !important;
|
||||
}
|
||||
|
||||
.staking--hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.staking--queryInput {
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
`,
|
||||
translate,
|
||||
withCalls<Props>(
|
||||
|
||||
@ -11,6 +11,7 @@ export interface ComponentProps {
|
||||
allAccounts?: SubjectInfo;
|
||||
allControllers: string[];
|
||||
allStashes: string[];
|
||||
className?: string;
|
||||
recentlyOnline?: DerivedHeartbeats;
|
||||
stakingOverview?: DerivedStakingOverview;
|
||||
}
|
||||
|
||||
@ -86,7 +86,7 @@ function getCachedComponent (query: QueryTypes): CacheInstance {
|
||||
if (isConst) {
|
||||
const { meta, method, section } = key as unknown as ConstValue;
|
||||
|
||||
renderHelper = withCallDiv(`consts.${section}.${method}`);
|
||||
renderHelper = withCallDiv(`consts.${section}.${method}`, { withIndicator: true });
|
||||
type = meta.type.toString();
|
||||
} else {
|
||||
const values: any[] = params.map(({ value }): any => value);
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { ConstantCodec } from '@polkadot/api-metadata/consts/types';
|
||||
import { ConstantCodec } from '@polkadot/metadata/Decorated/types';
|
||||
import { I18nProps } from '@polkadot/react-components/types';
|
||||
import { ConstValue } from '@polkadot/react-components/InputConsts/types';
|
||||
import { ComponentProps } from '../types';
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
"homepage": "https://github.com/polkadot-js/ui/tree/master/packages/ui-reactive#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.7.1",
|
||||
"@polkadot/api": "^0.97.0-beta.2",
|
||||
"@polkadot/api": "^0.97.0-beta.3",
|
||||
"@polkadot/extension-dapp": "^0.14.0-beta.4",
|
||||
"edgeware-node-types": "^1.0.10",
|
||||
"rxjs-compat": "^6.5.3"
|
||||
|
||||
@ -31,6 +31,7 @@ export interface Props extends I18nProps, RowProps {
|
||||
label?: string;
|
||||
accounts_info?: DeriveAccountInfo;
|
||||
noDefaultNameOpacity?: boolean;
|
||||
overlay?: React.ReactNode;
|
||||
stakingInfo?: DerivedStaking;
|
||||
value: AccountId | AccountIndex | Address | string | null;
|
||||
withAddressOrName?: boolean;
|
||||
@ -83,7 +84,7 @@ class AddressRow extends Row<ApiProps & Props, State> {
|
||||
}
|
||||
|
||||
public render (): React.ReactNode {
|
||||
const { accounts_info = {}, className, isContract, isDisabled, isInline, label, style } = this.props;
|
||||
const { accounts_info = {}, className, isContract, isDisabled, isInline, label, overlay, style } = this.props;
|
||||
const { accountId, accountIndex } = accounts_info;
|
||||
const isValid = this.props.isValid || accountId || accountIndex;
|
||||
|
||||
@ -104,6 +105,7 @@ class AddressRow extends Row<ApiProps & Props, State> {
|
||||
{this.renderButtons()}
|
||||
</div>
|
||||
{this.renderChildren()}
|
||||
{overlay}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@ -8,16 +8,12 @@ import BN from 'bn.js';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import ChartJs from 'chart.js';
|
||||
import { Line } from 'react-chartjs-2';
|
||||
import { bnToBn } from '@polkadot/util';
|
||||
|
||||
interface Value {
|
||||
label: string;
|
||||
value: number | BN;
|
||||
}
|
||||
|
||||
interface Props extends BareProps {
|
||||
aspectRatio?: number;
|
||||
values: Value[];
|
||||
labels: string[];
|
||||
legends: string[];
|
||||
values: (number | BN)[][];
|
||||
}
|
||||
|
||||
interface State {
|
||||
@ -26,37 +22,43 @@ interface State {
|
||||
jsonValues?: string;
|
||||
}
|
||||
|
||||
interface Dataset {
|
||||
data: number[];
|
||||
fill: boolean;
|
||||
label: string;
|
||||
backgroundColor: string;
|
||||
borderColor: string;
|
||||
hoverBackgroundColor: string;
|
||||
}
|
||||
|
||||
interface Config {
|
||||
labels: string[];
|
||||
datasets: {
|
||||
data: number[];
|
||||
fill: boolean;
|
||||
backgroundColor: string;
|
||||
borderColor: string;
|
||||
hoverBackgroundColor: string;
|
||||
}[];
|
||||
datasets: Dataset[];
|
||||
}
|
||||
|
||||
const COLORS = ['#ff8c00', '#acacac'];
|
||||
|
||||
const alphaColor = (hexColor: string): string =>
|
||||
ChartJs.helpers.color(hexColor).alpha(0.65).rgbString();
|
||||
|
||||
function calculateOptions (aspectRatio: number, values: Value[], jsonValues: string): State {
|
||||
const chartData = values.reduce((data, { label, value }): Config => {
|
||||
const dataset = data.datasets[0];
|
||||
function calculateOptions (aspectRatio: number, legends: string[], labels: string[], values: (number | BN)[][], jsonValues: string): State {
|
||||
const chartData = values.reduce((config, values, index): Config => {
|
||||
const color = alphaColor(COLORS[index]);
|
||||
const data = values.map((value): number => BN.isBN(value) ? value.toNumber() : value);
|
||||
|
||||
dataset.data.push(bnToBn(value).toNumber());
|
||||
data.labels.push(label);
|
||||
|
||||
return data;
|
||||
}, {
|
||||
labels: [] as string[],
|
||||
datasets: [{
|
||||
data: [] as number[],
|
||||
config.datasets.push({
|
||||
data,
|
||||
fill: false,
|
||||
backgroundColor: alphaColor('#ff8c00'),
|
||||
borderColor: alphaColor('#ff8c00'),
|
||||
hoverBackgroundColor: alphaColor('#ff8c00')
|
||||
}]
|
||||
label: legends[index],
|
||||
backgroundColor: color,
|
||||
borderColor: color,
|
||||
hoverBackgroundColor: color
|
||||
});
|
||||
|
||||
return config;
|
||||
}, {
|
||||
labels,
|
||||
datasets: [] as Dataset[]
|
||||
});
|
||||
|
||||
return {
|
||||
@ -80,16 +82,16 @@ function calculateOptions (aspectRatio: number, values: Value[], jsonValues: str
|
||||
};
|
||||
}
|
||||
|
||||
export default function LineChart ({ aspectRatio = 4, className, style, values }: Props): React.ReactElement<Props> | null {
|
||||
export default function LineChart ({ aspectRatio = 10, className, labels, legends, style, values }: Props): React.ReactElement<Props> | null {
|
||||
const [{ chartData, chartOptions, jsonValues }, setState] = useState<State>({});
|
||||
|
||||
useEffect((): void => {
|
||||
const newJsonValues = JSON.stringify(values);
|
||||
|
||||
if (newJsonValues !== jsonValues) {
|
||||
setState(calculateOptions(aspectRatio, values, newJsonValues));
|
||||
setState(calculateOptions(aspectRatio, legends, labels, values, newJsonValues));
|
||||
}
|
||||
}, [values]);
|
||||
}, [labels, legends, values]);
|
||||
|
||||
if (!chartData) {
|
||||
return null;
|
||||
|
||||
@ -12,13 +12,16 @@ import IdentityIcon from './IdentityIcon';
|
||||
import Input from './Input';
|
||||
|
||||
interface Props extends BareProps {
|
||||
children?: React.ReactNode;
|
||||
defaultValue?: string | null;
|
||||
help?: React.ReactNode;
|
||||
label?: React.ReactNode;
|
||||
onChange?: (address: string | null) => void;
|
||||
onEnter?: () => void;
|
||||
}
|
||||
|
||||
function InputAddressSimple ({ className, help, label, onChange }: Props): React.ReactElement<Props> {
|
||||
const [address, setAddress] = useState<string | null>(null);
|
||||
function InputAddressSimple ({ children, className, defaultValue, help, label, onChange, onEnter }: Props): React.ReactElement<Props> {
|
||||
const [address, setAddress] = useState<string | null>(defaultValue || null);
|
||||
|
||||
const _onChange = (_address: string): void => {
|
||||
const address = addressToAddress(_address) || null;
|
||||
@ -31,11 +34,15 @@ function InputAddressSimple ({ className, help, label, onChange }: Props): React
|
||||
return (
|
||||
<div className={className}>
|
||||
<Input
|
||||
defaultValue={defaultValue}
|
||||
help={help}
|
||||
isError={!address}
|
||||
label={label}
|
||||
onChange={_onChange}
|
||||
/>
|
||||
onEnter={onEnter}
|
||||
>
|
||||
{children}
|
||||
</Input>
|
||||
<IdentityIcon
|
||||
className='ui--InputAddressSimpleIcon'
|
||||
size={32}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { ConstantCodec } from '@polkadot/api-metadata/consts/types';
|
||||
import { ConstantCodec } from '@polkadot/metadata/Decorated/types';
|
||||
import { DropdownOptions } from '../util/types';
|
||||
import { I18nProps } from '../types';
|
||||
import { ConstValue, ConstValueBase } from './types';
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { ConstantCodec } from '@polkadot/api-metadata/consts/types';
|
||||
import { ConstantCodec } from '@polkadot/metadata/Decorated/types';
|
||||
import { DropdownOptions, DropdownOption } from '../../util/types';
|
||||
|
||||
import React from 'react';
|
||||
|
||||
100
yarn.lock
100
yarn.lock
@ -2030,45 +2030,35 @@
|
||||
dependencies:
|
||||
"@types/node" ">= 8"
|
||||
|
||||
"@polkadot/api-contract@^0.97.0-beta.2":
|
||||
version "0.97.0-beta.2"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/api-contract/-/api-contract-0.97.0-beta.2.tgz#50df47306abae1aca8634c7a1da80662ea040c81"
|
||||
integrity sha512-YSPmfrmXQbgvfeIWJKjEafN7mFhOP/9RH98gAQdefcISGYmTKCTIXQGUQ2CJonO/bNuWylXbgeZ9X3ZpgcT3yw==
|
||||
"@polkadot/api-contract@^0.97.0-beta.3":
|
||||
version "0.97.0-beta.3"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/api-contract/-/api-contract-0.97.0-beta.3.tgz#254831a7ebd98bc788b5ec78ca115e4e79315294"
|
||||
integrity sha512-0t8Cx16h9ekQm83+JDZnPraOiSWBLDhoSzEx/lxZmvtbs/jwcmAh1F5mZ3MQgUYiNrsFuaSkcQbNZCWnAhDSDw==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.7.1"
|
||||
"@polkadot/types" "^0.97.0-beta.2"
|
||||
"@polkadot/types" "^0.97.0-beta.3"
|
||||
|
||||
"@polkadot/api-derive@^0.97.0-beta.2":
|
||||
version "0.97.0-beta.2"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/api-derive/-/api-derive-0.97.0-beta.2.tgz#8d784938bd9f84eb9a050dbea1b91787a4a8bb2f"
|
||||
integrity sha512-urBDQvfH1zmtZkiPG7vQdbYX5bhJqx5qZ9GO7GiQPhdaumopM1Hgcddw2w9WzLOVB/iQqkf6y1JXJQA6GrcC5Q==
|
||||
"@polkadot/api-derive@^0.97.0-beta.3":
|
||||
version "0.97.0-beta.3"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/api-derive/-/api-derive-0.97.0-beta.3.tgz#b6bc465e5d40f1154428dc3ee3a2dda5ff9ad4d0"
|
||||
integrity sha512-s8I2V+hAufzh/KizOHz9OZ/WbBZccxaU7GCw10gUJNadPDwL46bEAwmcxSWi4CbZk3dEK7+V32zumF3ZQ2mukA==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.7.1"
|
||||
"@polkadot/api" "^0.97.0-beta.2"
|
||||
"@polkadot/types" "^0.97.0-beta.2"
|
||||
"@polkadot/api" "^0.97.0-beta.3"
|
||||
"@polkadot/types" "^0.97.0-beta.3"
|
||||
|
||||
"@polkadot/api-metadata@^0.97.0-beta.2":
|
||||
version "0.97.0-beta.2"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/api-metadata/-/api-metadata-0.97.0-beta.2.tgz#518a896d0c53042241191b98c7e61761da063956"
|
||||
integrity sha512-/0PiQ1B1KiUTF8uJ3lczdNyMGctKSvE0w8Ddcy8svc7Wp7nxpU8fZx+WIK8yeyzqvfZJ2vVcYgmPdal54i8dow==
|
||||
"@polkadot/api@^0.97.0-beta.3":
|
||||
version "0.97.0-beta.3"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/api/-/api-0.97.0-beta.3.tgz#096200d0afe8ca751135402368979605114c8bb2"
|
||||
integrity sha512-sLPt+w3pqvhGzQV33cQlHPJSFXZjl4HASari4n7986SXNwfwvznAP8NlzCtm6bKCC4oC1p+kc9AgY9AH7pzgUA==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.7.1"
|
||||
"@polkadot/types" "^0.97.0-beta.2"
|
||||
"@polkadot/util" "^1.7.0-beta.6"
|
||||
"@polkadot/util-crypto" "^1.7.0-beta.6"
|
||||
|
||||
"@polkadot/api@^0.97.0-beta.2":
|
||||
version "0.97.0-beta.2"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/api/-/api-0.97.0-beta.2.tgz#839760529e4a6ac9244edce884e7cb4f6a6f92b6"
|
||||
integrity sha512-jF+10ifwnMPBEe/1S9+hBX/kJS2ONLlQ5JOWaykYtgLT1cjbt+WGLl4DxTSaPfCDVsl+6dj03F0xrmFomIrYNg==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.7.1"
|
||||
"@polkadot/api-derive" "^0.97.0-beta.2"
|
||||
"@polkadot/api-metadata" "^0.97.0-beta.2"
|
||||
"@polkadot/api-derive" "^0.97.0-beta.3"
|
||||
"@polkadot/keyring" "^1.7.0-beta.6"
|
||||
"@polkadot/rpc-core" "^0.97.0-beta.2"
|
||||
"@polkadot/rpc-provider" "^0.97.0-beta.2"
|
||||
"@polkadot/types" "^0.97.0-beta.2"
|
||||
"@polkadot/metadata" "^0.97.0-beta.3"
|
||||
"@polkadot/rpc-core" "^0.97.0-beta.3"
|
||||
"@polkadot/rpc-provider" "^0.97.0-beta.3"
|
||||
"@polkadot/types" "^0.97.0-beta.3"
|
||||
"@polkadot/util-crypto" "^1.7.0-beta.6"
|
||||
|
||||
"@polkadot/dev-react@^0.32.0-beta.13":
|
||||
@ -2171,10 +2161,10 @@
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.7.1"
|
||||
|
||||
"@polkadot/jsonrpc@^0.97.0-beta.2":
|
||||
version "0.97.0-beta.2"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/jsonrpc/-/jsonrpc-0.97.0-beta.2.tgz#a9a1190db828a9a68a2967d2a55e3e0a30598e6f"
|
||||
integrity sha512-pU4C6LW2IiDWRjB31F4zlG1YKE+Fxwine1Kl3lAhdOjcREoC2jQesBKfzjZyWMBCjM2dLeyOHpl2WMWHIYdWzw==
|
||||
"@polkadot/jsonrpc@^0.97.0-beta.3":
|
||||
version "0.97.0-beta.3"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/jsonrpc/-/jsonrpc-0.97.0-beta.3.tgz#358dde1388a511dbfe232aa128c3e89c8928900f"
|
||||
integrity sha512-laL7SwVNitXmygHWZYmDMLONDO/SnII+0hqeIcy4DGvLGwt1XWyqUiv8Vkqwo9mgAboFAS05PgN3SsVmJItpFg==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.7.1"
|
||||
|
||||
@ -2187,6 +2177,16 @@
|
||||
"@polkadot/util" "^1.7.0-beta.6"
|
||||
"@polkadot/util-crypto" "^1.7.0-beta.6"
|
||||
|
||||
"@polkadot/metadata@^0.97.0-beta.3":
|
||||
version "0.97.0-beta.3"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/metadata/-/metadata-0.97.0-beta.3.tgz#66108239c342b8bce096b933596fa6ff75552597"
|
||||
integrity sha512-GBHrLoE9DRVUctUhumMbp/xW441MHNkcUoiByjVvr1g0TtuZbgvTjC63uxJby98xeIIv63TCHKIoGs5xanztQg==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.7.1"
|
||||
"@polkadot/types" "^0.97.0-beta.3"
|
||||
"@polkadot/util" "^1.7.0-beta.6"
|
||||
"@polkadot/util-crypto" "^1.7.0-beta.6"
|
||||
|
||||
"@polkadot/react-identicon@^0.47.0-beta.5":
|
||||
version "0.47.0-beta.5"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/react-identicon/-/react-identicon-0.47.0-beta.5.tgz#705436ffcaa15b1bc0ae966dfd5361abe8a82892"
|
||||
@ -2212,25 +2212,25 @@
|
||||
qrcode-generator "^1.4.4"
|
||||
react-qr-reader "^2.2.1"
|
||||
|
||||
"@polkadot/rpc-core@^0.97.0-beta.2":
|
||||
version "0.97.0-beta.2"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/rpc-core/-/rpc-core-0.97.0-beta.2.tgz#035a72d84e85e97e30996a331d50646d0b868dc8"
|
||||
integrity sha512-fHUgx6Q4QJWG/b8kIsiy3vMMQn4Z+Zf2Jagr/0S7DggyDaIcvUFiolqLTQNM+qNXsOBhN2rJDlUMxNdLhCYN7Q==
|
||||
"@polkadot/rpc-core@^0.97.0-beta.3":
|
||||
version "0.97.0-beta.3"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/rpc-core/-/rpc-core-0.97.0-beta.3.tgz#8374f63fa391882cb6748dd92b9cddfb5f6cd98a"
|
||||
integrity sha512-ebNuz4AtHj5DHdBtV1lXxGM07WJIAPUBRrbHqaKN4VcLXoimNtAxcQdXfzWeN4TP1MhdjGko7Xe1ZoNXBn8jwQ==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.7.1"
|
||||
"@polkadot/jsonrpc" "^0.97.0-beta.2"
|
||||
"@polkadot/rpc-provider" "^0.97.0-beta.2"
|
||||
"@polkadot/types" "^0.97.0-beta.2"
|
||||
"@polkadot/jsonrpc" "^0.97.0-beta.3"
|
||||
"@polkadot/rpc-provider" "^0.97.0-beta.3"
|
||||
"@polkadot/types" "^0.97.0-beta.3"
|
||||
"@polkadot/util" "^1.7.0-beta.6"
|
||||
rxjs "^6.5.3"
|
||||
|
||||
"@polkadot/rpc-provider@^0.97.0-beta.2":
|
||||
version "0.97.0-beta.2"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/rpc-provider/-/rpc-provider-0.97.0-beta.2.tgz#7951ffc927a9e86b47b51593ff66011d82a56306"
|
||||
integrity sha512-83Ai2++CTCURBkEhPzYoT6La9Q4nx488q3ekKD+yOFqSXrCIsBJrVZen3cKpSNkxsRllNGEEFY4o6eqa6JIWMw==
|
||||
"@polkadot/rpc-provider@^0.97.0-beta.3":
|
||||
version "0.97.0-beta.3"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/rpc-provider/-/rpc-provider-0.97.0-beta.3.tgz#492ad6f98a46d8247c56b4db15ca5e957c4e9396"
|
||||
integrity sha512-Z+G0O0InPUV4eJuuAkgBLG09Q5ZxAANIVH3ywr7IgCEHfg8y4+ZekXfI+hXFjvpLICPjc5RqEtwVWSpfIwEhQg==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.7.1"
|
||||
"@polkadot/api-metadata" "^0.97.0-beta.2"
|
||||
"@polkadot/metadata" "^0.97.0-beta.3"
|
||||
"@polkadot/util" "^1.7.0-beta.6"
|
||||
"@polkadot/util-crypto" "^1.7.0-beta.6"
|
||||
eventemitter3 "^4.0.0"
|
||||
@ -2244,10 +2244,10 @@
|
||||
dependencies:
|
||||
"@types/chrome" "^0.0.91"
|
||||
|
||||
"@polkadot/types@^0.97.0-beta.2":
|
||||
version "0.97.0-beta.2"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/types/-/types-0.97.0-beta.2.tgz#181a481a62da478b2848c335ea34490177397ed1"
|
||||
integrity sha512-LSlmDAG778cfZ2r7uF2wy+aEDWc+17J6PHJwHElgJQAwFdmsRuDrilpCIwrCRBASI8lGXq3I88w+z3WkraYyWA==
|
||||
"@polkadot/types@^0.97.0-beta.3":
|
||||
version "0.97.0-beta.3"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/types/-/types-0.97.0-beta.3.tgz#8cbb0626ef4192c99ea364a84969ab4878f9a14b"
|
||||
integrity sha512-7AdPa+y8A5hpDg8dJd0DFN2jZ1TeVrxLhIVnHJER+UE42XqAw5IHiw4bHFvJ+HPTxa8Nj1Aeg45J7shkLS1EiA==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.7.1"
|
||||
"@polkadot/util" "^1.7.0-beta.6"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user