From 47540ad0b3c92df8061bb9c73159670ca2bc03ba Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Thu, 19 May 2016 16:14:16 -0700 Subject: Allow empty recipient fields on tx --- ui/app/send.js | 2 +- ui/app/util.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'ui/app') diff --git a/ui/app/send.js b/ui/app/send.js index 926c3e29a..ba4e5bfff 100644 --- a/ui/app/send.js +++ b/ui/app/send.js @@ -228,11 +228,11 @@ SendTransactionScreen.prototype.onSubmit = function() { this.props.dispatch(actions.showLoadingIndication()) var txParams = { - to: recipient, from: this.props.address, value: '0x' + value.toString(16), } + if (recipient) txParams.to = ethUtil.addHexPrefix(recipient) if (txData) txParams.data = txData this.props.dispatch(actions.signTx(txParams)) diff --git a/ui/app/util.js b/ui/app/util.js index 31c147877..81a029350 100644 --- a/ui/app/util.js +++ b/ui/app/util.js @@ -45,6 +45,7 @@ function valuesFor(obj) { } function addressSummary(address) { + if (!address) return '' var checked = ethUtil.toChecksumAddress(address) return checked ? checked.slice(0,2+8)+'...'+checked.slice(-4) : '...' } @@ -55,6 +56,7 @@ function isValidAddress(address) { } function isAllOneCase(address) { + if (!address) return true var lower = address.toLowerCase() var upper = address.toUpperCase() return address === lower || address === upper -- cgit