diff options
author | Whymarrh Whitby <whymarrh.whitby@gmail.com> | 2018-11-17 08:54:55 +0800 |
---|---|---|
committer | Frankie <frankie.diamond@gmail.com> | 2018-11-17 08:54:55 +0800 |
commit | 1988e1e96b09a47ad5428083bb2ed38cb2d7e0a8 (patch) | |
tree | b86a7ebbafd300151f12816c19999bb890ebe034 /app/scripts/lib/ens-ipfs | |
parent | ce147bf6d8431f4f0cb5b4de46a5af9628b3e9e2 (diff) | |
download | tangerine-wallet-browser-1988e1e96b09a47ad5428083bb2ed38cb2d7e0a8.tar tangerine-wallet-browser-1988e1e96b09a47ad5428083bb2ed38cb2d7e0a8.tar.gz tangerine-wallet-browser-1988e1e96b09a47ad5428083bb2ed38cb2d7e0a8.tar.bz2 tangerine-wallet-browser-1988e1e96b09a47ad5428083bb2ed38cb2d7e0a8.tar.lz tangerine-wallet-browser-1988e1e96b09a47ad5428083bb2ed38cb2d7e0a8.tar.xz tangerine-wallet-browser-1988e1e96b09a47ad5428083bb2ed38cb2d7e0a8.tar.zst tangerine-wallet-browser-1988e1e96b09a47ad5428083bb2ed38cb2d7e0a8.zip |
ESLint fixes (#5775)
* eslint . --fix
* Upgrade all ESLint warnings to errors
Diffstat (limited to 'app/scripts/lib/ens-ipfs')
-rw-r--r-- | app/scripts/lib/ens-ipfs/resolver.js | 2 | ||||
-rw-r--r-- | app/scripts/lib/ens-ipfs/setup.js | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/app/scripts/lib/ens-ipfs/resolver.js b/app/scripts/lib/ens-ipfs/resolver.js index fe2dc1134..b98566190 100644 --- a/app/scripts/lib/ens-ipfs/resolver.js +++ b/app/scripts/lib/ens-ipfs/resolver.js @@ -38,7 +38,7 @@ async function resolveEnsToIpfsContentId ({ provider, name }) { return contentId } -function hexValueIsEmpty(value) { +function hexValueIsEmpty (value) { return [undefined, null, '0x', '0x0', '0x0000000000000000000000000000000000000000000000000000000000000000'].includes(value) } diff --git a/app/scripts/lib/ens-ipfs/setup.js b/app/scripts/lib/ens-ipfs/setup.js index 45eb1ce14..df756d0f7 100644 --- a/app/scripts/lib/ens-ipfs/setup.js +++ b/app/scripts/lib/ens-ipfs/setup.js @@ -6,7 +6,7 @@ const supportedTopLevelDomains = ['eth'] module.exports = setupEnsIpfsResolver -function setupEnsIpfsResolver({ provider }) { +function setupEnsIpfsResolver ({ provider }) { // install listener const urlPatterns = supportedTopLevelDomains.map(tld => `*://*.${tld}/*`) @@ -35,11 +35,11 @@ function setupEnsIpfsResolver({ provider }) { attemptResolve({ tabId, name, path, search }) } - async function attemptResolve({ tabId, name, path, search }) { + async function attemptResolve ({ tabId, name, path, search }) { extension.tabs.update(tabId, { url: `loading.html` }) try { const ipfsContentId = await resolveEnsToIpfsContentId({ provider, name }) - let url = `https://gateway.ipfs.io/ipfs/${ipfsContentId}${path}${search || ''}` + const url = `https://gateway.ipfs.io/ipfs/${ipfsContentId}${path}${search || ''}` try { // check if ipfs gateway has result const response = await fetch(url, { method: 'HEAD' }) |