diff --git a/package.json b/package.json index 63008f7259..bcbb6b15b4 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ }, "devDependencies": { "@polkadot/dev-react": "^0.20.3", - "@polkadot/ts": "^0.1.2", + "@polkadot/ts": "^0.1.3", "autoprefixer": "^8.6.2", "gh-pages": "^1.1.0", "postcss-import": "^11.1.0", diff --git a/packages/app-explorer/package.json b/packages/app-explorer/package.json index 52657d5013..64440c60f7 100644 --- a/packages/app-explorer/package.json +++ b/packages/app-explorer/package.json @@ -16,8 +16,8 @@ }, "dependencies": { "@babel/runtime": "^7.0.0-beta.51", - "@polkadot/primitives-codec": "^0.19.5", - "@polkadot/primitives-json": "^0.19.5", + "@polkadot/primitives-codec": "^0.20.1", + "@polkadot/primitives-json": "^0.20.1", "@polkadot/ui-app": "^0.18.1", "@polkadot/util-crypto": "^0.24.6" } diff --git a/packages/app-extrinsics/package.json b/packages/app-extrinsics/package.json index cb8a057d7b..379caebadb 100644 --- a/packages/app-extrinsics/package.json +++ b/packages/app-extrinsics/package.json @@ -16,7 +16,7 @@ }, "dependencies": { "@babel/runtime": "^7.0.0-beta.51", - "@polkadot/extrinsics-codec": "^0.19.5", + "@polkadot/extrinsics-codec": "^0.20.1", "@polkadot/ui-app": "^0.18.1", "@polkadot/ui-signer": "^0.18.1", "react-dropzone": "^4.2.9" diff --git a/packages/app-extrinsics/src/Extrinsic.tsx b/packages/app-extrinsics/src/Extrinsic.tsx index c2b2b875ff..b05cf7674f 100644 --- a/packages/app-extrinsics/src/Extrinsic.tsx +++ b/packages/app-extrinsics/src/Extrinsic.tsx @@ -2,7 +2,8 @@ // This software may be modified and distributed under the terms // of the ISC license. See the LICENSE file for details. -import { Extrinsic$Method } from '@polkadot/extrinsics/types'; +import { SectionItem } from '@polkadot/params/types'; +import { Extrinsics } from '@polkadot/extrinsics/types'; import { BareProps } from '@polkadot/ui-app/types'; import { ApiProps } from '@polkadot/ui-react-rx/types'; import { RawParam } from '@polkadot/ui-app/Params/types'; @@ -20,7 +21,7 @@ import withApi from '@polkadot/ui-react-rx/with/api'; import paramComponents from './Params'; type Props = BareProps & ApiProps & { - defaultValue: Extrinsic$Method, + defaultValue: SectionItem, isDisabled?: boolean, isError?: boolean, isPrivate?: boolean, @@ -31,7 +32,7 @@ type Props = BareProps & ApiProps & { }; type State = { - extrinsic: Extrinsic$Method, + extrinsic: SectionItem, values: Array }; @@ -98,7 +99,7 @@ class Extrinsic extends React.PureComponent { }); } - onChangeExtrinsic = (extrinsic: Extrinsic$Method): void => { + onChangeExtrinsic = (extrinsic: SectionItem): void => { this.nextState({ extrinsic } as State); }; diff --git a/packages/app-extrinsics/src/Params/Call.tsx b/packages/app-extrinsics/src/Params/Call.tsx index 030417a7e1..b5092d635c 100644 --- a/packages/app-extrinsics/src/Params/Call.tsx +++ b/packages/app-extrinsics/src/Params/Call.tsx @@ -10,8 +10,7 @@ import extrinsics from '@polkadot/extrinsics'; import Extrinsic from './Extrinsic'; -// @ts-ignore checking? -const defaultValue = extrinsics.get('staking').public.transfer; +const defaultValue = extrinsics.staking.public.transfer; export default function Call ({ className, isDisabled, isError, label, onChange, style, withLabel }: Props) { return ( diff --git a/packages/app-extrinsics/src/Params/Extrinsic.tsx b/packages/app-extrinsics/src/Params/Extrinsic.tsx index 4513f3cb5b..080d50ebcc 100644 --- a/packages/app-extrinsics/src/Params/Extrinsic.tsx +++ b/packages/app-extrinsics/src/Params/Extrinsic.tsx @@ -2,7 +2,8 @@ // This software may be modified and distributed under the terms // of the ISC license. See the LICENSE file for details. -import { Extrinsic$Method } from '@polkadot/extrinsics/types'; +import { SectionItem } from '@polkadot/params/types'; +import { Extrinsics } from '@polkadot/extrinsics/types'; import { I18nProps } from '@polkadot/ui-app/types'; import { RawParam$OnChange } from '@polkadot/ui-app/Params/types'; import { EncodedMessage } from '@polkadot/ui-signer/types'; @@ -13,7 +14,7 @@ import BaseExtrinsic from '../Extrinsic'; import translate from '../translate'; type Props = I18nProps & { - defaultValue: Extrinsic$Method, + defaultValue: SectionItem, isDisabled?: boolean, isError?: boolean, isPrivate: boolean, diff --git a/packages/app-extrinsics/src/Params/Proposal.tsx b/packages/app-extrinsics/src/Params/Proposal.tsx index 08fa6a1428..6135eec6a9 100644 --- a/packages/app-extrinsics/src/Params/Proposal.tsx +++ b/packages/app-extrinsics/src/Params/Proposal.tsx @@ -10,8 +10,7 @@ import extrinsics from '@polkadot/extrinsics'; import Extrinsic from './Extrinsic'; -// @ts-ignore check? -const defaultValue = extrinsics.get('consensus').private.setCode; +const defaultValue = extrinsics.consensus.private.setCode; export default function Proposal ({ className, isDisabled, isError, label, onChange, style, withLabel }: Props) { return ( diff --git a/packages/app-extrinsics/src/Selection.tsx b/packages/app-extrinsics/src/Selection.tsx index e2fa0e8c98..2f30ec9617 100644 --- a/packages/app-extrinsics/src/Selection.tsx +++ b/packages/app-extrinsics/src/Selection.tsx @@ -29,10 +29,8 @@ type State = { publicKey: Uint8Array }; -// @ts-ignore check? -const defaultExtrinsic = extrinsics.get('staking').public.transfer; -// @ts-ignore check? -const defaultRpc = rpc.get('author').public.submitExtrinsic; +const defaultExtrinsic = extrinsics.staking.public.transfer; +const defaultRpc = rpc.author.public.submitExtrinsic; class Selection extends React.PureComponent { state: State = { diff --git a/packages/app-rpc/src/Selection.tsx b/packages/app-rpc/src/Selection.tsx index fa9ca1e374..0681a6767a 100644 --- a/packages/app-rpc/src/Selection.tsx +++ b/packages/app-rpc/src/Selection.tsx @@ -2,7 +2,8 @@ // This software may be modified and distributed under the terms // of the ISC license. See the LICENSE file for details. -import { Interface$Method } from '@polkadot/jsonrpc/types'; +import { SectionItem } from '@polkadot/params/types'; +import { Interfaces } from '@polkadot/jsonrpc/types'; import { RawParam } from '@polkadot/ui-app/Params/types'; import { I18nProps } from '@polkadot/ui-app/types'; import { QueueTx$MessageAdd } from '@polkadot/ui-signer/types'; @@ -30,12 +31,11 @@ type State = { isValid: boolean, nonce: BN, publicKey?: Uint8Array | null, - rpc: Interface$Method, + rpc: SectionItem, values: Array } -// @ts-ignore check? -const defaultMethod = rpc.get('author').public.submitExtrinsic; +const defaultMethod = rpc.author.public.submitExtrinsic; class Selection extends React.PureComponent { state: State = { @@ -116,7 +116,7 @@ class Selection extends React.PureComponent { this.nextState({ nonce, publicKey } as State); } - onChangeMethod = (rpc: Interface$Method): void => { + onChangeMethod = (rpc: SectionItem): void => { this.nextState({ rpc } as State); } diff --git a/packages/app-storage/src/Selection.tsx b/packages/app-storage/src/Selection.tsx index 25baab4735..d10ae06204 100644 --- a/packages/app-storage/src/Selection.tsx +++ b/packages/app-storage/src/Selection.tsx @@ -2,7 +2,8 @@ // This software may be modified and distributed under the terms // of the ISC license. See the LICENSE file for details. -import { Storage$Key } from '@polkadot/storage/types'; +import { SectionItem } from '@polkadot/params/types'; +import { Storages } from '@polkadot/storage/types'; import { I18nProps } from '@polkadot/ui-app/types'; import { RawParams } from '@polkadot/ui-app/Params/types'; import { StorageQuery } from './types'; @@ -25,12 +26,11 @@ type Props = I18nProps & { type State = { isValid: boolean, - key: Storage$Key, + key: SectionItem, params: RawParams }; -// @ts-ignore check? -const defaultValue = storage.get('timestamp').public.current; +const defaultValue = storage.timestamp.public.current; let id = -1; class Selection extends React.PureComponent { @@ -106,7 +106,7 @@ class Selection extends React.PureComponent { }); } - onChangeKey = (key: Storage$Key): void => { + onChangeKey = (key: SectionItem): void => { this.nextState({ key } as State); } diff --git a/packages/app-storage/src/types.d.ts b/packages/app-storage/src/types.d.ts index 152d57e0d1..29fb989e36 100644 --- a/packages/app-storage/src/types.d.ts +++ b/packages/app-storage/src/types.d.ts @@ -2,11 +2,12 @@ // This software may be modified and distributed under the terms // of the ISC license. See the LICENSE file for details. -import { Storage$Key } from '@polkadot/storage/types'; +import { SectionItem } from '@polkadot/params/types'; +import { Storages } from '@polkadot/storage/types'; import { RawParams } from '@polkadot/ui-app/Params/types'; export type StorageQuery = { id: number, - key: Storage$Key, + key: SectionItem, params: RawParams } diff --git a/packages/ui-app/package.json b/packages/ui-app/package.json index 676dc6b394..ad9df9374f 100644 --- a/packages/ui-app/package.json +++ b/packages/ui-app/package.json @@ -16,8 +16,8 @@ }, "dependencies": { "@babel/runtime": "^7.0.0-beta.51", - "@polkadot/extrinsics": "^0.19.5", - "@polkadot/storage": "^0.19.5", + "@polkadot/extrinsics": "^0.20.1", + "@polkadot/storage": "^0.20.1", "@polkadot/ui-keyring": "^0.18.1", "@polkadot/ui-react": "^0.18.1", "@polkadot/ui-react-rx": "^0.18.1", diff --git a/packages/ui-app/src/InputExtrinsic/SelectMethod.tsx b/packages/ui-app/src/InputExtrinsic/SelectMethod.tsx index ec3612e8f8..8a1c95460b 100644 --- a/packages/ui-app/src/InputExtrinsic/SelectMethod.tsx +++ b/packages/ui-app/src/InputExtrinsic/SelectMethod.tsx @@ -2,7 +2,8 @@ // This software may be modified and distributed under the terms // of the ISC license. See the LICENSE file for details. -import { Extrinsic$Method } from '@polkadot/extrinsics/types'; +import { SectionItem } from '@polkadot/params/types'; +import { Extrinsics, Extrinsic$Sections } from '@polkadot/extrinsics/types'; import { I18nProps } from '../types'; import { DropdownOptions } from './types'; @@ -17,10 +18,10 @@ import translate from '../translate'; type Props = I18nProps & { isError?: boolean, label?: string, - onChange: (value: Extrinsic$Method) => void, + onChange: (value: SectionItem) => void, options: DropdownOptions, type: 'private' | 'public', - value: Extrinsic$Method, + value: SectionItem, withLabel?: boolean }; @@ -29,9 +30,8 @@ function SelectMethod ({ className, isError, label = '', onChange, options, styl return null; } - const transform = (name: string): Extrinsic$Method => - // @ts-ignore check? - extrinsics.get(section)[type][name]; + const transform = (name: Extrinsic$Sections): SectionItem => + extrinsics[section][type][name]; return ( void, options: DropdownOptions, - value: Extrinsic$Method, + value: SectionItem, withLabel?: boolean }; diff --git a/packages/ui-app/src/InputExtrinsic/index.tsx b/packages/ui-app/src/InputExtrinsic/index.tsx index baf16d18c6..80527cd457 100644 --- a/packages/ui-app/src/InputExtrinsic/index.tsx +++ b/packages/ui-app/src/InputExtrinsic/index.tsx @@ -4,7 +4,8 @@ // TODO: We have a lot shared between this and InputStorage -import { Extrinsic$Method, Extrinsic$Sections } from '@polkadot/extrinsics/types'; +import { SectionItem } from '@polkadot/params/types'; +import { Extrinsics, Extrinsic$Sections } from '@polkadot/extrinsics/types'; import { I18nProps } from '../types'; import { DropdownOptions } from './types'; @@ -21,13 +22,13 @@ import methodOptions from './options/method'; import sectionOptions from './options/section'; type Props = I18nProps & { - defaultValue: Extrinsic$Method, + defaultValue: SectionItem, isDisabled?: boolean, isError?: boolean, isPrivate?: boolean, labelMethod?: string, labelSection?: string, - onChange: (value: Extrinsic$Method) => void, + onChange: (value: SectionItem) => void, withLabel?: boolean }; @@ -35,7 +36,7 @@ type State = { optionsMethod: DropdownOptions, optionsSection: DropdownOptions, type: 'private' | 'public', - value: Extrinsic$Method + value: SectionItem }; class InputExtrinsic extends React.PureComponent { @@ -93,7 +94,7 @@ class InputExtrinsic extends React.PureComponent { ); } - onKeyChange = (value: Extrinsic$Method): void => { + onKeyChange = (value: SectionItem): void => { const { onChange } = this.props; const { value: { name, section } } = this.state; @@ -114,8 +115,7 @@ class InputExtrinsic extends React.PureComponent { } const optionsMethod = methodOptions(newSection, type); - // @ts-ignore check? - const value = map.get(newSection)[type][optionsMethod[0].value]; + const value = map[newSection][type][optionsMethod[0].value]; this.setState({ optionsMethod }, () => this.onKeyChange(value) diff --git a/packages/ui-app/src/InputExtrinsic/options/method.tsx b/packages/ui-app/src/InputExtrinsic/options/method.tsx index 982a20f51e..7fbe05815d 100644 --- a/packages/ui-app/src/InputExtrinsic/options/method.tsx +++ b/packages/ui-app/src/InputExtrinsic/options/method.tsx @@ -10,7 +10,7 @@ import React from 'react'; import map from '@polkadot/extrinsics'; export default function createOptions (sectionName: Extrinsic$Sections, type: 'private' | 'public'): DropdownOptions { - const section = map.get(sectionName); + const section = map[sectionName]; if (!section) { return []; diff --git a/packages/ui-app/src/InputExtrinsic/options/section.ts b/packages/ui-app/src/InputExtrinsic/options/section.ts index cd23bf5e84..0c7cd48dc3 100644 --- a/packages/ui-app/src/InputExtrinsic/options/section.ts +++ b/packages/ui-app/src/InputExtrinsic/options/section.ts @@ -2,17 +2,18 @@ // This software may be modified and distributed under the terms // of the ISC license. See the LICENSE file for details. +import { Extrinsic$Sections } from '@polkadot/extrinsics/types'; + import { DropdownOptions } from '../types'; import map from '@polkadot/extrinsics'; export default function createOptions (type: 'private' | 'public'): DropdownOptions { - const keys = [...map.keys()]; - - return keys + return Object + .keys(map) .sort() .filter((name) => { - const section = map.get(name); + const section = map[name as Extrinsic$Sections]; // cannot really get here if (!section) { diff --git a/packages/ui-app/src/InputRpc/SelectMethod.tsx b/packages/ui-app/src/InputRpc/SelectMethod.tsx index 05a272fd08..c3d66e5551 100644 --- a/packages/ui-app/src/InputRpc/SelectMethod.tsx +++ b/packages/ui-app/src/InputRpc/SelectMethod.tsx @@ -2,7 +2,8 @@ // This software may be modified and distributed under the terms // of the ISC license. See the LICENSE file for details. -import { Interface$Method, Interface$Sections } from '@polkadot/jsonrpc/types'; +import { SectionItem } from '@polkadot/params/types'; +import { Interfaces, Interface$Sections } from '@polkadot/jsonrpc/types'; import { DropdownOptions } from '../InputExtrinsic/types'; import { I18nProps } from '../types'; @@ -17,9 +18,9 @@ import translate from '../translate'; type Props = I18nProps & { isError?: boolean, label?: string, - onChange: (value: Interface$Method) => void, + onChange: (value: SectionItem) => void, options: DropdownOptions, - value: Interface$Method, + value: SectionItem, withLabel?: boolean }; @@ -28,9 +29,8 @@ function SelectMethod ({ className, isError, label = '', onChange, options, styl return null; } - const transform = (name: Interface$Sections): Interface$Method => - // @ts-ignore check? - map.get(section).public[name]; + const transform = (name: Interface$Sections): SectionItem => + map[section].public[name]; return ( void, options: DropdownOptions, - value: Interface$Method, + value: SectionItem, withLabel?: boolean }; diff --git a/packages/ui-app/src/InputRpc/index.tsx b/packages/ui-app/src/InputRpc/index.tsx index 2ff1f5dc94..42f43865fc 100644 --- a/packages/ui-app/src/InputRpc/index.tsx +++ b/packages/ui-app/src/InputRpc/index.tsx @@ -4,7 +4,8 @@ // TODO: We have a lot shared between this and InputExtrinsic & InputStorage -import { Interface$Method, Interface$Sections } from '@polkadot/jsonrpc/types'; +import { SectionItem } from '@polkadot/params/types'; +import { Interfaces, Interface$Sections } from '@polkadot/jsonrpc/types'; import { DropdownOptions } from '../InputExtrinsic/types'; import { I18nProps } from '../types'; @@ -22,18 +23,18 @@ import methodOptions from './options/method'; import sectionOptions from './options/section'; type Props = I18nProps & { - defaultValue: Interface$Method, + defaultValue: SectionItem, isError?: boolean, labelMethod?: string, labelSection?: string, - onChange: (value: Interface$Method) => void, + onChange: (value: SectionItem) => void, withLabel?: boolean }; type State = { optionsMethod: DropdownOptions, optionsSection: DropdownOptions, - value: Interface$Method + value: SectionItem }; class InputRpc extends React.PureComponent { @@ -80,7 +81,7 @@ class InputRpc extends React.PureComponent { ); } - onMethodChange = (value: Interface$Method): void => { + onMethodChange = (value: SectionItem): void => { const { onChange } = this.props; const { value: { name, section } } = this.state; @@ -101,8 +102,7 @@ class InputRpc extends React.PureComponent { } const optionsMethod = methodOptions(newSection); - // @ts-ignore check? - const value = map.get(newSection).public[optionsMethod[0].value]; + const value = map[newSection].public[optionsMethod[0].value]; this.setState({ optionsMethod }, () => this.onMethodChange(value) diff --git a/packages/ui-app/src/InputRpc/options/method.tsx b/packages/ui-app/src/InputRpc/options/method.tsx index a5267262c0..a47b2b5ae7 100644 --- a/packages/ui-app/src/InputRpc/options/method.tsx +++ b/packages/ui-app/src/InputRpc/options/method.tsx @@ -10,7 +10,7 @@ import React from 'react'; import map from '@polkadot/jsonrpc'; export default function createOptions (sectionName: Interface$Sections): DropdownOptions { - const section = map.get(sectionName); + const section = map[sectionName]; if (!section) { return []; diff --git a/packages/ui-app/src/InputRpc/options/section.ts b/packages/ui-app/src/InputRpc/options/section.ts index f9890eba67..d08cccf37d 100644 --- a/packages/ui-app/src/InputRpc/options/section.ts +++ b/packages/ui-app/src/InputRpc/options/section.ts @@ -2,17 +2,18 @@ // This software may be modified and distributed under the terms // of the ISC license. See the LICENSE file for details. +import { Interface$Sections } from '@polkadot/jsonrpc/types'; + import { DropdownOptions } from '../../InputExtrinsic/types'; import map from '@polkadot/jsonrpc'; export default function createOptions (): DropdownOptions { - const keys = [...map.keys()]; - - return keys + return Object + .keys(map) .sort() .filter((name) => { - const section = map.get(name); + const section = map[name as Interface$Sections]; // cannot really get here if (!section) { diff --git a/packages/ui-app/src/InputStorage/SelectKey.tsx b/packages/ui-app/src/InputStorage/SelectKey.tsx index 4ef9e9819b..1408a4fac8 100644 --- a/packages/ui-app/src/InputStorage/SelectKey.tsx +++ b/packages/ui-app/src/InputStorage/SelectKey.tsx @@ -2,7 +2,8 @@ // This software may be modified and distributed under the terms // of the ISC license. See the LICENSE file for details. -import { Storage$Key } from '@polkadot/storage/types'; +import { SectionItem } from '@polkadot/params/types'; +import { Storages } from '@polkadot/storage/types'; import { DropdownOptions } from '../InputExtrinsic/types'; import { I18nProps } from '../types'; @@ -17,9 +18,9 @@ import translate from '../translate'; type Props = I18nProps & { isError?: boolean, label?: string, - onChange: (value: Storage$Key) => void, + onChange: (value: SectionItem) => void, options: DropdownOptions, - value: Storage$Key, + value: SectionItem, withLabel?: boolean }; @@ -28,7 +29,7 @@ function SelectKey ({ className, isError, label = '', onChange, options, style, return null; } - const transform = (name: string): Storage$Key => + const transform = (name: string): SectionItem => // @ts-ignore check? map.get(section).public[name]; diff --git a/packages/ui-app/src/InputStorage/SelectSection.tsx b/packages/ui-app/src/InputStorage/SelectSection.tsx index ae9a89389c..9bb4149770 100644 --- a/packages/ui-app/src/InputStorage/SelectSection.tsx +++ b/packages/ui-app/src/InputStorage/SelectSection.tsx @@ -2,7 +2,8 @@ // This software may be modified and distributed under the terms // of the ISC license. See the LICENSE file for details. -import { Storage$Key, Storage$Sections } from '@polkadot/storage/types'; +import { SectionItem } from '@polkadot/params/types'; +import { Storages, Storage$Sections } from '@polkadot/storage/types'; import { DropdownOptions } from '../InputExtrinsic/types'; import { I18nProps } from '../types'; @@ -18,7 +19,7 @@ type Props = I18nProps & { label?: string, onChange: (value: Storage$Sections) => void, options: DropdownOptions, - value: Storage$Key, + value: SectionItem, withLabel?: boolean }; diff --git a/packages/ui-app/src/InputStorage/index.tsx b/packages/ui-app/src/InputStorage/index.tsx index 4fbeccf881..2ef9987680 100644 --- a/packages/ui-app/src/InputStorage/index.tsx +++ b/packages/ui-app/src/InputStorage/index.tsx @@ -4,7 +4,8 @@ // TODO: We have a lot shared between this and InputExtrinsic -import { Storage$Key, Storage$Sections } from '@polkadot/storage/types'; +import { SectionItem } from '@polkadot/params/types'; +import { Storages, Storage$Sections } from '@polkadot/storage/types'; import { DropdownOptions } from '../InputExtrinsic/types'; import { I18nProps } from '../types'; @@ -22,18 +23,18 @@ import keyOptions from './options/key'; import sectionOptions from './options/section'; type Props = I18nProps & { - defaultValue: Storage$Key, + defaultValue: SectionItem, isError?: boolean, labelMethod?: string, labelSection?: string, - onChange: (value: Storage$Key) => void, + onChange: (value: SectionItem) => void, withLabel?: boolean }; type State = { optionsMethod: DropdownOptions, optionsSection: DropdownOptions, - value: Storage$Key + value: SectionItem }; class InputStorage extends React.PureComponent { @@ -80,7 +81,7 @@ class InputStorage extends React.PureComponent { ); } - onKeyChange = (value: Storage$Key): void => { + onKeyChange = (value: SectionItem): void => { const { onChange } = this.props; const { value: { name, section } } = this.state; @@ -101,8 +102,7 @@ class InputStorage extends React.PureComponent { } const optionsMethod = keyOptions(newSection); - // @ts-ignore check? - const value = map.get(newSection).public[optionsMethod[0].value]; + const value = map[newSection].public[optionsMethod[0].value]; this.setState({ optionsMethod }, () => this.onKeyChange(value) diff --git a/packages/ui-app/src/InputStorage/options/key.tsx b/packages/ui-app/src/InputStorage/options/key.tsx index ced2f4a646..24eaf97259 100644 --- a/packages/ui-app/src/InputStorage/options/key.tsx +++ b/packages/ui-app/src/InputStorage/options/key.tsx @@ -10,7 +10,7 @@ import React from 'react'; import map from '@polkadot/storage'; export default function createOptions (sectionName: Storage$Sections): DropdownOptions { - const section = map.get(sectionName); + const section = map[sectionName]; if (!section) { return []; diff --git a/packages/ui-app/src/InputStorage/options/section.ts b/packages/ui-app/src/InputStorage/options/section.ts index ec6d4f58ef..80ec92c29e 100644 --- a/packages/ui-app/src/InputStorage/options/section.ts +++ b/packages/ui-app/src/InputStorage/options/section.ts @@ -2,17 +2,17 @@ // This software may be modified and distributed under the terms // of the ISC license. See the LICENSE file for details. +import { Storage$Sections } from '@polkadot/storage/types'; import { DropdownOptions } from '../../InputExtrinsic/types'; import map from '@polkadot/storage'; export default function createOptions (): DropdownOptions { - const keys = [...map.keys()]; - - return keys + return Object + .keys(map) .sort() .filter((name) => { - const section = map.get(name); + const section = map[name as Storage$Sections]; // cannot really get here if (!section) { diff --git a/packages/ui-app/src/Params/index.tsx b/packages/ui-app/src/Params/index.tsx index bdafe73774..9950ebfe8a 100644 --- a/packages/ui-app/src/Params/index.tsx +++ b/packages/ui-app/src/Params/index.tsx @@ -2,9 +2,9 @@ // This software may be modified and distributed under the terms // of the ISC license. See the LICENSE file for details. -import { Section$Item } from '@polkadot/params/types'; +import { SectionItem } from '@polkadot/params/types'; import { I18nProps } from '../types'; -import { ComponentMap, RawParam, RawParams, RawParam$OnChange, RawParam$OnChange$Value } from './types'; +import { ComponentMap, RawParams, RawParam$OnChange, RawParam$OnChange$Value } from './types'; import './Params.css'; @@ -15,28 +15,28 @@ import translate from '../translate'; import Param from './Param'; import createValues from './values'; -type Props = I18nProps & { - item: SectionItem, +type Props = I18nProps & { + item: S, onChange: (value: RawParams) => void, overrides?: ComponentMap }; -type State = { - item: SectionItem, +type State = { + item: S, handlers: Array, onChangeParam: (at: number, next: RawParam$OnChange$Value) => void, values: RawParams }; -class Params> extends React.PureComponent, State> { - state: State; +class Params> extends React.PureComponent, State> { + state: State; - constructor (props: Props) { + constructor (props: Props) { super(props); this.state = ({ onChangeParam: this.onChangeParam - } as State); + } as State); } static getDerivedStateFromProps (props: Props, { item, onChangeParam }: State): State | null { @@ -53,22 +53,12 @@ class Params> extends React.PureComponent ); return { - item, + item: props.item, handlers, values } as State; } - // FIXME Do we really need this one? The fact that we have to do deep inspection here just shows something is amis? We notify on param change below. Really cannot remember or see the actual real need here - apart from making things more complicated than they should be. (But there must be a reason) - // componentDidUpdate (prevProps: Props, prevState: State) { - // const { onChange } = this.props; - // const { values } = this.state; - - // if (JSON.stringify(prevState.values) !== JSON.stringify(values)) { - // onChange(values); - // } - // } - render () { const { className, item: { params }, overrides, style } = this.props; const { handlers, values } = this.state; @@ -99,8 +89,8 @@ class Params> extends React.PureComponent onChangeParam = (at: number, { isValid = false, value }: RawParam$OnChange$Value): void => { this.setState( - (prevState: State): State => { - const values = prevState.values.map((prev, index) => + (prevState: State): State => ({ + values: prevState.values.map((prev, index) => index !== at ? prev : { @@ -108,24 +98,19 @@ class Params> extends React.PureComponent type: prev.type, value } - ); - - // FIXME this should really be as the second parameter of setState, however... that stopped working, never getting the latest version from the actual state - this.props.onChange(values); - - return { - values - } as State; - }, + ) + } as State), this.triggerUpdate ); } triggerUpdate = (): void => { - // BUG The actual values here is not the actual new values - seems React related, was working on 16.3 - // console.log('triggerUpdate', arguments, this.state.values); - // this.props.onChange(this.state.values); + const { values } = this.state; + const { onChange } = this.props; + + onChange(values); } } +// @ts-ignore something is wrong with generics and these imports export default translate(Params); diff --git a/packages/ui-react-rx/package.json b/packages/ui-react-rx/package.json index 48077160da..194e5c480c 100644 --- a/packages/ui-react-rx/package.json +++ b/packages/ui-react-rx/package.json @@ -36,9 +36,9 @@ }, "dependencies": { "@babel/runtime": "^7.0.0-beta.51", - "@polkadot/api-rx": "^0.14.5", - "@polkadot/extrinsics-codec": "^0.19.5", - "@polkadot/storage": "^0.19.5" + "@polkadot/api-rx": "^0.14.6", + "@polkadot/extrinsics-codec": "^0.20.1", + "@polkadot/storage": "^0.20.1" }, "devDependencies": { "babel-loader": "^8.0.0-beta.2", diff --git a/packages/ui-react-rx/src/Balance.ts b/packages/ui-react-rx/src/Balance.ts index a54d9158c2..8ff878fe86 100644 --- a/packages/ui-react-rx/src/Balance.ts +++ b/packages/ui-react-rx/src/Balance.ts @@ -7,8 +7,7 @@ import storage from '@polkadot/storage'; import numberFormat from './util/numberFormat'; import withStorageDiv from './with/storageDiv'; -// @ts-ignore check? -const method = storage.get('staking').public.freeBalanceOf; +const method = storage.staking.public.freeBalanceOf; const Component: React.ComponentType = withStorageDiv(method)( numberFormat, diff --git a/packages/ui-react-rx/src/BestNumber.ts b/packages/ui-react-rx/src/BestNumber.ts index 7a6af7c6ba..5691c92c28 100644 --- a/packages/ui-react-rx/src/BestNumber.ts +++ b/packages/ui-react-rx/src/BestNumber.ts @@ -9,8 +9,7 @@ import rpcs from '@polkadot/jsonrpc'; import numberFormat from './util/numberFormat'; import withApiDiv from './with/apiDiv'; -// @ts-ignore check? -const method = rpcs.get('chain').public.newHead; +const method = rpcs.chain.public.newHead; const Component: React.ComponentType = withApiDiv(method)( (value?: Header): string => { diff --git a/packages/ui-react-rx/src/Chain.ts b/packages/ui-react-rx/src/Chain.ts index 3c12820bcc..bb04e658e5 100644 --- a/packages/ui-react-rx/src/Chain.ts +++ b/packages/ui-react-rx/src/Chain.ts @@ -6,8 +6,7 @@ import rpcs from '@polkadot/jsonrpc'; import withApiDiv from './with/apiDiv'; -// @ts-ignore check? -const method = rpcs.get('system').public.chain; +const method = rpcs.system.public.chain; const Component: React.ComponentType = withApiDiv(method)( (value: string = 'unknown'): string => diff --git a/packages/ui-react-rx/src/NodeName.ts b/packages/ui-react-rx/src/NodeName.ts index 56077eeb21..54dcb07cde 100644 --- a/packages/ui-react-rx/src/NodeName.ts +++ b/packages/ui-react-rx/src/NodeName.ts @@ -6,8 +6,7 @@ import rpcs from '@polkadot/jsonrpc'; import withApiDiv from './with/apiDiv'; -// @ts-ignore check? -const method = rpcs.get('system').public.name; +const method = rpcs.system.public.name; const Component: React.ComponentType = withApiDiv(method)( (value: string = 'unknown'): string => diff --git a/packages/ui-react-rx/src/NodeTime.ts b/packages/ui-react-rx/src/NodeTime.ts index 8fc0e6c419..05f92cba6d 100644 --- a/packages/ui-react-rx/src/NodeTime.ts +++ b/packages/ui-react-rx/src/NodeTime.ts @@ -6,8 +6,7 @@ import storage from '@polkadot/storage'; import withStorageDiv from './with/storageDiv'; -// @ts-ignore check? -const method = storage.get('timestamp').public.current; +const method = storage.timestamp.public.current; const Component: React.ComponentType = withStorageDiv(method)( (value?: Date): string => { diff --git a/packages/ui-react-rx/src/NodeVersion.ts b/packages/ui-react-rx/src/NodeVersion.ts index c052469308..afa6496451 100644 --- a/packages/ui-react-rx/src/NodeVersion.ts +++ b/packages/ui-react-rx/src/NodeVersion.ts @@ -6,8 +6,7 @@ import rpcs from '@polkadot/jsonrpc'; import withApiDiv from './with/apiDiv'; -// @ts-ignore check? -const method = rpcs.get('system').public.version; +const method = rpcs.system.public.version; const Component: React.ComponentType = withApiDiv(method)( (value: string = 'unknown'): string => diff --git a/packages/ui-react-rx/src/Nonce.ts b/packages/ui-react-rx/src/Nonce.ts index 33c6aff831..b9360a93f2 100644 --- a/packages/ui-react-rx/src/Nonce.ts +++ b/packages/ui-react-rx/src/Nonce.ts @@ -7,8 +7,7 @@ import storage from '@polkadot/storage'; import numberFormat from './util/numberFormat'; import withStorageDiv from './with/storageDiv'; -// @ts-ignore check? -const method = storage.get('system').public.accountIndexOf; +const method = storage.system.public.accountIndexOf; const Component: React.ComponentType = withStorageDiv(method)( numberFormat, diff --git a/packages/ui-react-rx/src/with/storage.tsx b/packages/ui-react-rx/src/with/storage.tsx index 1d5b95a483..7e22a788c8 100644 --- a/packages/ui-react-rx/src/with/storage.tsx +++ b/packages/ui-react-rx/src/with/storage.tsx @@ -4,7 +4,8 @@ // TODO: Lots of duplicated code between this and withObservable, surely there ois a better way of doing this? -import { Storage$Key, Storage$Key$Value } from '@polkadot/storage/types'; +import { SectionItem } from '@polkadot/params/types'; +import { Storages, Storage$Key$Value } from '@polkadot/storage/types'; import { ApiProps, BareProps, ChangeProps, ParamProps, RxProps } from '../types'; import { HOC, StorageOptions, DefaultProps, Transform } from './types'; @@ -34,7 +35,7 @@ type State = RxProps & { // FIXME proper types for attributes -export default function withStorage (key: Storage$Key, { onChange, params, propName = 'value', transform }: StorageOptions = {}): HOC { +export default function withStorage (key: SectionItem, { onChange, params, propName = 'value', transform }: StorageOptions = {}): HOC { const keyCreator = storageKey(key); const storageTransform = createTransform(key); const createKey = (propParams?: Array): Uint8Array => { diff --git a/packages/ui-react-rx/src/with/storageDiv.ts b/packages/ui-react-rx/src/with/storageDiv.ts index 6636b85a08..3c99703441 100644 --- a/packages/ui-react-rx/src/with/storageDiv.ts +++ b/packages/ui-react-rx/src/with/storageDiv.ts @@ -2,14 +2,15 @@ // This software may be modified and distributed under the terms // of the ISC license. See the LICENSE file for details. -import { Storage$Key } from '@polkadot/storage/types'; +import { SectionItem } from '@polkadot/params/types'; +import { Storages } from '@polkadot/storage/types'; import { BaseProps } from '../types'; import { ComponentRenderer, DefaultProps, RenderFn, StorageOptions } from './types'; import Div from '../Div'; import withStorage from './storage'; -export default function withStorageDiv> (key: Storage$Key, options?: StorageOptions): ComponentRenderer { +export default function withStorageDiv> (key: SectionItem, options?: StorageOptions): ComponentRenderer { return (render: RenderFn, defaultProps: DefaultProps = {}): React.ComponentType => withStorage(key, options)(Div, { ...defaultProps, diff --git a/packages/ui-react-rx/src/with/transform/storage.ts b/packages/ui-react-rx/src/with/transform/storage.ts index 614812547b..9aa6cebc99 100644 --- a/packages/ui-react-rx/src/with/transform/storage.ts +++ b/packages/ui-react-rx/src/with/transform/storage.ts @@ -2,13 +2,13 @@ // This software may be modified and distributed under the terms // of the ISC license. See the LICENSE file for details. -import { Param$Values } from '@polkadot/params/types'; -import { Storage$Key } from '@polkadot/storage/types'; +import { Param$Values, SectionItem } from '@polkadot/params/types'; +import { Storages } from '@polkadot/storage/types'; import { StorageTransform } from '../types'; import decodeParams from '@polkadot/params/decode'; -export default function storageTransform ({ type }: Storage$Key): StorageTransform { +export default function storageTransform ({ type }: SectionItem): StorageTransform { return (input: Uint8Array = new Uint8Array(0), index: number): Param$Values | null => { try { // FIXME We don't do any conversion checks for the type, currently not an issue, but _could_ turn out to be problematic diff --git a/packages/ui-react-rx/src/with/types.d.ts b/packages/ui-react-rx/src/with/types.d.ts index 02032af9c9..04983a2c3f 100644 --- a/packages/ui-react-rx/src/with/types.d.ts +++ b/packages/ui-react-rx/src/with/types.d.ts @@ -2,7 +2,6 @@ // This software may be modified and distributed under the terms // of the ISC license. See the LICENSE file for details. -import { Interface$Method } from '@polkadot/jsonrpc/types'; import { Param$Values } from '@polkadot/params/types'; import { Storage$Key$Value } from '@polkadot/storage/types'; import { OnChangeCb } from '../types'; diff --git a/packages/ui-signer/package.json b/packages/ui-signer/package.json index 1a2f69a6ac..c96afc8c80 100644 --- a/packages/ui-signer/package.json +++ b/packages/ui-signer/package.json @@ -16,7 +16,7 @@ }, "dependencies": { "@babel/runtime": "^7.0.0-beta.51", - "@polkadot/extrinsics": "^0.19.5", + "@polkadot/extrinsics": "^0.20.1", "@polkadot/ui-app": "^0.18.1", "@polkadot/ui-keyring": "^0.18.1" }, diff --git a/packages/ui-signer/src/Extrinsic.tsx b/packages/ui-signer/src/Extrinsic.tsx index 5ba27bad13..efde2fb57b 100644 --- a/packages/ui-signer/src/Extrinsic.tsx +++ b/packages/ui-signer/src/Extrinsic.tsx @@ -23,7 +23,7 @@ type Props = I18nProps & { }; function findExtrinsic (sectionId: number, methodId: number): { method: string | undefined, section: string | undefined } { - const section = [...extrinsics.values()].find(({ index }) => + const section = Object.values(extrinsics).find(({ index }) => index[0] === sectionId ); const methods = section diff --git a/packages/ui-signer/src/submit.ts b/packages/ui-signer/src/submit.ts index 4028bd957c..7bb6e19177 100644 --- a/packages/ui-signer/src/submit.ts +++ b/packages/ui-signer/src/submit.ts @@ -3,13 +3,14 @@ // of the ISC license. See the LICENSE file for details. import { RxApiInterface } from '@polkadot/api-rx/types'; -import { Interface$Method } from '@polkadot/jsonrpc/types'; +import { SectionItem } from '@polkadot/params/types'; +import { Interfaces, Interface$Sections } from '@polkadot/jsonrpc/types'; import { Param$Values } from '@polkadot/params/types'; import { QueueTx$Result } from './types'; -export default async function submitMessage (api: RxApiInterface, params: Array, { name, section }: Interface$Method): Promise { +export default async function submitMessage (api: RxApiInterface, params: Array, { name, section }: SectionItem): Promise { try { - const result = await api[section][name].apply(null, params).toPromise(); + const result = await api[section as Interface$Sections][name].apply(null, params).toPromise(); console.log(`${section}.${name}: result ::`, result); diff --git a/packages/ui-signer/src/types.d.ts b/packages/ui-signer/src/types.d.ts index 343612a06e..5c82c118d7 100644 --- a/packages/ui-signer/src/types.d.ts +++ b/packages/ui-signer/src/types.d.ts @@ -3,7 +3,8 @@ // of the ISC license. See the LICENSE file for details. import BN from 'bn.js'; -import { Interface$Method } from '@polkadot/jsonrpc/types'; +import { SectionItem } from '@polkadot/params/types'; +import { Interfaces } from '@polkadot/jsonrpc/types'; import { Param$Values } from '@polkadot/params/types'; export type EncodedMessage = { @@ -22,7 +23,7 @@ export type QueueTx$Result = { } export type QueueTx$Base = EncodedMessage & { - rpc: Interface$Method, + rpc: SectionItem, nonce: BN, publicKey?: Uint8Array | null }; diff --git a/yarn.lock b/yarn.lock index aa57654b77..f8e55ca8ba 100644 --- a/yarn.lock +++ b/yarn.lock @@ -871,22 +871,22 @@ version "1.0.2" resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-1.0.2.tgz#d056b68999769728a1cff8d643bc59eb6f0be436" -"@polkadot/api-format@^0.14.5": - version "0.14.5" - resolved "https://registry.yarnpkg.com/@polkadot/api-format/-/api-format-0.14.5.tgz#01defcba928f33944815286a9e5fcb8438c719b7" +"@polkadot/api-format@^0.14.6": + version "0.14.6" + resolved "https://registry.yarnpkg.com/@polkadot/api-format/-/api-format-0.14.6.tgz#3b275ab3678acb4c993c470ee80b4f5811403c40" dependencies: "@babel/runtime" "^7.0.0-beta.51" - "@polkadot/jsonrpc" "^0.19.5" - "@polkadot/primitives-json" "^0.19.5" + "@polkadot/jsonrpc" "^0.20.1" + "@polkadot/primitives-json" "^0.20.1" "@polkadot/util" "^0.24.6" "@polkadot/util-keyring" "^0.24.6" -"@polkadot/api-provider@^0.14.5": - version "0.14.5" - resolved "https://registry.yarnpkg.com/@polkadot/api-provider/-/api-provider-0.14.5.tgz#37bf002d54b31c66a5740f8e3984c771adbbc3ed" +"@polkadot/api-provider@^0.14.6": + version "0.14.6" + resolved "https://registry.yarnpkg.com/@polkadot/api-provider/-/api-provider-0.14.6.tgz#5853eec2cb4dbe58c959f84cd7e4fe84770a29aa" dependencies: "@babel/runtime" "^7.0.0-beta.51" - "@polkadot/storage" "^0.19.5" + "@polkadot/storage" "^0.20.1" "@polkadot/util" "^0.24.6" "@polkadot/util-crypto" "^0.24.6" "@polkadot/util-keyring" "^0.24.6" @@ -895,25 +895,25 @@ isomorphic-fetch "^2.2.1" websocket "^1.0.25" -"@polkadot/api-rx@^0.14.5": - version "0.14.5" - resolved "https://registry.yarnpkg.com/@polkadot/api-rx/-/api-rx-0.14.5.tgz#1adaaee768bf90bea74ad371cae9678d1cb55f49" +"@polkadot/api-rx@^0.14.6": + version "0.14.6" + resolved "https://registry.yarnpkg.com/@polkadot/api-rx/-/api-rx-0.14.6.tgz#4d9f7de4c1d85082c4ee089db319046716d71cf7" dependencies: "@babel/runtime" "^7.0.0-beta.51" - "@polkadot/api" "^0.14.5" - "@polkadot/api-provider" "^0.14.5" + "@polkadot/api" "^0.14.6" + "@polkadot/api-provider" "^0.14.6" "@types/rx" "^4.1.1" rxjs "^5.5.10" -"@polkadot/api@^0.14.5": - version "0.14.5" - resolved "https://registry.yarnpkg.com/@polkadot/api/-/api-0.14.5.tgz#3ec0172ae10edf85eb0699a3b7ef6591d85be6e6" +"@polkadot/api@^0.14.6": + version "0.14.6" + resolved "https://registry.yarnpkg.com/@polkadot/api/-/api-0.14.6.tgz#141c2a9a2870c8ca83190eb97e723c493e7cd886" dependencies: "@babel/runtime" "^7.0.0-beta.51" - "@polkadot/api-format" "^0.14.5" - "@polkadot/api-provider" "^0.14.5" - "@polkadot/jsonrpc" "^0.19.5" - "@polkadot/params" "^0.19.5" + "@polkadot/api-format" "^0.14.6" + "@polkadot/api-provider" "^0.14.6" + "@polkadot/jsonrpc" "^0.20.1" + "@polkadot/params" "^0.20.1" "@polkadot/util" "^0.24.6" "@polkadot/dev-react@^0.20.3": @@ -980,96 +980,96 @@ rimraf "^2.6.2" typescript "^2.9.2" -"@polkadot/extrinsics-codec@^0.19.5": - version "0.19.5" - resolved "https://registry.yarnpkg.com/@polkadot/extrinsics-codec/-/extrinsics-codec-0.19.5.tgz#74c794b3caa696764be41b6a4317e3720bc11de3" +"@polkadot/extrinsics-codec@^0.20.1": + version "0.20.1" + resolved "https://registry.yarnpkg.com/@polkadot/extrinsics-codec/-/extrinsics-codec-0.20.1.tgz#970897bf836bd7e0de95a1ca1bfed1db021e4e3c" dependencies: "@babel/runtime" "^7.0.0-beta.51" - "@polkadot/extrinsics" "^0.19.5" - "@polkadot/params" "^0.19.5" + "@polkadot/extrinsics" "^0.20.1" + "@polkadot/params" "^0.20.1" "@polkadot/util" "^0.24.6" "@polkadot/util-keyring" "^0.24.6" bn.js "^4.11.8" -"@polkadot/extrinsics@^0.19.5": - version "0.19.5" - resolved "https://registry.yarnpkg.com/@polkadot/extrinsics/-/extrinsics-0.19.5.tgz#da7f25e3741354f0858c7b3bcfea6cc0ab646383" +"@polkadot/extrinsics@^0.20.1": + version "0.20.1" + resolved "https://registry.yarnpkg.com/@polkadot/extrinsics/-/extrinsics-0.20.1.tgz#c1dcecf5e649a38a9da7ac6a6603746ebb954ce6" dependencies: "@babel/runtime" "^7.0.0-beta.51" - "@polkadot/params" "^0.19.5" - "@polkadot/primitives" "^0.19.5" + "@polkadot/params" "^0.20.1" + "@polkadot/primitives" "^0.20.1" "@polkadot/util" "^0.24.6" -"@polkadot/jsonrpc@^0.19.5": - version "0.19.5" - resolved "https://registry.yarnpkg.com/@polkadot/jsonrpc/-/jsonrpc-0.19.5.tgz#7d7c9a36425812644f5cc469791e1b714956827c" +"@polkadot/jsonrpc@^0.20.1": + version "0.20.1" + resolved "https://registry.yarnpkg.com/@polkadot/jsonrpc/-/jsonrpc-0.20.1.tgz#0026fdf3d56c9acf6890457bfad80fe11c27f29c" dependencies: - "@polkadot/params" "^0.19.5" + "@polkadot/params" "^0.20.1" babel-runtime "^6.26.0" -"@polkadot/params@^0.19.5": - version "0.19.5" - resolved "https://registry.yarnpkg.com/@polkadot/params/-/params-0.19.5.tgz#ecfb93a5696e9d9423412a033897adcc18a8342c" +"@polkadot/params@^0.20.1": + version "0.20.1" + resolved "https://registry.yarnpkg.com/@polkadot/params/-/params-0.20.1.tgz#b38863fed3f599b30d9ee23c0c1265b581edc090" dependencies: "@babel/runtime" "^7.0.0-beta.51" - "@polkadot/extrinsics" "^0.19.5" - "@polkadot/extrinsics-codec" "^0.19.5" - "@polkadot/primitives" "^0.19.5" + "@polkadot/extrinsics" "^0.20.1" + "@polkadot/extrinsics-codec" "^0.20.1" + "@polkadot/primitives" "^0.20.1" "@polkadot/util" "^0.24.6" -"@polkadot/primitives-builder@^0.19.5": - version "0.19.5" - resolved "https://registry.yarnpkg.com/@polkadot/primitives-builder/-/primitives-builder-0.19.5.tgz#55330d20ed3924bfe23d951d8490cb2303577a5b" +"@polkadot/primitives-builder@^0.20.1": + version "0.20.1" + resolved "https://registry.yarnpkg.com/@polkadot/primitives-builder/-/primitives-builder-0.20.1.tgz#c9e062f72b49d1237bfe256352453765210ea04e" dependencies: "@babel/runtime" "^7.0.0-beta.51" - "@polkadot/extrinsics-codec" "^0.19.5" - "@polkadot/primitives" "^0.19.5" - "@polkadot/primitives-codec" "^0.19.5" + "@polkadot/extrinsics-codec" "^0.20.1" + "@polkadot/primitives" "^0.20.1" + "@polkadot/primitives-codec" "^0.20.1" "@polkadot/util" "^0.24.6" "@polkadot/util-crypto" "^0.24.6" "@polkadot/util-triehash" "^0.24.6" -"@polkadot/primitives-codec@^0.19.5": - version "0.19.5" - resolved "https://registry.yarnpkg.com/@polkadot/primitives-codec/-/primitives-codec-0.19.5.tgz#91649d66b212bb6f11ff466908f1b43006df8db5" +"@polkadot/primitives-codec@^0.20.1": + version "0.20.1" + resolved "https://registry.yarnpkg.com/@polkadot/primitives-codec/-/primitives-codec-0.20.1.tgz#d57053e91d8362d22d52cb14835f9d78ff20394c" dependencies: "@babel/runtime" "^7.0.0-beta.51" - "@polkadot/primitives" "^0.19.5" - "@polkadot/primitives-builder" "^0.19.5" + "@polkadot/primitives" "^0.20.1" + "@polkadot/primitives-builder" "^0.20.1" "@polkadot/util" "^0.24.6" "@polkadot/util-crypto" "^0.24.6" "@polkadot/util-keyring" "^0.24.6" -"@polkadot/primitives-json@^0.19.5": - version "0.19.5" - resolved "https://registry.yarnpkg.com/@polkadot/primitives-json/-/primitives-json-0.19.5.tgz#452b6827e7f707211cd786b8a1362686a0cf27aa" +"@polkadot/primitives-json@^0.20.1": + version "0.20.1" + resolved "https://registry.yarnpkg.com/@polkadot/primitives-json/-/primitives-json-0.20.1.tgz#808e08cca3a99b4d61117da60d3119beb7c3d801" dependencies: "@babel/runtime" "^7.0.0-beta.51" - "@polkadot/primitives" "^0.19.5" - "@polkadot/primitives-builder" "^0.19.5" + "@polkadot/primitives" "^0.20.1" + "@polkadot/primitives-builder" "^0.20.1" "@polkadot/util" "^0.24.6" -"@polkadot/primitives@^0.19.5": - version "0.19.5" - resolved "https://registry.yarnpkg.com/@polkadot/primitives/-/primitives-0.19.5.tgz#730b3750fe21bf84b7ef00b71aa72ebeb0138ce3" +"@polkadot/primitives@^0.20.1": + version "0.20.1" + resolved "https://registry.yarnpkg.com/@polkadot/primitives/-/primitives-0.20.1.tgz#a63693b5e86eef19d9df8602da05d0a284d7bcf1" dependencies: "@babel/runtime" "^7.0.0-beta.51" "@polkadot/util" "^0.24.6" -"@polkadot/storage@^0.19.5": - version "0.19.5" - resolved "https://registry.yarnpkg.com/@polkadot/storage/-/storage-0.19.5.tgz#375a5a98718b24941a198f7e1833a62b7830ef22" +"@polkadot/storage@^0.20.1": + version "0.20.1" + resolved "https://registry.yarnpkg.com/@polkadot/storage/-/storage-0.20.1.tgz#84f5d1614eecdfca4cd7a5b577a1c29e095f95ed" dependencies: "@babel/runtime" "^7.0.0-beta.51" - "@polkadot/params" "^0.19.5" - "@polkadot/primitives" "^0.19.5" + "@polkadot/params" "^0.20.1" + "@polkadot/primitives" "^0.20.1" "@polkadot/util" "^0.24.6" "@polkadot/util-crypto" "^0.24.6" "@polkadot/util-keyring" "^0.24.6" -"@polkadot/ts@^0.1.2": - version "0.1.2" - resolved "https://registry.yarnpkg.com/@polkadot/ts/-/ts-0.1.2.tgz#816e9e2c419ce464357c135f61079f11c9c44488" +"@polkadot/ts@^0.1.3": + version "0.1.3" + resolved "https://registry.yarnpkg.com/@polkadot/ts/-/ts-0.1.3.tgz#e277fb89c43a64b244a6d1ae03fc4ede128b155d" "@polkadot/util-crypto@^0.24.6": version "0.24.6"