diff options
Diffstat (limited to 'app/scripts/lib')
-rw-r--r-- | app/scripts/lib/ens-ipfs/resolver.js | 2 | ||||
-rw-r--r-- | app/scripts/lib/ens-ipfs/setup.js | 6 | ||||
-rw-r--r-- | app/scripts/lib/setupFetchDebugging.js | 8 | ||||
-rw-r--r-- | app/scripts/lib/setupSentry.js | 2 |
4 files changed, 9 insertions, 9 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' }) diff --git a/app/scripts/lib/setupFetchDebugging.js b/app/scripts/lib/setupFetchDebugging.js index c1ef22d21..431340e2b 100644 --- a/app/scripts/lib/setupFetchDebugging.js +++ b/app/scripts/lib/setupFetchDebugging.js @@ -6,13 +6,13 @@ module.exports = setupFetchDebugging // https://github.com/getsentry/sentry-javascript/pull/1293 // -function setupFetchDebugging() { +function setupFetchDebugging () { if (!global.fetch) return const originalFetch = global.fetch global.fetch = wrappedFetch - async function wrappedFetch(...args) { + async function wrappedFetch (...args) { const initialStack = getCurrentStack() try { return await originalFetch.call(window, ...args) @@ -20,14 +20,14 @@ function setupFetchDebugging() { if (!err.stack) { console.warn('FetchDebugger - fetch encountered an Error without a stack', err) console.warn('FetchDebugger - overriding stack to point of original call') - err.stack = initialStack + err.stack = initialStack } throw err } } } -function getCurrentStack() { +function getCurrentStack () { try { throw new Error('Fake error for generating stack trace') } catch (err) { diff --git a/app/scripts/lib/setupSentry.js b/app/scripts/lib/setupSentry.js index 69042bc19..ba0e17df0 100644 --- a/app/scripts/lib/setupSentry.js +++ b/app/scripts/lib/setupSentry.js @@ -32,7 +32,7 @@ function setupSentry (opts) { scope.setExtra('isBrave', isBrave) }) - function rewriteReport(report) { + function rewriteReport (report) { try { // simplify certain complex error messages (e.g. Ethjs) simplifyErrorMessages(report) |