diff options
author | Kevin Serrano <kevgagser@gmail.com> | 2016-11-19 01:23:20 +0800 |
---|---|---|
committer | Kevin Serrano <kevgagser@gmail.com> | 2016-11-19 01:23:20 +0800 |
commit | bef023fb4a699c16fe0fff30ce18840678ed7ad0 (patch) | |
tree | d11be9af938712aeb554f070822be01b2d7fbceb /ui/lib/contract-namer.js | |
parent | 37d836fa72c75945d436bd94feadb65aa95d7e5f (diff) | |
parent | 39e0a33bba2709971edec0304027f646cb2db3cc (diff) | |
download | tangerine-wallet-browser-bef023fb4a699c16fe0fff30ce18840678ed7ad0.tar tangerine-wallet-browser-bef023fb4a699c16fe0fff30ce18840678ed7ad0.tar.gz tangerine-wallet-browser-bef023fb4a699c16fe0fff30ce18840678ed7ad0.tar.bz2 tangerine-wallet-browser-bef023fb4a699c16fe0fff30ce18840678ed7ad0.tar.lz tangerine-wallet-browser-bef023fb4a699c16fe0fff30ce18840678ed7ad0.tar.xz tangerine-wallet-browser-bef023fb4a699c16fe0fff30ce18840678ed7ad0.tar.zst tangerine-wallet-browser-bef023fb4a699c16fe0fff30ce18840678ed7ad0.zip |
Resolve merge conflict.
Diffstat (limited to 'ui/lib/contract-namer.js')
-rw-r--r-- | ui/lib/contract-namer.js | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/ui/lib/contract-namer.js b/ui/lib/contract-namer.js index c99d44de6..a94c62b62 100644 --- a/ui/lib/contract-namer.js +++ b/ui/lib/contract-namer.js @@ -8,23 +8,22 @@ // Nickname keys must be stored in lower case. const nicknames = {} -module.exports = function(addr, identities = {}) { - +module.exports = function (addr, identities = {}) { const address = addr.toLowerCase() const ids = hashFromIdentities(identities) return addrFromHash(address, ids) || addrFromHash(address, nicknames) } -function hashFromIdentities(identities) { +function hashFromIdentities (identities) { const result = {} - for (let key in identities) { + for (const key in identities) { result[key] = identities[key].name } return result } -function addrFromHash(addr, hash) { +function addrFromHash (addr, hash) { const address = addr.toLowerCase() return hash[address] || null } |