From 334f6c2eb0ea49a2467835025ec4323c98c148df Mon Sep 17 00:00:00 2001 From: Luca Zeug Date: Wed, 1 Feb 2017 13:46:06 +0100 Subject: [PATCH] Fix raw data display ('0x') in data-less TXs (#1625) --- modules/ipc/methods/eth_sendTransaction.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ipc/methods/eth_sendTransaction.js b/modules/ipc/methods/eth_sendTransaction.js index dbe54e0bf..d6e4b29b2 100644 --- a/modules/ipc/methods/eth_sendTransaction.js +++ b/modules/ipc/methods/eth_sendTransaction.js @@ -39,7 +39,7 @@ module.exports = class extends BaseProcessor { if (_.isString(val)) { // make sure all data is lowercase and has 0x - val = '0x'+ val.toLowerCase().replace('0x',''); + if (val) val = `0x${val.toLowerCase().replace('0x', '')}`; if (val.match(/[^0-9a-fx]/igm)) { throw this.ERRORS.INVALID_PAYLOAD;