Fix method decoding (#3967)

* Fix method decoding

* Restore master version
This commit is contained in:
Nicolas Gotchac 2016-12-27 11:03:49 +01:00 committed by Gav Wood
parent 2bbefcd438
commit 72c65d9c2f

View File

@ -118,15 +118,6 @@ export default class MethodDecodingStore {
return Promise.resolve(result);
}
const { signature, paramdata } = this.api.util.decodeCallData(input);
result.signature = signature;
result.params = paramdata;
// Contract deployment
if (!signature || signature === CONTRACT_CREATE || transaction.creates) {
return Promise.resolve({ ...result, deploy: true });
}
return this
.isContract(contractAddress || transaction.creates)
.then((isContract) => {
@ -136,6 +127,15 @@ export default class MethodDecodingStore {
return result;
}
const { signature, paramdata } = this.api.util.decodeCallData(input);
result.signature = signature;
result.params = paramdata;
// Contract deployment
if (!signature || signature === CONTRACT_CREATE || transaction.creates) {
return Promise.resolve({ ...result, deploy: true });
}
return this
.fetchMethodAbi(signature)
.then((abi) => {