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/inpage.js | |
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/inpage.js')
-rw-r--r-- | app/scripts/inpage.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/scripts/inpage.js b/app/scripts/inpage.js index 83392761e..08d78e8ab 100644 --- a/app/scripts/inpage.js +++ b/app/scripts/inpage.js @@ -29,7 +29,7 @@ console.warn('ATTENTION: In an effort to improve user privacy, MetaMask ' + * @param {Function} handler - event handler * @param {boolean} remove - removes this handler after being triggered */ -function onMessage(messageType, handler, remove) { +function onMessage (messageType, handler, remove) { window.addEventListener('message', function ({ data }) { if (!data || data.type !== messageType) { return } remove && window.removeEventListener('message', handler) @@ -104,7 +104,7 @@ inpageProvider._metamask = new Proxy({ * * @returns {Promise<boolean>} - Promise resolving to true if this domain has been previously approved */ - isApproved: function() { + isApproved: function () { return new Promise((resolve) => { isApprovedHandle = ({ data: { caching, isApproved } }) => { if (caching) { @@ -133,7 +133,7 @@ inpageProvider._metamask = new Proxy({ }) }, }, { - get: function(obj, prop) { + get: function (obj, prop) { !warned && console.warn('Heads up! ethereum._metamask exposes methods that have ' + 'not been standardized yet. This means that these methods may not be implemented ' + 'in other dapp browsers and may be removed from MetaMask in the future.') @@ -153,7 +153,7 @@ const proxiedInpageProvider = new Proxy(inpageProvider, { window.ethereum = proxiedInpageProvider // detect eth_requestAccounts and pipe to enable for now -function detectAccountRequest(method) { +function detectAccountRequest (method) { const originalMethod = inpageProvider[method] inpageProvider[method] = function ({ method }) { if (method === 'eth_requestAccounts') { |