Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Move decoding for contract deployment logic earlier (#3714)
Browse files Browse the repository at this point in the history
* Move decoding deployment logic earlier

* Removed rendunant isContract
  • Loading branch information
jacogr authored and ngotchac committed Dec 5, 2016
1 parent 1b6ebe1 commit 873f451
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions js/src/ui/MethodDecoding/methodDecoding.js
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,14 @@ class MethodDecoding extends Component {
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') {
return;
}
Expand All @@ -472,14 +480,6 @@ class MethodDecoding extends Component {
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()
.signatureReg
.lookup(signature)
Expand Down

0 comments on commit 873f451

Please sign in to comment.