mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-22 17:33:23 +01:00
Allow empty recipient fields on tx
This commit is contained in:
parent
60270de53d
commit
47540ad0b3
@ -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))
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user