Fix extrinsics app [object Object] (#1319)
This commit is contained in:
parent
994c0fc86f
commit
31a78cef00
@ -61,10 +61,7 @@ class ExtrinsicDisplay extends React.PureComponent<Props, State> {
|
||||
label={label}
|
||||
onChange={this.onChangeMethod}
|
||||
withLabel={withLabel}
|
||||
help={
|
||||
meta && meta.documentation
|
||||
&& meta.documentation.join(' ')
|
||||
}
|
||||
help={meta && meta.documentation && meta.documentation.join(' ')}
|
||||
/>
|
||||
<Params
|
||||
key={`${section}.${method}:params` /* force re-render on change */}
|
||||
@ -94,9 +91,7 @@ class ExtrinsicDisplay extends React.PureComponent<Props, State> {
|
||||
if (isValid) {
|
||||
try {
|
||||
method = methodfn(
|
||||
...values.map(({ value }) =>
|
||||
value
|
||||
)
|
||||
...values.map(({ value }) => value)
|
||||
);
|
||||
} catch (error) {
|
||||
// swallow
|
||||
|
||||
@ -34,11 +34,7 @@ class ExtrinsicDisplay extends React.PureComponent<Props> {
|
||||
isDisabled={isDisabled}
|
||||
isError={isError}
|
||||
isPrivate={isPrivate}
|
||||
label={t('{{label}} (extrinsic)', {
|
||||
replace: {
|
||||
label
|
||||
}
|
||||
})}
|
||||
label={<>{label} {t('(extrinsic)')}</>}
|
||||
onChange={this.onChange}
|
||||
onEnter={onEnter}
|
||||
style={style}
|
||||
|
||||
@ -6,17 +6,12 @@ import { I18nProps } from '@polkadot/ui-app/types';
|
||||
import { BaseProps, Props as ComponentProps, ComponentMap } from '../types';
|
||||
|
||||
import React from 'react';
|
||||
import styled from 'styled-components';
|
||||
import { classes } from '@polkadot/ui-app/util';
|
||||
import translate from '@polkadot/ui-app/translate';
|
||||
import { isUndefined } from '@polkadot/util';
|
||||
|
||||
import findComponent from './findComponent';
|
||||
|
||||
const Type = styled.span`
|
||||
font-family: monospace;
|
||||
`;
|
||||
|
||||
type Props = I18nProps & BaseProps & {
|
||||
isDisabled?: boolean,
|
||||
overrides?: ComponentMap
|
||||
@ -55,11 +50,9 @@ class ParamComponent extends React.PureComponent<Props, State> {
|
||||
key={`${name}:${type}`}
|
||||
isDisabled={isDisabled}
|
||||
label={
|
||||
<Type>
|
||||
{isUndefined(name)
|
||||
? type.type
|
||||
: `${name}: ${type.type}`}
|
||||
</Type>
|
||||
isUndefined(name)
|
||||
? type.type
|
||||
: `${name}: ${type.type}`
|
||||
}
|
||||
name={name}
|
||||
onChange={onChange}
|
||||
|
||||
@ -5,6 +5,10 @@
|
||||
.ui--Params {
|
||||
border-left: 0.25rem solid #f2f2f2;
|
||||
|
||||
label {
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
.ui--row {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user