diff options
author | Dan Finlay <dan@danfinlay.com> | 2016-11-18 05:51:32 +0800 |
---|---|---|
committer | Dan Finlay <dan@danfinlay.com> | 2016-11-18 05:51:32 +0800 |
commit | 4352c7031afb6f9a175b29d0addeb7ea48345676 (patch) | |
tree | ecb311d43d0f77d5f5f0e82a0014a09c6381f0ef /ui/lib | |
parent | f229d32442f34859be169e38a42ffecdfb8fc48a (diff) | |
parent | 592b64a19fd7001d965aa1a1c329b24f55d2ea90 (diff) | |
download | tangerine-wallet-browser-4352c7031afb6f9a175b29d0addeb7ea48345676.tar tangerine-wallet-browser-4352c7031afb6f9a175b29d0addeb7ea48345676.tar.gz tangerine-wallet-browser-4352c7031afb6f9a175b29d0addeb7ea48345676.tar.bz2 tangerine-wallet-browser-4352c7031afb6f9a175b29d0addeb7ea48345676.tar.lz tangerine-wallet-browser-4352c7031afb6f9a175b29d0addeb7ea48345676.tar.xz tangerine-wallet-browser-4352c7031afb6f9a175b29d0addeb7ea48345676.tar.zst tangerine-wallet-browser-4352c7031afb6f9a175b29d0addeb7ea48345676.zip |
Merge branch 'i328-MultiVault' of github.com:MetaMask/metamask-plugin into i328-MultiVault
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 +} |