Move decoding for contract deployment logic earlier (#3714)

* Move decoding deployment logic earlier

* Removed rendunant isContract
This commit is contained in:
Jaco Greeff 2016-12-05 18:42:44 +01:00 committed by Nicolas Gotchac
parent 1b6ebe1a6d
commit 873f451df1

View File

@ -457,6 +457,14 @@ class MethodDecoding extends Component {
return; return;
} }
const { signature, paramdata } = api.util.decodeCallData(input);
this.setState({ methodSignature: signature, methodParams: paramdata });
if (!signature || signature === CONTRACT_CREATE || transaction.creates) {
this.setState({ isDeploy: true });
return;
}
if (contractAddress === '0x') { if (contractAddress === '0x') {
return; return;
} }
@ -472,14 +480,6 @@ class MethodDecoding extends Component {
return; return;
} }
const { signature, paramdata } = api.util.decodeCallData(input);
this.setState({ methodSignature: signature, methodParams: paramdata });
if (!signature || signature === CONTRACT_CREATE || transaction.creates) {
this.setState({ isDeploy: true });
return;
}
return Contracts.get() return Contracts.get()
.signatureReg .signatureReg
.lookup(signature) .lookup(signature)