diff options
author | Dan Finlay <dan@danfinlay.com> | 2016-05-20 07:14:16 +0800 |
---|---|---|
committer | Dan Finlay <dan@danfinlay.com> | 2016-05-20 07:14:16 +0800 |
commit | 47540ad0b3c92df8061bb9c73159670ca2bc03ba (patch) | |
tree | f83f8d7648dc95c36e0292e92a50a55c4fa053ed /ui/app | |
parent | 60270de53d214edffad7b90356bbe06081a55443 (diff) | |
download | tangerine-wallet-browser-47540ad0b3c92df8061bb9c73159670ca2bc03ba.tar tangerine-wallet-browser-47540ad0b3c92df8061bb9c73159670ca2bc03ba.tar.gz tangerine-wallet-browser-47540ad0b3c92df8061bb9c73159670ca2bc03ba.tar.bz2 tangerine-wallet-browser-47540ad0b3c92df8061bb9c73159670ca2bc03ba.tar.lz tangerine-wallet-browser-47540ad0b3c92df8061bb9c73159670ca2bc03ba.tar.xz tangerine-wallet-browser-47540ad0b3c92df8061bb9c73159670ca2bc03ba.tar.zst tangerine-wallet-browser-47540ad0b3c92df8061bb9c73159670ca2bc03ba.zip |
Allow empty recipient fields on tx
Diffstat (limited to 'ui/app')
-rw-r--r-- | ui/app/send.js | 2 | ||||
-rw-r--r-- | ui/app/util.js | 2 |
2 files changed, 3 insertions, 1 deletions
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 |