aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Finlay <542863+danfinlay@users.noreply.github.com>2019-06-01 05:07:02 +0800
committerGitHub <noreply@github.com>2019-06-01 05:07:02 +0800
commitb600a4fa5c1177eb83c8d080d495af2e061d4055 (patch)
tree42aebce52a0ed072015396f20effc4a5114e830a
parentd83770354636b8c4d933903d1e19bc9733f15a4c (diff)
parente8f6dff0be27a3cd66c855ff8a9d1994c796dbb0 (diff)
downloadtangerine-wallet-browser-b600a4fa5c1177eb83c8d080d495af2e061d4055.tar
tangerine-wallet-browser-b600a4fa5c1177eb83c8d080d495af2e061d4055.tar.gz
tangerine-wallet-browser-b600a4fa5c1177eb83c8d080d495af2e061d4055.tar.bz2
tangerine-wallet-browser-b600a4fa5c1177eb83c8d080d495af2e061d4055.tar.lz
tangerine-wallet-browser-b600a4fa5c1177eb83c8d080d495af2e061d4055.tar.xz
tangerine-wallet-browser-b600a4fa5c1177eb83c8d080d495af2e061d4055.tar.zst
tangerine-wallet-browser-b600a4fa5c1177eb83c8d080d495af2e061d4055.zip
Merge pull request #6671 from MetaMask/bugfix/enable-rejection
bugfix: reject enable promise on user rejection
-rw-r--r--app/scripts/inpage.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/scripts/inpage.js b/app/scripts/inpage.js
index a4fb552f1..fb16dd43d 100644
--- a/app/scripts/inpage.js
+++ b/app/scripts/inpage.js
@@ -33,8 +33,8 @@ inpageProvider.setMaxListeners(100)
inpageProvider.enable = function ({ force } = {}) {
return new Promise((resolve, reject) => {
inpageProvider.sendAsync({ method: 'eth_requestAccounts', params: [force] }, (error, response) => {
- if (error) {
- reject(error)
+ if (error || response.error) {
+ reject(error || response.error)
} else {
resolve(response.result)
}