diff options
Diffstat (limited to 'ui')
-rw-r--r-- | ui/app/components/app/send/send-footer/send-footer.container.js | 3 | ||||
-rw-r--r-- | ui/app/components/app/send/send-footer/send-footer.utils.js | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/ui/app/components/app/send/send-footer/send-footer.container.js b/ui/app/components/app/send/send-footer/send-footer.container.js index 502159a81..ea3fd7ee4 100644 --- a/ui/app/components/app/send/send-footer/send-footer.container.js +++ b/ui/app/components/app/send/send-footer/send-footer.container.js @@ -96,9 +96,10 @@ function mapDispatchToProps (dispatch) { return dispatch(updateTransaction(editingTx)) }, + addToAddressBookIfNew: (newAddress, toAccounts, nickname = '') => { const hexPrefixedAddress = ethUtil.addHexPrefix(newAddress) - if (addressIsNew(toAccounts)) { + if (addressIsNew(toAccounts, hexPrefixedAddress)) { // TODO: nickname, i.e. addToAddressBook(recipient, nickname) dispatch(addToAddressBook(hexPrefixedAddress, nickname)) } diff --git a/ui/app/components/app/send/send-footer/send-footer.utils.js b/ui/app/components/app/send/send-footer/send-footer.utils.js index f82ff1e9b..a63316336 100644 --- a/ui/app/components/app/send/send-footer/send-footer.utils.js +++ b/ui/app/components/app/send/send-footer/send-footer.utils.js @@ -74,7 +74,7 @@ function constructUpdatedTx ({ } function addressIsNew (toAccounts, newAddress) { - return !toAccounts.find(({ address }) => newAddress === address) + return !toAccounts.find(({ address }) => (newAddress === address || newAddress.toLowerCase() === address)) } module.exports = { |