From 873f451df123fe17ac91169b6fc75d84831af873 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Mon, 5 Dec 2016 18:42:44 +0100 Subject: [PATCH] Move decoding for contract deployment logic earlier (#3714) * Move decoding deployment logic earlier * Removed rendunant isContract --- js/src/ui/MethodDecoding/methodDecoding.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/js/src/ui/MethodDecoding/methodDecoding.js b/js/src/ui/MethodDecoding/methodDecoding.js index 70258f744..efb22b67b 100644 --- a/js/src/ui/MethodDecoding/methodDecoding.js +++ b/js/src/ui/MethodDecoding/methodDecoding.js @@ -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; } @@ -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)