diff options
author | Dan Finlay <dan@danfinlay.com> | 2016-11-22 03:03:32 +0800 |
---|---|---|
committer | Dan Finlay <dan@danfinlay.com> | 2016-11-22 03:03:32 +0800 |
commit | 7ab9d408201ae65ad30512f1361df61a487a9330 (patch) | |
tree | cc7b208d36e9cf6eafcab5bd36edba0f46595a64 /ui/lib | |
parent | e8a83026248e6e27e6d801cf1713551eb740137a (diff) | |
parent | 7021c7708c927b8723b6ba5842b451b6f46dbb3e (diff) | |
download | tangerine-wallet-browser-7ab9d408201ae65ad30512f1361df61a487a9330.tar tangerine-wallet-browser-7ab9d408201ae65ad30512f1361df61a487a9330.tar.gz tangerine-wallet-browser-7ab9d408201ae65ad30512f1361df61a487a9330.tar.bz2 tangerine-wallet-browser-7ab9d408201ae65ad30512f1361df61a487a9330.tar.lz tangerine-wallet-browser-7ab9d408201ae65ad30512f1361df61a487a9330.tar.xz tangerine-wallet-browser-7ab9d408201ae65ad30512f1361df61a487a9330.tar.zst tangerine-wallet-browser-7ab9d408201ae65ad30512f1361df61a487a9330.zip |
Merge branch 'dev' into i831-AddRopsten-Dev
Diffstat (limited to 'ui/lib')
-rw-r--r-- | ui/lib/account-link.js | 2 | ||||
-rw-r--r-- | ui/lib/contract-namer.js | 9 | ||||
-rw-r--r-- | ui/lib/icon-factory.js | 4 |
3 files changed, 7 insertions, 8 deletions
diff --git a/ui/lib/account-link.js b/ui/lib/account-link.js index a6b120c63..a29ba5e69 100644 --- a/ui/lib/account-link.js +++ b/ui/lib/account-link.js @@ -1,4 +1,4 @@ -module.exports = function(address, network) { +module.exports = function (address, network) { const net = parseInt(network) let link 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 } diff --git a/ui/lib/icon-factory.js b/ui/lib/icon-factory.js index a30041114..82cc839d6 100644 --- a/ui/lib/icon-factory.js +++ b/ui/lib/icon-factory.js @@ -55,6 +55,6 @@ function jsNumberForAddress (address) { return seed } -function toDataUri(identiconSrc){ +function toDataUri (identiconSrc) { return 'data:image/svg+xml;charset=utf-8,' + encodeURIComponent(identiconSrc) -}
\ No newline at end of file +} |