diff options
author | Kevin Serrano <kevgagser@gmail.com> | 2016-11-12 02:26:12 +0800 |
---|---|---|
committer | Kevin Serrano <kevgagser@gmail.com> | 2016-11-12 02:26:12 +0800 |
commit | 23263bec7d5100accd61f7648fd9355fc95e2bb7 (patch) | |
tree | 3c24f23655b5e1aad7102b603412d6fae70d5e43 /ui/lib | |
parent | c664b8f11e32eaa7f8f1b46d4be938f2ebb74d35 (diff) | |
download | tangerine-wallet-browser-23263bec7d5100accd61f7648fd9355fc95e2bb7.tar tangerine-wallet-browser-23263bec7d5100accd61f7648fd9355fc95e2bb7.tar.gz tangerine-wallet-browser-23263bec7d5100accd61f7648fd9355fc95e2bb7.tar.bz2 tangerine-wallet-browser-23263bec7d5100accd61f7648fd9355fc95e2bb7.tar.lz tangerine-wallet-browser-23263bec7d5100accd61f7648fd9355fc95e2bb7.tar.xz tangerine-wallet-browser-23263bec7d5100accd61f7648fd9355fc95e2bb7.tar.zst tangerine-wallet-browser-23263bec7d5100accd61f7648fd9355fc95e2bb7.zip |
Linting to the max.
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 eb958e22d..479bf23d2 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 +} |