Add proper label to method decoding inputs (#4136)
This commit is contained in:
parent
a4b93b4b88
commit
8d3d76c107
@ -377,11 +377,15 @@ class MethodDecoding extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const inputs = methodInputs.map((input, index) => {
|
const inputs = methodInputs.map((input, index) => {
|
||||||
|
const label = input.name
|
||||||
|
? `${input.name}: ${input.type}`
|
||||||
|
: input.type;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<TypedInput
|
<TypedInput
|
||||||
allowCopy
|
allowCopy
|
||||||
className={ styles.input }
|
className={ styles.input }
|
||||||
label={ input.type }
|
label={ label }
|
||||||
key={ index }
|
key={ index }
|
||||||
param={ input.type }
|
param={ input.type }
|
||||||
readOnly
|
readOnly
|
||||||
|
@ -164,8 +164,8 @@ export default class MethodDecodingStore {
|
|||||||
methodInputs = this.api.util
|
methodInputs = this.api.util
|
||||||
.decodeMethodInput(abi, paramdata)
|
.decodeMethodInput(abi, paramdata)
|
||||||
.map((value, index) => {
|
.map((value, index) => {
|
||||||
const type = abi.inputs[index].type;
|
const { name, type } = abi.inputs[index];
|
||||||
return { type, value };
|
return { name, type, value };
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user