Only display extrinsic hash on block info (#1227)

This commit is contained in:
Jaco Greeff 2019-05-28 16:55:14 +02:00 committed by GitHub
parent db9031aa58
commit bfaa44d285
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View File

@ -71,6 +71,7 @@ class Extrinsics extends React.PureComponent<Props> {
<Call
className='details'
value={extrinsic}
withHash
/>
</details>
</article>

View File

@ -15,7 +15,8 @@ import { classes } from './util';
export type Props = BareProps & {
children?: React.ReactNode,
value: IExtrinsic | IMethod
value: IExtrinsic | IMethod,
withHash?: boolean
};
const Wrapper = styled.div`
@ -29,7 +30,7 @@ const Wrapper = styled.div`
export default class Call extends React.PureComponent<Props> {
render () {
const { children, className, style, value } = this.props;
const { children, className, style, value, withHash } = this.props;
const params = Method.filterOrigin(value.meta).map(({ name, type }) => ({
name: name.toString(),
type: getTypeDef(type)
@ -38,7 +39,9 @@ export default class Call extends React.PureComponent<Props> {
isValid: true,
value
}));
const hash = (value as IExtrinsic).hash;
const hash = withHash
? (value as IExtrinsic).hash
: null;
return (
<Wrapper