From 3bb66d03eedcc33a95418911d95b57311989fee5 Mon Sep 17 00:00:00 2001 From: Nicolas Gotchac Date: Thu, 9 Mar 2017 19:56:10 +0100 Subject: [PATCH] Fix method decoding (#4845) * Fix contract deployment method decoding in Signer * Linting --- js/src/ui/MethodDecoding/methodDecodingStore.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/js/src/ui/MethodDecoding/methodDecodingStore.js b/js/src/ui/MethodDecoding/methodDecodingStore.js index 05a8f8546..1b8671465 100644 --- a/js/src/ui/MethodDecoding/methodDecodingStore.js +++ b/js/src/ui/MethodDecoding/methodDecodingStore.js @@ -138,6 +138,10 @@ export default class MethodDecodingStore { return Promise.resolve(result); } + if (!transaction.to) { + return this.decodeContractCreation(result); + } + let signature; try { @@ -206,7 +210,7 @@ export default class MethodDecodingStore { }); } - decodeContractCreation (data, contractAddress) { + decodeContractCreation (data, contractAddress = '') { const result = { ...data, contract: true,