diff --git a/packages/react-params/src/Param/findComponent.ts b/packages/react-params/src/Param/findComponent.ts index 11da49c8bc..4fba3fdd75 100644 --- a/packages/react-params/src/Param/findComponent.ts +++ b/packages/react-params/src/Param/findComponent.ts @@ -37,14 +37,14 @@ interface TypeToComponent { const components: ComponentMap = ([ { c: Account, t: ['AccountId', 'AccountIdOf', 'Address', 'AuthorityId', 'SessionKey', 'ValidatorId'] }, - { c: Amount, t: ['AccountIndex', 'AssetId', 'BlockNumber', 'Gas', 'Index', 'Nonce', 'ParaId', 'ProposalIndex', 'PropIndex', 'ReferendumIndex', 'u16', 'u32', 'u64', 'u128', 'u256', 'VoteIndex'] }, + { c: Amount, t: ['AccountIndex', 'AssetId', 'BlockNumber', 'Gas', 'Index', 'Nonce', 'ParaId', 'ProposalIndex', 'PropIndex', 'ReferendumIndex', 'i8', 'i16', 'i32', 'i64', 'i128', 'u8', 'u16', 'u32', 'u64', 'u128', 'u256', 'VoteIndex'] }, { c: Balance, t: ['Amount', 'AssetOf', 'Balance', 'BalanceOf'] }, { c: Bool, t: ['bool'] }, { c: Bytes, t: ['Bytes'] }, { c: Code, t: ['Code'] }, { c: Data, t: ['Data', 'Keys'] }, { c: Enum, t: ['Enum'] }, - { c: Hash, t: ['CodeHash', 'Hash', 'SeedOf', 'Signature'] }, + { c: Hash, t: ['CodeHash', 'Hash', 'H256', 'H512', 'SeedOf', 'Signature'] }, { c: KeyValue, t: ['KeyValue'] }, { c: KeyValueArray, t: ['Vec'] }, { c: Moment, t: ['Moment', 'MomentOf'] }, diff --git a/packages/react-params/src/initValue.ts b/packages/react-params/src/initValue.ts index 165789b959..8578f2f521 100644 --- a/packages/react-params/src/initValue.ts +++ b/packages/react-params/src/initValue.ts @@ -46,6 +46,13 @@ export default function getInitValue (def: TypeDef): RawParamValue | RawParamVal case 'PropIndex': case 'ProposalIndex': case 'ReferendumIndex': + case 'i8': + case 'i16': + case 'i32': + case 'i64': + case 'i128': + case 'u8': + case 'u16': case 'u32': case 'u64': case 'u128': @@ -75,6 +82,12 @@ export default function getInitValue (def: TypeDef): RawParamValue | RawParamVal case 'Hash': return createType('Hash'); + case 'H256': + return createType('H256'); + + case 'H512': + return createType('H512'); + case 'Data': case 'Keys': return '';