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 /app/scripts/lib/inpage-provider.js | |
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 'app/scripts/lib/inpage-provider.js')
-rw-r--r-- | app/scripts/lib/inpage-provider.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/scripts/lib/inpage-provider.js b/app/scripts/lib/inpage-provider.js index 052a8f5fe..6795f2bd4 100644 --- a/app/scripts/lib/inpage-provider.js +++ b/app/scripts/lib/inpage-provider.js @@ -39,7 +39,7 @@ function MetamaskInpageProvider (connectionStream) { self.idMap = {} // handle sendAsync requests via asyncProvider - self.sendAsync = function(payload, cb){ + self.sendAsync = function (payload, cb) { // rewrite request ids var request = eachJsonMessage(payload, (message) => { var newId = createRandomId() @@ -48,7 +48,7 @@ function MetamaskInpageProvider (connectionStream) { return message }) // forward to asyncProvider - asyncProvider.sendAsync(request, function(err, res){ + asyncProvider.sendAsync(request, function (err, res) { if (err) return cb(err) // transform messages to original ids eachJsonMessage(res, (message) => { @@ -119,7 +119,7 @@ function remoteStoreWithLocalStorageCache (storageKey) { return store } -function createRandomId(){ +function createRandomId () { const extraDigits = 3 // 13 time digits const datePart = new Date().getTime() * Math.pow(10, extraDigits) @@ -129,7 +129,7 @@ function createRandomId(){ return datePart + extraPart } -function eachJsonMessage(payload, transformFn){ +function eachJsonMessage (payload, transformFn) { if (Array.isArray(payload)) { return payload.map(transformFn) } else { |