aboutsummaryrefslogtreecommitdiffstats
path: root/ui/lib
diff options
context:
space:
mode:
authorFrankie <frankie.pangilinan@consensys.net>2016-06-22 06:04:00 +0800
committerFrankie <frankie.pangilinan@consensys.net>2016-06-22 06:04:00 +0800
commitcf663f1104697440121d32cc6db2a8a1d5d54c5a (patch)
tree3ed4b8b9fe8c85f3b3a5bf68482c3fb9967f2de5 /ui/lib
parent265725c6edd62a7f46a9b9cf5a443cf01f0ff00c (diff)
parentdc2ef967028723afe9fe1efd669754723e38a4f0 (diff)
downloadtangerine-wallet-browser-cf663f1104697440121d32cc6db2a8a1d5d54c5a.tar
tangerine-wallet-browser-cf663f1104697440121d32cc6db2a8a1d5d54c5a.tar.gz
tangerine-wallet-browser-cf663f1104697440121d32cc6db2a8a1d5d54c5a.tar.bz2
tangerine-wallet-browser-cf663f1104697440121d32cc6db2a8a1d5d54c5a.tar.lz
tangerine-wallet-browser-cf663f1104697440121d32cc6db2a8a1d5d54c5a.tar.xz
tangerine-wallet-browser-cf663f1104697440121d32cc6db2a8a1d5d54c5a.tar.zst
tangerine-wallet-browser-cf663f1104697440121d32cc6db2a8a1d5d54c5a.zip
Fix conflict
Diffstat (limited to 'ui/lib')
-rw-r--r--ui/lib/explorer-link.js2
-rw-r--r--ui/lib/icon-factory.js23
-rw-r--r--ui/lib/tx-helper.js2
3 files changed, 14 insertions, 13 deletions
diff --git a/ui/lib/explorer-link.js b/ui/lib/explorer-link.js
index 92b3376fa..2993d1cf1 100644
--- a/ui/lib/explorer-link.js
+++ b/ui/lib/explorer-link.js
@@ -1,4 +1,4 @@
-module.exports = function(hash, network) {
+module.exports = function (hash, network) {
const net = parseInt(network)
let prefix
switch (net) {
diff --git a/ui/lib/icon-factory.js b/ui/lib/icon-factory.js
index 1b1df9490..1f7cca859 100644
--- a/ui/lib/icon-factory.js
+++ b/ui/lib/icon-factory.js
@@ -1,18 +1,18 @@
var iconFactory
-module.exports = function(jazzicon) {
+module.exports = function (jazzicon) {
if (!iconFactory) {
iconFactory = new IconFactory(jazzicon)
}
return iconFactory
}
-function IconFactory(jazzicon) {
+function IconFactory (jazzicon) {
this.jazzicon = jazzicon
this.cache = {}
}
-IconFactory.prototype.iconForAddress = function(address, diameter) {
+IconFactory.prototype.iconForAddress = function (address, diameter) {
if (this.isCached(address, diameter)) {
return this.cache[address][diameter]
}
@@ -22,30 +22,31 @@ IconFactory.prototype.iconForAddress = function(address, diameter) {
return dataUri
}
-IconFactory.prototype.generateNewUri = function(address, diameter) {
+IconFactory.prototype.generateNewUri = function (address, diameter) {
var numericRepresentation = jsNumberForAddress(address)
var identicon = this.jazzicon(diameter, numericRepresentation)
var identiconSrc = identicon.innerHTML
- var dataUri = 'data:image/svg+xml;charset=utf-8,'+encodeURIComponent(identiconSrc)
+ var dataUri = 'data:image/svg+xml;charset=utf-8,' + encodeURIComponent(identiconSrc)
return dataUri
}
-IconFactory.prototype.cacheIcon = function(address, diameter, icon) {
+IconFactory.prototype.cacheIcon = function (address, diameter, icon) {
if (!(address in this.cache)) {
var sizeCache = {}
sizeCache[diameter] = icon
- return this.cache[address] = sizeCache
-
+ this.cache[address] = sizeCache
+ return sizeCache
} else {
- return this.cache[address][diameter] = icon
+ this.cache[address][diameter] = icon
+ return icon
}
}
-IconFactory.prototype.isCached = function(address, diameter) {
+IconFactory.prototype.isCached = function (address, diameter) {
return address in this.cache && diameter in this.cache[address]
}
-function jsNumberForAddress(address) {
+function jsNumberForAddress (address) {
var addr = address.slice(2, 10)
var seed = parseInt(addr, 16)
return seed
diff --git a/ui/lib/tx-helper.js b/ui/lib/tx-helper.js
index 49845b01a..8f15cd3cc 100644
--- a/ui/lib/tx-helper.js
+++ b/ui/lib/tx-helper.js
@@ -1,6 +1,6 @@
const valuesFor = require('../app/util').valuesFor
-module.exports = function(unconfTxs, unconfMsgs) {
+module.exports = function (unconfTxs, unconfMsgs) {
var txValues = valuesFor(unconfTxs)
var msgValues = valuesFor(unconfMsgs)
var allValues = txValues.concat(msgValues)