Use signature of functions instead of names (#3448)
* Use signature of functions instead of names #3411 * Fixes contract tests #3448
This commit is contained in:
committed by
Jaco Greeff
parent
b5dedd8aeb
commit
20185e5aac
@@ -33,6 +33,7 @@ export default class InputQuery extends Component {
|
||||
inputs: PropTypes.array.isRequired,
|
||||
outputs: PropTypes.array.isRequired,
|
||||
name: PropTypes.string.isRequired,
|
||||
signature: PropTypes.string.isRequired,
|
||||
className: PropTypes.string
|
||||
}
|
||||
|
||||
@@ -177,7 +178,7 @@ export default class InputQuery extends Component {
|
||||
|
||||
onClick = () => {
|
||||
const { values } = this.state;
|
||||
const { inputs, contract, name, outputs } = this.props;
|
||||
const { inputs, contract, name, outputs, signature } = this.props;
|
||||
|
||||
this.setState({
|
||||
isLoading: true,
|
||||
@@ -187,7 +188,7 @@ export default class InputQuery extends Component {
|
||||
const inputValues = inputs.map(input => values[input.name]);
|
||||
|
||||
contract
|
||||
.instance[name]
|
||||
.instance[signature]
|
||||
.call({}, inputValues)
|
||||
.then(results => {
|
||||
if (outputs.length === 1) {
|
||||
|
||||
@@ -70,7 +70,7 @@ export default class Queries extends Component {
|
||||
}
|
||||
|
||||
renderInputQuery (fn) {
|
||||
const { abi, name } = fn;
|
||||
const { abi, name, signature } = fn;
|
||||
const { contract } = this.props;
|
||||
|
||||
return (
|
||||
@@ -80,6 +80,7 @@ export default class Queries extends Component {
|
||||
inputs={ abi.inputs }
|
||||
outputs={ abi.outputs }
|
||||
name={ name }
|
||||
signature={ signature }
|
||||
contract={ contract }
|
||||
/>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user