Update dependencies, cleanup app-rpc results (#55)

* Align with upstream types

* Fix app-rpc outputs
This commit is contained in:
Jaco Greeff 2018-05-24 18:04:49 +02:00 committed by GitHub
parent 917cfeba97
commit 99b188bf5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
42 changed files with 465 additions and 320 deletions

View File

@ -12,10 +12,10 @@
},
"dependencies": {
"@babel/runtime": "^7.0.0-beta.47",
"@polkadot/primitives": "^0.15.8",
"@polkadot/primitives-codec": "^0.15.8",
"@polkadot/primitives-json": "^0.15.8",
"@polkadot/primitives": "^0.16.5",
"@polkadot/primitives-codec": "^0.16.5",
"@polkadot/primitives-json": "^0.16.5",
"@polkadot/ui-app": "^0.6.4",
"@polkadot/util-crypto": "^0.21.3"
"@polkadot/util-crypto": "^0.22.1"
}
}

View File

@ -7,12 +7,12 @@ import type { Header } from '@polkadot/primitives/header';
import headerHash from '@polkadot/primitives-codec/header/hash';
import withApiDiv from '@polkadot/ui-react-rx/with/apiDiv';
import u8aToHexShort from '@polkadot/util/u8a/toHexShort';
import u8aToHex from '@polkadot/util/u8a/toHex';
export default withApiDiv({ name: 'newHead', section: 'chain' })(
(value?: Header): ?string => {
return value
? u8aToHexShort(headerHash(value))
? u8aToHex(headerHash(value), 64)
: value;
},
{ className: 'explorer--BestHash' }

View File

@ -12,8 +12,8 @@
},
"dependencies": {
"@babel/runtime": "^7.0.0-beta.47",
"@polkadot/extrinsics": "^0.15.8",
"@polkadot/extrinsics-codec": "^0.15.8",
"@polkadot/extrinsics": "^0.16.5",
"@polkadot/extrinsics-codec": "^0.16.5",
"@polkadot/ui-app": "^0.6.4",
"@polkadot/ui-signer": "^0.6.4",
"react-dropzone": "^4.2.9"

View File

@ -3,7 +3,7 @@
// of the ISC license. See the LICENSE file for details.
// @flow
import type { Extrinsic } from '@polkadot/extrinsics/types';
import type { Extrinsic$Method } from '@polkadot/extrinsics/types';
import type { BareProps } from '@polkadot/ui-app/types';
import type { RawParam } from '@polkadot/ui-app/Params/types';
import type { EncodedMessage } from '@polkadot/ui-signer/types';
@ -19,7 +19,7 @@ import isUndefined from '@polkadot/util/is/undefined';
import paramComponents from './Params';
type Props = BareProps & {
defaultValue: Extrinsic,
defaultValue: Extrinsic$Method,
isError?: boolean,
isPrivate?: boolean,
labelMethod?: string,
@ -28,7 +28,7 @@ type Props = BareProps & {
};
type State = {
extrinsic: Extrinsic,
extrinsic: Extrinsic$Method,
values: Array<RawParam>
};
@ -92,7 +92,7 @@ export default class ExtrinsicDisplay extends React.PureComponent<Props, State>
});
}
onChangeExtrinsic = (extrinsic: Extrinsic): void => {
onChangeExtrinsic = (extrinsic: Extrinsic$Method): void => {
this.nextState({ extrinsic });
};

View File

@ -11,7 +11,7 @@ import extrinsics from '@polkadot/extrinsics-substrate';
import Extrinsic from './Extrinsic';
const defaultValue = extrinsics.staking.methods.public.transfer;
const defaultValue = extrinsics.staking.public.transfer;
export default function Call ({ className, isDisabled, isError, label, onChange, style, withLabel }: Props): React$Node {
return (

View File

@ -3,7 +3,7 @@
// of the ISC license. See the LICENSE file for details.
// @flow
import type { Extrinsic } from '@polkadot/extrinsics/types';
import type { Extrinsic$Method } from '@polkadot/extrinsics/types';
import type { I18nProps } from '@polkadot/ui-app/types';
import type { RawParam$OnChange } from '@polkadot/ui-app/Params/types';
import type { EncodedMessage } from '@polkadot/ui-signer/types';
@ -14,7 +14,7 @@ import BaseExtrinsic from '../Extrinsic';
import translate from '../translate';
type Props = I18nProps & {
defaultValue: Extrinsic,
defaultValue: Extrinsic$Method,
isDisabled: boolean,
isError: boolean,
isPrivate: boolean,
@ -23,7 +23,7 @@ type Props = I18nProps & {
withLabel?: boolean,
};
class CExtrinsic extends React.PureComponent<Props> {
class Extrinsic extends React.PureComponent<Props> {
render (): React$Node {
const { className, defaultValue, isDisabled, isError, isPrivate, label, style, t, withLabel } = this.props;
@ -64,4 +64,4 @@ class CExtrinsic extends React.PureComponent<Props> {
}
}
export default translate(CExtrinsic);
export default translate(Extrinsic);

View File

@ -11,7 +11,7 @@ import extrinsics from '@polkadot/extrinsics-substrate';
import Extrinsic from './Extrinsic';
const defaultValue = extrinsics.consensus.methods.private.setCode;
const defaultValue = extrinsics.consensus.private.setCode;
export default function Proposal ({ className, isDisabled, isError, label, onChange, style, withLabel }: Props): React$Node {
return (

View File

@ -30,7 +30,7 @@ type State = {
publicKey: Uint8Array
};
const defaultExtrinsic = extrinsics.staking.methods.public.transfer;
const defaultExtrinsic = extrinsics.staking.public.transfer;
const defaultRpc = rpc.author.methods.submitExtrinsic;
class Selection extends React.PureComponent<Props, State> {

View File

@ -12,6 +12,8 @@ import Output from '@polkadot/ui-app/Output';
import classes from '@polkadot/ui-app/util/classes';
import isUndefined from '@polkadot/util/is/undefined';
import resultToText from './resultToText';
type Props = BareProps & {
queue: Array<QueueTx>
};
@ -40,7 +42,7 @@ export default function Results ({ className, queue = [], style }: Props): React
value={
error
? error.message
: result
: resultToText(result)
}
/>
))}

View File

@ -3,7 +3,7 @@
// of the ISC license. See the LICENSE file for details.
// @flow
import type { InterfaceMethodDefinition } from '@polkadot/jsonrpc/types';
import type { Interface$Method } from '@polkadot/jsonrpc/types';
import type { RawParam } from '@polkadot/ui-app/Params/types';
import type { I18nProps } from '@polkadot/ui-app/types';
import type { QueueTx$MessageAdd } from '@polkadot/ui-signer/types';
@ -31,7 +31,7 @@ type State = {
isValid: boolean,
nonce: BN,
publicKey?: Uint8Array | null,
rpc: InterfaceMethodDefinition,
rpc: Interface$Method,
values: Array<RawParam>
}
@ -116,7 +116,7 @@ class Selection extends React.PureComponent<Props, State> {
this.nextState({ nonce, publicKey });
}
onChangeMethod = (rpc: InterfaceMethodDefinition): void => {
onChangeMethod = (rpc: Interface$Method): void => {
this.nextState({ rpc });
}

View File

@ -0,0 +1,49 @@
// Copyright 2017-2018 Jaco Greeff
// This software may be modified and distributed under the terms
// of the ISC license. See the LICENSE file for details.
// @flow
import bnToHex from '@polkadot/util/bn/toHex';
import u8aToHex from '@polkadot/util/u8a/toHex';
import isBn from '@polkadot/util/is/bn';
import isObject from '@polkadot/util/is/object';
import isU8a from '@polkadot/util/is/u8a';
function resultToText (result: mixed): mixed {
if (isU8a(result)) {
// $FlowFixMe type has been determined
return u8aToHex(result);
}
if (isBn(result)) {
// $FlowFixMe type has been determined
return bnToHex(result);
}
if (Array.isArray(result)) {
return result.map((value) =>
resultToText(value)
);
}
if (isObject(result)) {
return JSON
.stringify(
// $FlowFixMe type has been determined
Object
.keys(result)
.reduce((map, key) => {
// $FlowFixMe type has been determined
map[key] = resultToText(result[key]);
return map;
}, {})
)
.replace(/\\"/g, '"')
.replace(/":"/g, '": "');
}
return result;
}
export default resultToText;

View File

@ -3,7 +3,7 @@
// of the ISC license. See the LICENSE file for details.
// @flow
import type { StorageDef$Key } from '@polkadot/storage/types';
import type { Storage$Key } from '@polkadot/storage/types';
import type { I18nProps } from '@polkadot/ui-app/types';
import type { RawParams } from '@polkadot/ui-app/Params/types';
import type { StorageQuery } from './types';
@ -26,7 +26,7 @@ type Props = I18nProps & {
type State = {
isValid: boolean,
key: StorageDef$Key,
key: Storage$Key,
params: RawParams
};
@ -105,7 +105,7 @@ class Selection extends React.PureComponent<Props, State> {
});
}
onChangeKey = (key: StorageDef$Key): void => {
onChangeKey = (key: Storage$Key): void => {
this.nextState({ key });
}

View File

@ -3,11 +3,11 @@
// of the ISC license. See the LICENSE file for details.
// @flow
import type { StorageDef$Key } from '@polkadot/storage/types';
import type { Storage$Key } from '@polkadot/storage/types';
export type StorageQuery = {
id: number,
key: StorageDef$Key,
key: Storage$Key,
// flowlint-next-line unclear-type:off
params: Array<any>
}

View File

@ -1 +0,0 @@
SKIP_PREFLIGHT_CHECK=true

View File

@ -1 +1 @@
# @polkadot/portal
# @polkadot/apps

View File

@ -12,14 +12,14 @@
},
"dependencies": {
"@babel/runtime": "^7.0.0-beta.47",
"@polkadot/extrinsics-substrate": "^0.15.8",
"@polkadot/params": "^0.15.8",
"@polkadot/primitives": "^0.15.8",
"@polkadot/storage-substrate": "^0.15.8",
"@polkadot/extrinsics-substrate": "^0.16.5",
"@polkadot/params": "^0.16.5",
"@polkadot/primitives": "^0.16.5",
"@polkadot/storage-substrate": "^0.16.5",
"@polkadot/ui-keyring": "^0.6.4",
"@polkadot/ui-react": "^0.13.4",
"@polkadot/ui-react-rx": "^0.13.4",
"@polkadot/util": "^0.21.3",
"@polkadot/ui-react": "^0.13.6",
"@polkadot/ui-react-rx": "^0.13.6",
"@polkadot/util": "^0.22.1",
"i18next": "^11.1.1",
"i18next-browser-languagedetector": "^2.2.0",
"i18next-xhr-backend": "^1.5.1",

View File

@ -3,8 +3,9 @@
// of the ISC license. See the LICENSE file for details.
// @flow
import type { Extrinsic } from '@polkadot/extrinsics/types';
import type { Extrinsic$Method } from '@polkadot/extrinsics/types';
import type { I18nProps } from '../types';
import type { DropdownOptions } from './types';
import React from 'react';
@ -13,27 +14,24 @@ import extrinsics from '@polkadot/extrinsics-substrate';
import Dropdown from '../Dropdown';
import classes from '../util/classes';
import translate from '../translate';
import createOptions from './options/method';
type Props = I18nProps & {
isError?: boolean,
label?: string,
onChange: (value: Extrinsic) => void,
onChange: (value: Extrinsic$Method) => void,
options: DropdownOptions,
type: 'private' | 'public',
value: Extrinsic,
value: Extrinsic$Method,
withLabel?: boolean
};
function SelectMethod ({ className, isError, label = '', onChange, style, t, type, value: { name, section }, withLabel }: Props): React$Node {
// $FlowFixMe string vs ...
if (!extrinsics[section]) {
function SelectMethod ({ className, isError, label = '', onChange, options, style, t, type, value: { name, section }, withLabel }: Props): React$Node {
if (!options.length) {
return null;
}
const methods = extrinsics[section].methods[type];
const transform = (name: string): Extrinsic =>
methods[name];
const options = createOptions(section, type);
const transform = (name: string): Extrinsic$Method =>
extrinsics[section][type][name];
return (
<Dropdown

View File

@ -3,29 +3,27 @@
// of the ISC license. See the LICENSE file for details.
// @flow
import type { Extrinsic, ExtrinsicSectionName } from '@polkadot/extrinsics/types';
import type { Extrinsic$Method, Extrinsic$Sections } from '@polkadot/extrinsics/types';
import type { I18nProps } from '../types';
import type { DropdownOptions } from './types';
import React from 'react';
import Dropdown from '../Dropdown';
import classes from '../util/classes';
import translate from '../translate';
import createOptions from './options/section';
type Props = I18nProps & {
defaultValue?: ExtrinsicSectionName,
defaultValue?: Extrinsic$Sections,
isError?: boolean,
label?: string,
onChange: (value: ExtrinsicSectionName) => void,
type: 'private' | 'public',
value: Extrinsic,
onChange: (value: Extrinsic$Sections) => void,
options: DropdownOptions,
value: Extrinsic$Method,
withLabel?: boolean
};
function SelectSection ({ className, defaultValue, isError, label = '', onChange, style, t, type, value: { section }, withLabel }: Props): React$Node {
const options = createOptions(type);
function SelectSection ({ className, defaultValue, isError, label = '', onChange, options, style, t, value: { section }, withLabel }: Props): React$Node {
return (
<Dropdown
className={classes('ui--DropdownLinked-Sections', className)}

View File

@ -5,8 +5,9 @@
// TODO: We have a lot shared between this and InputStorage
import type { Extrinsic, ExtrinsicSectionName } from '@polkadot/extrinsics/types';
import type { Extrinsic$Method, Extrinsic$Sections } from '@polkadot/extrinsics/types';
import type { I18nProps } from '../types';
import type { DropdownOptions } from './types';
import './InputExtrinsic.css';
@ -18,19 +19,23 @@ import translate from '../translate';
import SelectMethod from './SelectMethod';
import SelectSection from './SelectSection';
import methodOptions from './options/method';
import sectionOptions from './options/section';
type Props = I18nProps & {
defaultValue: Extrinsic,
defaultValue: Extrinsic$Method,
isError?: boolean,
isPrivate?: boolean,
labelMethod?: string,
labelSection?: string,
onChange: (value: Extrinsic) => void,
onChange: (value: Extrinsic$Method) => void,
withLabel?: boolean
};
type State = {
value: Extrinsic
optionsMethod: DropdownOptions,
optionsSection: DropdownOptions,
type: 'private' | 'public',
value: Extrinsic$Method
};
class InputExtrinsic extends React.PureComponent<Props, State> {
@ -39,15 +44,28 @@ class InputExtrinsic extends React.PureComponent<Props, State> {
constructor (props: Props) {
super(props);
this.state = {
this.state = ({
value: this.props.defaultValue
}: $Shape<State>);
}
static getDerivedStateFromProps ({ isPrivate = false }: Props, { type, value: { section } }: State): $Shape<State> {
const newType = isPrivate ? 'private' : 'public';
if (newType === type) {
return null;
}
return {
optionsMethod: methodOptions(section, newType),
optionsSection: sectionOptions(newType),
type: newType
};
}
render (): React$Node {
const { className, isPrivate = false, labelMethod, labelSection, style, withLabel } = this.props;
const { value } = this.state;
const type = isPrivate ? 'private' : 'public';
const { className, labelMethod, labelSection, style, withLabel } = this.props;
const { optionsMethod, optionsSection, type, value } = this.state;
return (
<div
@ -58,7 +76,7 @@ class InputExtrinsic extends React.PureComponent<Props, State> {
className='small'
label={labelSection}
onChange={this.onSectionChange}
type={type}
options={optionsSection}
value={value}
withLabel={withLabel}
/>
@ -66,6 +84,7 @@ class InputExtrinsic extends React.PureComponent<Props, State> {
className='large'
label={labelMethod}
onChange={this.onKeyChange}
options={optionsMethod}
value={value}
type={type}
withLabel={withLabel}
@ -74,26 +93,32 @@ class InputExtrinsic extends React.PureComponent<Props, State> {
);
}
onKeyChange = (value: Extrinsic): void => {
onKeyChange = (value: Extrinsic$Method): void => {
const { onChange } = this.props;
const { value: { name, section } } = this.state;
if (value.section === section && value.name === name) {
return;
}
this.setState({ value }, () =>
onChange(value)
);
}
onSectionChange = (section: ExtrinsicSectionName): void => {
const { isPrivate = false } = this.props;
onSectionChange = (newSection: Extrinsic$Sections): void => {
const { type, value: { section } } = this.state;
if (this.state.value.section === section) {
if (newSection === section) {
return;
}
const type = isPrivate ? 'private' : 'public';
const options = methodOptions(section, type);
const value = map[section].methods[type][options[0].value];
const optionsMethod = methodOptions(newSection, type);
const value = map[newSection][type][optionsMethod[0].value];
this.onKeyChange(value);
this.setState({ optionsMethod }, () =>
this.onKeyChange(value)
);
}
}

View File

@ -3,21 +3,21 @@
// of the ISC license. See the LICENSE file for details.
// @flow
import type { ExtrinsicSectionName } from '@polkadot/extrinsics/types';
import type { Extrinsic$Sections } from '@polkadot/extrinsics/types';
import type { DropdownOptions } from '../types';
import React from 'react';
import map from '@polkadot/extrinsics-substrate';
// flowlint-next-line unclear-type:off
export default function createOptions (sectionName: any, type: 'private' | 'public'): Array<any> {
const section = map[(sectionName: ExtrinsicSectionName)];
export default function createOptions (sectionName: Extrinsic$Sections, type: 'private' | 'public'): DropdownOptions {
const section = map[sectionName];
if (!section) {
return [];
}
const methods = section.methods[type];
const methods = section[type];
return Object
.keys(methods)

View File

@ -3,15 +3,16 @@
// of the ISC license. See the LICENSE file for details.
// @flow
import type { DropdownOptions } from '../types';
import map from '@polkadot/extrinsics-substrate';
// flowlint-next-line unclear-type:off
export default function createOptions (type: 'private' | 'public'): Array<any> {
export default function createOptions (type: 'private' | 'public'): DropdownOptions {
return Object
.keys(map)
.sort()
.filter((name) => {
const methods = map[name].methods[type];
const methods = map[name][type];
return Object.keys(methods).length !== 0;
})

View File

@ -0,0 +1,13 @@
// Copyright 2017-2018 Jaco Greeff
// This software may be modified and distributed under the terms
// of the ISC license. See the LICENSE file for details.
// @flow
export type DropdownOption = {
className?: string,
key?: string,
text: string | React$Node,
value: string
};
export type DropdownOptions = Array<DropdownOption>;

View File

@ -3,7 +3,8 @@
// of the ISC license. See the LICENSE file for details.
// @flow
import type { InterfaceMethodDefinition } from '@polkadot/jsonrpc/types';
import type { Interface$Method, Interface$Sections } from '@polkadot/jsonrpc/types';
import type { DropdownOptions } from '../InputExtrinsic/types';
import type { I18nProps } from '../types';
import React from 'react';
@ -17,10 +18,9 @@ import translate from '../translate';
type Props = I18nProps & {
isError?: boolean,
label?: string,
onChange: (value: InterfaceMethodDefinition) => void,
// flowlint-next-line unclear-type:off
options: Array<any>,
value: InterfaceMethodDefinition,
onChange: (value: Interface$Method) => void,
options: DropdownOptions,
value: Interface$Method,
withLabel?: boolean
};
@ -29,8 +29,7 @@ function SelectMethod ({ className, isError, label = '', onChange, options, styl
return null;
}
const transform = (name: string): InterfaceMethodDefinition =>
// $FlowFixMe ... string to type :(
const transform = (name: Interface$Sections): Interface$Method =>
map[section].methods[name];
return (

View File

@ -3,7 +3,8 @@
// of the ISC license. See the LICENSE file for details.
// @flow
import type { InterfaceMethodDefinition, InterfaceTypes } from '@polkadot/jsonrpc/types';
import type { Interface$Method, Interface$Sections } from '@polkadot/jsonrpc/types';
import type { DropdownOptions } from '../InputExtrinsic/types';
import type { I18nProps } from '../types';
import React from 'react';
@ -13,13 +14,12 @@ import classes from '../util/classes';
import translate from '../translate';
type Props = I18nProps & {
defaultValue?: InterfaceTypes,
defaultValue?: Interface$Sections,
isError?: boolean,
label: string,
onChange: (value: InterfaceTypes) => void,
// flowlint-next-line unclear-type:off
options: Array<any>,
value: InterfaceMethodDefinition,
onChange: (value: Interface$Sections) => void,
options: DropdownOptions,
value: Interface$Method,
withLabel?: boolean
};

View File

@ -5,7 +5,8 @@
// TODO: We have a lot shared between this and InputExtrinsic & InputStorage
import type { InterfaceMethodDefinition, InterfaceTypes } from '@polkadot/jsonrpc/types';
import type { Interface$Method, Interface$Sections } from '@polkadot/jsonrpc/types';
import type { DropdownOptions } from '../InputExtrinsic/types';
import type { I18nProps } from '../types';
import '../InputExtrinsic/InputExtrinsic.css';
@ -22,20 +23,18 @@ import methodOptions from './options/method';
import sectionOptions from './options/section';
type Props = I18nProps & {
defaultValue: InterfaceMethodDefinition,
defaultValue: Interface$Method,
isError?: boolean,
labelMethod?: string,
labelSection?: string,
onChange: (value: InterfaceMethodDefinition) => void,
onChange: (value: Interface$Method) => void,
withLabel?: boolean
};
type State = {
// flowlint-next-line unclear-type:off
optionsMethod: Array<any>,
// flowlint-next-line unclear-type:off
optionsSection: Array<any>,
value: InterfaceMethodDefinition
optionsMethod: DropdownOptions,
optionsSection: DropdownOptions,
value: Interface$Method
};
class InputRpc extends React.PureComponent<Props, State> {
@ -82,7 +81,7 @@ class InputRpc extends React.PureComponent<Props, State> {
);
}
onMethodChange = (value: InterfaceMethodDefinition): void => {
onMethodChange = (value: Interface$Method): void => {
const { onChange } = this.props;
const { value: { name, section } } = this.state;
@ -95,7 +94,7 @@ class InputRpc extends React.PureComponent<Props, State> {
);
}
onSectionChange = (newSection: InterfaceTypes): void => {
onSectionChange = (newSection: Interface$Sections): void => {
const { value: { section } } = this.state;
if (newSection === section) {

View File

@ -3,15 +3,15 @@
// of the ISC license. See the LICENSE file for details.
// @flow
import type { InterfaceTypes } from '@polkadot/jsonrpc/types';
import type { Interface$Sections } from '@polkadot/jsonrpc/types';
import type { DropdownOptions } from '../../InputExtrinsic/types';
import React from 'react';
import map from '@polkadot/jsonrpc';
// flowlint-next-line unclear-type:off
export default function createOptions (sectionName: any): Array<any> {
const section = map[(sectionName: InterfaceTypes)];
export default function createOptions (sectionName: Interface$Sections): DropdownOptions {
const section = map[sectionName];
if (!section) {
return [];

View File

@ -3,10 +3,11 @@
// of the ISC license. See the LICENSE file for details.
// @flow
import type { DropdownOptions } from '../../InputExtrinsic/types';
import map from '@polkadot/jsonrpc';
// flowlint-next-line unclear-type:off
export default function createOptions (): Array<any> {
export default function createOptions (): DropdownOptions {
return Object
.keys(map)
.sort()

View File

@ -3,7 +3,8 @@
// of the ISC license. See the LICENSE file for details.
// @flow
import type { StorageDef$Key } from '@polkadot/storage/types';
import type { Storage$Key } from '@polkadot/storage/types';
import type { DropdownOptions } from '../InputExtrinsic/types';
import type { I18nProps } from '../types';
import React from 'react';
@ -13,26 +14,23 @@ import map from '@polkadot/storage-substrate';
import Dropdown from '../Dropdown';
import classes from '../util/classes';
import translate from '../translate';
import createOptions from './options/key';
type Props = I18nProps & {
isError?: boolean,
label?: string,
onChange: (value: StorageDef$Key) => void,
value: StorageDef$Key,
onChange: (value: Storage$Key) => void,
options: DropdownOptions,
value: Storage$Key,
withLabel?: boolean
};
function SelectKey ({ className, isError, label = '', onChange, style, t, value: { name, section }, withLabel }: Props): React$Node {
// $FlowFixMe string vs ...
if (!map[section]) {
function SelectKey ({ className, isError, label = '', onChange, options, style, t, value: { name, section }, withLabel }: Props): React$Node {
if (!options.length) {
return null;
}
const keys = map[section].keys;
const transform = (name: string): StorageDef$Key =>
keys[name];
const options = createOptions(section);
const transform = (name: string): Storage$Key =>
map[section].keys[name];
return (
<Dropdown

View File

@ -3,7 +3,8 @@
// of the ISC license. See the LICENSE file for details.
// @flow
import type { StorageDef$Key, StateDb$SectionNames } from '@polkadot/storage/types';
import type { Storage$Key, Storage$Sections } from '@polkadot/storage/types';
import type { DropdownOptions } from '../InputExtrinsic/types';
import type { I18nProps } from '../types';
import React from 'react';
@ -11,20 +12,18 @@ import React from 'react';
import Dropdown from '../Dropdown';
import classes from '../util/classes';
import translate from '../translate';
import createOptions from './options/section';
type Props = I18nProps & {
defaultValue?: StateDb$SectionNames,
defaultValue?: Storage$Sections,
isError?: boolean,
label: string,
onChange: (value: StateDb$SectionNames) => void,
value: StorageDef$Key,
onChange: (value: Storage$Sections) => void,
options: DropdownOptions,
value: Storage$Key,
withLabel?: boolean
};
const options = createOptions();
function SelectSection ({ className, defaultValue, isError, label, onChange, style, t, value: { section }, withLabel }: Props): React$Node {
function SelectSection ({ className, defaultValue, isError, label, onChange, options, style, t, value: { section }, withLabel }: Props): React$Node {
return (
<Dropdown
className={classes('ui--DropdownLinked-Sections', className)}

View File

@ -5,7 +5,8 @@
// TODO: We have a lot shared between this and InputExtrinsic
import type { StorageDef$Key, StateDb$SectionNames } from '@polkadot/storage/types';
import type { Storage$Key, Storage$Sections } from '@polkadot/storage/types';
import type { DropdownOptions } from '../InputExtrinsic/types';
import type { I18nProps } from '../types';
import '../InputExtrinsic/InputExtrinsic.css';
@ -19,18 +20,21 @@ import translate from '../translate';
import SelectKey from './SelectKey';
import SelectSection from './SelectSection';
import keyOptions from './options/key';
import sectionOptions from './options/section';
type Props = I18nProps & {
defaultValue: StorageDef$Key,
defaultValue: Storage$Key,
isError?: boolean,
labelMethod?: string,
labelSection?: string,
onChange: (value: StorageDef$Key) => void,
onChange: (value: Storage$Key) => void,
withLabel?: boolean
};
type State = {
value: StorageDef$Key
optionsMethod: DropdownOptions,
optionsSection: DropdownOptions,
value: Storage$Key
};
class InputStorage extends React.PureComponent<Props, State> {
@ -39,14 +43,18 @@ class InputStorage extends React.PureComponent<Props, State> {
constructor (props: Props) {
super(props);
const { section } = this.props.defaultValue;
this.state = {
optionsMethod: keyOptions(section),
optionsSection: sectionOptions(),
value: this.props.defaultValue
};
}
render (): React$Node {
const { className, labelMethod, labelSection, style, withLabel } = this.props;
const { value } = this.state;
const { optionsMethod, optionsSection, value } = this.state;
return (
<div
@ -57,6 +65,7 @@ class InputStorage extends React.PureComponent<Props, State> {
className='small'
label={labelSection}
onChange={this.onSectionChange}
options={optionsSection}
value={value}
withLabel={withLabel}
/>
@ -64,6 +73,7 @@ class InputStorage extends React.PureComponent<Props, State> {
className='large'
label={labelMethod}
onChange={this.onKeyChange}
options={optionsMethod}
value={value}
withLabel={withLabel}
/>
@ -71,23 +81,32 @@ class InputStorage extends React.PureComponent<Props, State> {
);
}
onKeyChange = (value: StorageDef$Key): void => {
onKeyChange = (value: Storage$Key): void => {
const { onChange } = this.props;
const { value: { name, section } } = this.state;
if (value.section === section && value.name === name) {
return;
}
this.setState({ value }, () =>
onChange(value)
);
}
onSectionChange = (section: StateDb$SectionNames): void => {
if (this.state.value.section === section) {
onSectionChange = (newSection: Storage$Sections): void => {
const { value: { section } } = this.state;
if (newSection === section) {
return;
}
const options = keyOptions(section);
const value = map[section].keys[options[0].value];
const optionsMethod = keyOptions(newSection);
const value = map[newSection].keys[optionsMethod[0].value];
this.onKeyChange(value);
this.setState({ optionsMethod }, () =>
this.onKeyChange(value)
);
}
}

View File

@ -3,15 +3,15 @@
// of the ISC license. See the LICENSE file for details.
// @flow
import type { StateDb$SectionNames } from '@polkadot/storage/types';
import type { Storage$Sections } from '@polkadot/storage/types';
import type { DropdownOptions } from '../../InputExtrinsic/types';
import React from 'react';
import map from '@polkadot/storage-substrate';
// flowlint-next-line unclear-type:off
export default function createOptions (sectionName: any): Array<any> {
const section = map[(sectionName: StateDb$SectionNames)];
export default function createOptions (sectionName: Storage$Sections): DropdownOptions {
const section = map[sectionName];
if (!section) {
return [];

View File

@ -3,10 +3,11 @@
// of the ISC license. See the LICENSE file for details.
// @flow
import type { DropdownOptions } from '../../InputExtrinsic/types';
import map from '@polkadot/storage-substrate';
// flowlint-next-line unclear-type:off
export default function createOptions (): Array<any> {
export default function createOptions (): DropdownOptions {
return Object
.keys(map)
.sort()

View File

@ -0,0 +1,46 @@
// Copyright 2017-2018 Jaco Greeff
// This software may be modified and distributed under the terms
// of the ISC license. See the LICENSE file for details.
// @flow
import type { Props } from '../types';
import React from 'react';
import Input from '../../Input';
import Bare from './Bare';
export default class StringParam extends React.PureComponent<Props> {
render (): React$Node {
const { className, isDisabled, isError, label, style, withLabel } = this.props;
return (
<Bare
className={className}
style={style}
>
<Input
className='full'
isDisabled={isDisabled}
isError={isError}
label={label}
onChange={this.onChange}
placeholder='<any string>'
type='text'
withLabel={withLabel}
/>
</Bare>
);
}
onChange = (value: string): void => {
const { onChange } = this.props;
const isValid = value.length !== 0;
onChange({
isValid,
value
});
};
}

View File

@ -13,6 +13,7 @@ import Bytes from './Bytes';
import Code from './Code';
import Hash from './Hash';
import KeyValue from './KeyValue';
import StringParam from './String';
import Unknown from './Unknown';
import VoteThreshold from './VoteThreshold';
@ -34,7 +35,7 @@ const components: ComponentMap = {
'ReferendumIndex': Amount,
'SessionKey': Amount,
'Signature': Hash,
'String': Unknown,
'String': StringParam,
'Timestamp': Amount,
'u32': Amount,
'u64': Amount,

View File

@ -17,13 +17,15 @@ import Param from './Param';
import createValues from './values';
type Props = I18nProps & {
item: Section$Item,
// flowlint-next-line unclear-type:off
item: Section$Item<any>,
onChange: (value: RawParams) => void,
overrides?: ComponentMap
};
type State = {
item: Section$Item,
// flowlint-next-line unclear-type:off
item: Section$Item<any>,
handlers: Array<RawParam$OnChange>,
onChangeParam: (at: number, next: RawParam) => void,
values: RawParams

View File

@ -9,7 +9,7 @@ import type { Param$Types, Param$Type$Array } from '@polkadot/params/types';
// import IdentityIcon from '@polkadot/ui-react/IdentityIcon';
import numberFormat from '@polkadot/ui-react-rx/util/numberFormat';
import addressEncode from '@polkadot/util-keyring/address/encode';
import u8aToHexShort from '@polkadot/util/u8a/toHexShort';
import u8aToHex from '@polkadot/util/u8a/toHex';
import isBn from '@polkadot/util/is/bn';
import isU8a from '@polkadot/util/is/u8a';
@ -47,7 +47,7 @@ function valueToText (type: Param$Types, value: any): string {
}
if (isU8a(value)) {
return u8aToHexShort((value: Uint8Array), 256);
return u8aToHex((value: Uint8Array), 256);
}
if (isBn(value)) {

View File

@ -12,9 +12,9 @@
},
"dependencies": {
"@babel/runtime": "^7.0.0-beta.47",
"@polkadot/ui-react": "^0.13.4",
"@polkadot/util": "^0.21.3",
"@polkadot/util-keyring": "^0.21.3",
"@polkadot/ui-react": "^0.13.6",
"@polkadot/util": "^0.22.1",
"@polkadot/util-keyring": "^0.22.1",
"store": "^2.0.12"
},
"peerDependencies": {

View File

@ -12,10 +12,10 @@
},
"dependencies": {
"@babel/runtime": "^7.0.0-beta.47",
"@polkadot/extrinsics": "^0.15.8",
"@polkadot/extrinsics": "^0.16.5",
"@polkadot/ui-app": "^0.6.4",
"@polkadot/ui-keyring": "^0.6.4",
"@polkadot/util": "^0.21.3"
"@polkadot/util": "^0.22.1"
},
"peerDependencies": {
"react": "^16.3.1",

View File

@ -13,7 +13,7 @@ import { Trans } from 'react-i18next';
import extrinsics from '@polkadot/extrinsics-substrate';
import Modal from '@polkadot/ui-app/Modal';
import IdentityIcon from '@polkadot/ui-react/IdentityIcon';
import u8aToHexShort from '@polkadot/util/u8a/toHexShort';
import u8aToHex from '@polkadot/util/u8a/toHex';
import addressEncode from '@polkadot/util-keyring/address/encode';
import translate from './translate';
@ -28,7 +28,7 @@ function findExtrinsic (sectionId: number, methodId: number): { method: ?string,
extrinsics[section].index[0] === sectionId
);
const methods = section
? extrinsics[section].methods.public
? extrinsics[section].public
: {};
const method = Object.keys(methods).find((method) =>
methods[method].index[1] === methodId
@ -70,7 +70,7 @@ function Extrinsic ({ children, className, style, t, value: { nonce = new BN(0),
})}
</p>
<p className='code'>
{u8aToHexShort(value, 512)}
{u8aToHex(value, 512)}
</p>
</div>
<IdentityIcon

View File

@ -4,31 +4,26 @@
// @flow
import type { RxApiInterface } from '@polkadot/api-rx/types';
import type { InterfaceMethodDefinition } from '@polkadot/jsonrpc/types';
import type { Interface$Method } from '@polkadot/jsonrpc/types';
import type { Param$Values } from '@polkadot/params/types';
import type { QueueTx$Result } from './types';
export default function submitMessage (api: RxApiInterface, params: Array<Param$Values>, rpc: InterfaceMethodDefinition): Promise<QueueTx$Result> {
const { name, section } = rpc;
export default async function submitMessage (api: RxApiInterface, params: Array<Param$Values>, { name, section }: Interface$Method): Promise<QueueTx$Result> {
try {
const result = await api[section][name].apply(null, params).toPromise();
// $FlowFixMe This should not be an issue...
return api[section][name]
.apply(null, params)
.toPromise()
.then((result) => {
console.log(`${section}.${name}: result ::`, result);
console.log(`${section}.${name}: result ::`, result);
return {
result,
status: 'sent'
};
})
.catch((error) => {
console.error(error);
return {
result,
status: 'sent'
};
} catch (error) {
console.error(error);
return {
error,
status: 'error'
};
});
return {
error,
status: 'error'
};
}
}

View File

@ -4,7 +4,7 @@
// @flow
import type BN from 'bn.js';
import type { InterfaceMethodDefinition } from '@polkadot/jsonrpc/types';
import type { Interface$Method } from '@polkadot/jsonrpc/types';
import type { Param$Values } from '@polkadot/params/types';
export type EncodedMessage = {
@ -23,7 +23,7 @@ export type QueueTx$Result = {
}
export type QueueTx$Base = EncodedMessage & {
rpc: InterfaceMethodDefinition,
rpc: Interface$Method,
nonce: BN,
publicKey?: Uint8Array | null
};

274
yarn.lock
View File

@ -719,47 +719,47 @@
version "1.0.2"
resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-1.0.2.tgz#d056b68999769728a1cff8d643bc59eb6f0be436"
"@polkadot/api-format@^0.12.4":
version "0.12.4"
resolved "https://registry.yarnpkg.com/@polkadot/api-format/-/api-format-0.12.4.tgz#9ef5d227a98e713aef0ad8cdd8cd4f2804d346fb"
"@polkadot/api-format@^0.12.6":
version "0.12.6"
resolved "https://registry.yarnpkg.com/@polkadot/api-format/-/api-format-0.12.6.tgz#9fd8e0268c5b6bb3fb5f2d4c1e66158d07ad3af2"
dependencies:
"@babel/runtime" "^7.0.0-beta.47"
"@polkadot/jsonrpc" "^0.15.8"
"@polkadot/primitives-json" "^0.15.8"
"@polkadot/util" "^0.21.3"
"@polkadot/jsonrpc" "^0.16.5"
"@polkadot/primitives-json" "^0.16.5"
"@polkadot/util" "^0.22.1"
"@polkadot/api-provider@^0.12.4":
version "0.12.4"
resolved "https://registry.yarnpkg.com/@polkadot/api-provider/-/api-provider-0.12.4.tgz#947cf3720a06a808d21dd5717d2bf3f3a7d37138"
"@polkadot/api-provider@^0.12.6":
version "0.12.6"
resolved "https://registry.yarnpkg.com/@polkadot/api-provider/-/api-provider-0.12.6.tgz#5f9b043e247742d4edc0cfdcb4a7ab4051a452a9"
dependencies:
"@babel/runtime" "^7.0.0-beta.47"
"@polkadot/storage-substrate" "^0.15.8"
"@polkadot/util" "^0.21.3"
"@polkadot/util-crypto" "^0.21.3"
"@polkadot/util-keyring" "^0.21.3"
"@polkadot/storage-substrate" "^0.16.5"
"@polkadot/util" "^0.22.1"
"@polkadot/util-crypto" "^0.22.1"
"@polkadot/util-keyring" "^0.22.1"
eventemitter3 "^2.0.3"
isomorphic-fetch "^2.2.1"
websocket "^1.0.25"
"@polkadot/api-rx@^0.12.4":
version "0.12.4"
resolved "https://registry.yarnpkg.com/@polkadot/api-rx/-/api-rx-0.12.4.tgz#2114d29620570ebc35215a5bd967bfaa1a5ad7c9"
"@polkadot/api-rx@^0.12.6":
version "0.12.6"
resolved "https://registry.yarnpkg.com/@polkadot/api-rx/-/api-rx-0.12.6.tgz#951ef4daa78415c4ac13c7fdbd86612d4eae987a"
dependencies:
"@babel/runtime" "^7.0.0-beta.47"
"@polkadot/api" "^0.12.4"
"@polkadot/api-provider" "^0.12.4"
"@polkadot/api" "^0.12.6"
"@polkadot/api-provider" "^0.12.6"
rxjs "^5.5.10"
"@polkadot/api@^0.12.4":
version "0.12.4"
resolved "https://registry.yarnpkg.com/@polkadot/api/-/api-0.12.4.tgz#591912964574f9b4775cf33473adfb48ef339d3a"
"@polkadot/api@^0.12.6":
version "0.12.6"
resolved "https://registry.yarnpkg.com/@polkadot/api/-/api-0.12.6.tgz#eacdd9797806954e54b7a41a80e5d4e9f8cedd34"
dependencies:
"@babel/runtime" "^7.0.0-beta.47"
"@polkadot/api-format" "^0.12.4"
"@polkadot/api-provider" "^0.12.4"
"@polkadot/jsonrpc" "^0.15.8"
"@polkadot/params" "^0.15.8"
"@polkadot/util" "^0.21.3"
"@polkadot/api-format" "^0.12.6"
"@polkadot/api-provider" "^0.12.6"
"@polkadot/jsonrpc" "^0.16.5"
"@polkadot/params" "^0.16.5"
"@polkadot/util" "^0.22.1"
"@polkadot/dev-react@^0.19.10":
version "0.19.10"
@ -816,181 +816,181 @@
mkdirp "^0.5.1"
rimraf "^2.6.2"
"@polkadot/extrinsics-codec@^0.15.8":
version "0.15.8"
resolved "https://registry.yarnpkg.com/@polkadot/extrinsics-codec/-/extrinsics-codec-0.15.8.tgz#925ab3facb9efb1c03a098f54dc466a8072ca3fe"
"@polkadot/extrinsics-codec@^0.16.5":
version "0.16.5"
resolved "https://registry.yarnpkg.com/@polkadot/extrinsics-codec/-/extrinsics-codec-0.16.5.tgz#06c798c12b6a55d2d62863d796a63a8cf3032773"
dependencies:
"@babel/runtime" "^7.0.0-beta.47"
"@polkadot/extrinsics" "^0.15.8"
"@polkadot/params" "^0.15.8"
"@polkadot/util" "^0.21.3"
"@polkadot/extrinsics" "^0.16.5"
"@polkadot/params" "^0.16.5"
"@polkadot/util" "^0.22.1"
bn.js "^4.11.8"
"@polkadot/extrinsics-substrate@^0.15.8":
version "0.15.8"
resolved "https://registry.yarnpkg.com/@polkadot/extrinsics-substrate/-/extrinsics-substrate-0.15.8.tgz#8c36f8bd84711a5bb41f40d7da00c831cf1b1542"
"@polkadot/extrinsics-substrate@^0.16.5":
version "0.16.5"
resolved "https://registry.yarnpkg.com/@polkadot/extrinsics-substrate/-/extrinsics-substrate-0.16.5.tgz#d68078ba7071898a057356b5b7d98e285b169257"
dependencies:
"@babel/runtime" "^7.0.0-beta.47"
"@polkadot/extrinsics" "^0.15.8"
"@polkadot/extrinsics" "^0.16.5"
"@polkadot/extrinsics@^0.15.8":
version "0.15.8"
resolved "https://registry.yarnpkg.com/@polkadot/extrinsics/-/extrinsics-0.15.8.tgz#98c3776fe1b2e560489511312a6c56a17b76fbfc"
"@polkadot/extrinsics@^0.16.5":
version "0.16.5"
resolved "https://registry.yarnpkg.com/@polkadot/extrinsics/-/extrinsics-0.16.5.tgz#e4c8590f36728215c0c6bc7338c49dd957ce8841"
dependencies:
"@babel/runtime" "^7.0.0-beta.47"
"@polkadot/params" "^0.15.8"
"@polkadot/primitives" "^0.15.8"
"@polkadot/util" "^0.21.3"
"@polkadot/params" "^0.16.5"
"@polkadot/primitives" "^0.16.5"
"@polkadot/util" "^0.22.1"
"@polkadot/jsonrpc@^0.15.8":
version "0.15.8"
resolved "https://registry.yarnpkg.com/@polkadot/jsonrpc/-/jsonrpc-0.15.8.tgz#54ff1123eeb763f53023b16116cf5762d1d8d4e4"
"@polkadot/jsonrpc@^0.16.5":
version "0.16.5"
resolved "https://registry.yarnpkg.com/@polkadot/jsonrpc/-/jsonrpc-0.16.5.tgz#448e976d7017672ab107a179c3ca34bb93ac0d8f"
dependencies:
"@polkadot/params" "^0.15.8"
"@polkadot/params" "^0.16.5"
babel-runtime "^6.26.0"
"@polkadot/params@^0.15.8":
version "0.15.8"
resolved "https://registry.yarnpkg.com/@polkadot/params/-/params-0.15.8.tgz#b5b04dfd7f95ae3bfd38a360eece3d87aa1cc3a2"
"@polkadot/params@^0.16.5":
version "0.16.5"
resolved "https://registry.yarnpkg.com/@polkadot/params/-/params-0.16.5.tgz#535b73132ff14181782b05b38df5d645ac27db6e"
dependencies:
"@babel/runtime" "^7.0.0-beta.47"
"@polkadot/extrinsics" "^0.15.8"
"@polkadot/extrinsics-substrate" "^0.15.8"
"@polkadot/primitives" "^0.15.8"
"@polkadot/util" "^0.21.3"
"@polkadot/extrinsics" "^0.16.5"
"@polkadot/extrinsics-substrate" "^0.16.5"
"@polkadot/primitives" "^0.16.5"
"@polkadot/util" "^0.22.1"
"@polkadot/primitives-builder@^0.15.8":
version "0.15.8"
resolved "https://registry.yarnpkg.com/@polkadot/primitives-builder/-/primitives-builder-0.15.8.tgz#6ce1db576234b62886ba29555ee366e85e14a4be"
"@polkadot/primitives-builder@^0.16.5":
version "0.16.5"
resolved "https://registry.yarnpkg.com/@polkadot/primitives-builder/-/primitives-builder-0.16.5.tgz#b9794e0f45a19f4a38945f8f7ab2c35002dbedae"
dependencies:
"@babel/runtime" "^7.0.0-beta.47"
"@polkadot/primitives" "^0.15.8"
"@polkadot/primitives-codec" "^0.15.8"
"@polkadot/util" "^0.21.3"
"@polkadot/util-crypto" "^0.21.3"
"@polkadot/util-triehash" "^0.21.3"
"@polkadot/primitives" "^0.16.5"
"@polkadot/primitives-codec" "^0.16.5"
"@polkadot/util" "^0.22.1"
"@polkadot/util-crypto" "^0.22.1"
"@polkadot/util-triehash" "^0.22.1"
"@polkadot/primitives-codec@^0.15.8":
version "0.15.8"
resolved "https://registry.yarnpkg.com/@polkadot/primitives-codec/-/primitives-codec-0.15.8.tgz#1d57d253f149a7262222458f75a83601aa313bd0"
"@polkadot/primitives-codec@^0.16.5":
version "0.16.5"
resolved "https://registry.yarnpkg.com/@polkadot/primitives-codec/-/primitives-codec-0.16.5.tgz#93beb37a886f11c2d32d222b9ffebcb8f39c2de8"
dependencies:
"@babel/runtime" "^7.0.0-beta.47"
"@polkadot/primitives" "^0.15.8"
"@polkadot/primitives-builder" "^0.15.8"
"@polkadot/primitives-rlp" "^0.15.8"
"@polkadot/util" "^0.21.3"
"@polkadot/util-keyring" "^0.21.3"
"@polkadot/primitives" "^0.16.5"
"@polkadot/primitives-builder" "^0.16.5"
"@polkadot/primitives-rlp" "^0.16.5"
"@polkadot/util" "^0.22.1"
"@polkadot/util-keyring" "^0.22.1"
"@polkadot/primitives-json@^0.15.8":
version "0.15.8"
resolved "https://registry.yarnpkg.com/@polkadot/primitives-json/-/primitives-json-0.15.8.tgz#ee1035ac744fe5a373152c8bc67ebf2be7643f12"
"@polkadot/primitives-json@^0.16.5":
version "0.16.5"
resolved "https://registry.yarnpkg.com/@polkadot/primitives-json/-/primitives-json-0.16.5.tgz#a4b79054e93302fd31537dfcf1fb6b58518de0fa"
dependencies:
"@babel/runtime" "^7.0.0-beta.47"
"@polkadot/primitives" "^0.15.8"
"@polkadot/primitives-builder" "^0.15.8"
"@polkadot/util" "^0.21.3"
"@polkadot/primitives" "^0.16.5"
"@polkadot/primitives-builder" "^0.16.5"
"@polkadot/util" "^0.22.1"
"@polkadot/primitives-rlp@^0.15.8":
version "0.15.8"
resolved "https://registry.yarnpkg.com/@polkadot/primitives-rlp/-/primitives-rlp-0.15.8.tgz#7b6583d5026e69be48d6e029978656590c0ad4e6"
"@polkadot/primitives-rlp@^0.16.5":
version "0.16.5"
resolved "https://registry.yarnpkg.com/@polkadot/primitives-rlp/-/primitives-rlp-0.16.5.tgz#1faae2336eee345b59985adf2a00587eb69a37ee"
dependencies:
"@babel/runtime" "^7.0.0-beta.47"
"@polkadot/primitives" "^0.15.8"
"@polkadot/primitives-builder" "^0.15.8"
"@polkadot/util" "^0.21.3"
"@polkadot/util-crypto" "^0.21.3"
"@polkadot/primitives" "^0.16.5"
"@polkadot/primitives-builder" "^0.16.5"
"@polkadot/util" "^0.22.1"
"@polkadot/util-crypto" "^0.22.1"
"@polkadot/primitives@^0.15.8":
version "0.15.8"
resolved "https://registry.yarnpkg.com/@polkadot/primitives/-/primitives-0.15.8.tgz#897e6dc947ab143da3eb05fd72cc874b9bd69304"
"@polkadot/primitives@^0.16.5":
version "0.16.5"
resolved "https://registry.yarnpkg.com/@polkadot/primitives/-/primitives-0.16.5.tgz#f1806d1c0e549d8790bd02293ee71aae9cf8adb5"
dependencies:
"@babel/runtime" "^7.0.0-beta.47"
"@polkadot/util" "^0.21.3"
"@polkadot/util" "^0.22.1"
"@polkadot/storage-substrate@^0.15.8":
version "0.15.8"
resolved "https://registry.yarnpkg.com/@polkadot/storage-substrate/-/storage-substrate-0.15.8.tgz#1ef3442b369b1b537455a287e3d2f808ac2bba3f"
"@polkadot/storage-substrate@^0.16.5":
version "0.16.5"
resolved "https://registry.yarnpkg.com/@polkadot/storage-substrate/-/storage-substrate-0.16.5.tgz#79d7d3c6fc6d1aa6fa3453a17133a7af8d2ed622"
dependencies:
"@babel/runtime" "^7.0.0-beta.47"
"@polkadot/storage" "^0.15.8"
"@polkadot/util" "^0.21.3"
"@polkadot/storage" "^0.16.5"
"@polkadot/util" "^0.22.1"
"@polkadot/storage@^0.15.8":
version "0.15.8"
resolved "https://registry.yarnpkg.com/@polkadot/storage/-/storage-0.15.8.tgz#a437074277eff576b468f921149fca612379a1df"
"@polkadot/storage@^0.16.5":
version "0.16.5"
resolved "https://registry.yarnpkg.com/@polkadot/storage/-/storage-0.16.5.tgz#98be9f2e0feaaee7a8ecf7f9c85cc3ee42f551b4"
dependencies:
"@babel/runtime" "^7.0.0-beta.47"
"@polkadot/params" "^0.15.8"
"@polkadot/primitives" "^0.15.8"
"@polkadot/util" "^0.21.3"
"@polkadot/params" "^0.16.5"
"@polkadot/primitives" "^0.16.5"
"@polkadot/util" "^0.22.1"
"@polkadot/ui-identicon@^0.13.4":
version "0.13.4"
resolved "https://registry.yarnpkg.com/@polkadot/ui-identicon/-/ui-identicon-0.13.4.tgz#c2b854825e2ece811163514dac7a733dfc887039"
"@polkadot/ui-identicon@^0.13.6":
version "0.13.6"
resolved "https://registry.yarnpkg.com/@polkadot/ui-identicon/-/ui-identicon-0.13.6.tgz#0c74fc3ff5e57025424becf40c4159fa0ce5a5c2"
dependencies:
"@babel/runtime" "^7.0.0-beta.47"
color "^3.0.0"
"@polkadot/ui-react-rx@^0.13.4":
version "0.13.4"
resolved "https://registry.yarnpkg.com/@polkadot/ui-react-rx/-/ui-react-rx-0.13.4.tgz#23a01099b50619b761dcfbafa910e59e75b03b94"
"@polkadot/ui-react-rx@^0.13.6":
version "0.13.6"
resolved "https://registry.yarnpkg.com/@polkadot/ui-react-rx/-/ui-react-rx-0.13.6.tgz#125463300b26301f6c1cf7988b92366567fd30d8"
dependencies:
"@babel/runtime" "^7.0.0-beta.47"
"@polkadot/api-provider" "^0.12.4"
"@polkadot/api-rx" "^0.12.4"
"@polkadot/jsonrpc" "^0.15.8"
"@polkadot/params" "^0.15.8"
"@polkadot/primitives" "^0.15.8"
"@polkadot/storage" "^0.15.8"
"@polkadot/storage-substrate" "^0.15.8"
"@polkadot/util" "^0.21.3"
"@polkadot/api-provider" "^0.12.6"
"@polkadot/api-rx" "^0.12.6"
"@polkadot/jsonrpc" "^0.16.5"
"@polkadot/params" "^0.16.5"
"@polkadot/primitives" "^0.16.5"
"@polkadot/storage" "^0.16.5"
"@polkadot/storage-substrate" "^0.16.5"
"@polkadot/util" "^0.22.1"
"@polkadot/ui-react@^0.13.4":
version "0.13.4"
resolved "https://registry.yarnpkg.com/@polkadot/ui-react/-/ui-react-0.13.4.tgz#4e60851400d738129585f965929095f5cdedd0cc"
"@polkadot/ui-react@^0.13.6":
version "0.13.6"
resolved "https://registry.yarnpkg.com/@polkadot/ui-react/-/ui-react-0.13.6.tgz#11603bf2e68d93eac00cc3b5c8de535a93273c30"
dependencies:
"@babel/runtime" "^7.0.0-beta.47"
"@polkadot/ui-identicon" "^0.13.4"
"@polkadot/ui-identicon" "^0.13.6"
"@polkadot/util-crypto@^0.21.3":
version "0.21.3"
resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-0.21.3.tgz#96711c0c8f95b98bcffe140086d277fa1ef94676"
"@polkadot/util-crypto@^0.22.1":
version "0.22.1"
resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-0.22.1.tgz#c48c2ba52d6e92cf433a0db229e92a157c4a6448"
dependencies:
"@babel/runtime" "^7.0.0-beta.47"
"@polkadot/util" "^0.21.3"
"@polkadot/util" "^0.22.1"
blakejs "^1.1.0"
js-sha3 "^0.7.0"
tweetnacl "^1.0.0"
xxhashjs "^0.2.2"
"@polkadot/util-keyring@^0.21.3":
version "0.21.3"
resolved "https://registry.yarnpkg.com/@polkadot/util-keyring/-/util-keyring-0.21.3.tgz#4b52134505af3cb4a0280412a5c595d4b6f7f9ec"
"@polkadot/util-keyring@^0.22.1":
version "0.22.1"
resolved "https://registry.yarnpkg.com/@polkadot/util-keyring/-/util-keyring-0.22.1.tgz#c1bc9b9ba705be17e66a5292b107cd2e1e0678c8"
dependencies:
"@babel/runtime" "^7.0.0-beta.47"
"@polkadot/util" "^0.21.3"
"@polkadot/util-crypto" "^0.21.3"
"@polkadot/util" "^0.22.1"
"@polkadot/util-crypto" "^0.22.1"
bs58 "^4.0.1"
"@polkadot/util-rlp@^0.21.3":
version "0.21.3"
resolved "https://registry.yarnpkg.com/@polkadot/util-rlp/-/util-rlp-0.21.3.tgz#388c96e733087505072d6cbe329bb3ec46922d46"
"@polkadot/util-rlp@^0.22.1":
version "0.22.1"
resolved "https://registry.yarnpkg.com/@polkadot/util-rlp/-/util-rlp-0.22.1.tgz#58d517af4430ecc9bc9cbb3802ec77511b2e56be"
dependencies:
"@babel/runtime" "^7.0.0-beta.47"
"@polkadot/util" "^0.21.3"
"@polkadot/util" "^0.22.1"
"@polkadot/util-triehash@^0.21.3":
version "0.21.3"
resolved "https://registry.yarnpkg.com/@polkadot/util-triehash/-/util-triehash-0.21.3.tgz#e86d374dc60ddce81b219130ffcb0611d6a59ffe"
"@polkadot/util-triehash@^0.22.1":
version "0.22.1"
resolved "https://registry.yarnpkg.com/@polkadot/util-triehash/-/util-triehash-0.22.1.tgz#5eeb430e0a77a18ef931193f72fe88d5de56a00c"
dependencies:
"@babel/runtime" "^7.0.0-beta.47"
"@polkadot/util" "^0.21.3"
"@polkadot/util-crypto" "^0.21.3"
"@polkadot/util-rlp" "^0.21.3"
"@polkadot/util" "^0.22.1"
"@polkadot/util-crypto" "^0.22.1"
"@polkadot/util-rlp" "^0.22.1"
"@polkadot/util@^0.21.3":
version "0.21.3"
resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-0.21.3.tgz#8b1151a7b80156aefe1ac4a4a81642119a1b6bed"
"@polkadot/util@^0.22.1":
version "0.22.1"
resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-0.22.1.tgz#54966d2ffdee5a2c358c06b6c642e0d17c42442f"
dependencies:
"@babel/runtime" "^7.0.0-beta.47"
bn.js "^4.11.8"