diff options
author | Dan Finlay <dan@danfinlay.com> | 2016-07-08 02:00:19 +0800 |
---|---|---|
committer | Dan Finlay <dan@danfinlay.com> | 2016-07-08 02:00:19 +0800 |
commit | 9609593f139ac6af9af5735624d4a37d31f8e43f (patch) | |
tree | 51a56cb9fa71acec506f739d31a34e310e23242f | |
parent | ecfe720b8bb0429c2d73b3a03d5dbf1d7cf573a7 (diff) | |
download | tangerine-wallet-browser-9609593f139ac6af9af5735624d4a37d31f8e43f.tar tangerine-wallet-browser-9609593f139ac6af9af5735624d4a37d31f8e43f.tar.gz tangerine-wallet-browser-9609593f139ac6af9af5735624d4a37d31f8e43f.tar.bz2 tangerine-wallet-browser-9609593f139ac6af9af5735624d4a37d31f8e43f.tar.lz tangerine-wallet-browser-9609593f139ac6af9af5735624d4a37d31f8e43f.tar.xz tangerine-wallet-browser-9609593f139ac6af9af5735624d4a37d31f8e43f.tar.zst tangerine-wallet-browser-9609593f139ac6af9af5735624d4a37d31f8e43f.zip |
Fix bug where rejected tx would not call back
-rw-r--r-- | app/scripts/metamask-controller.js | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index 8a5ffb75a..63970799d 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -77,14 +77,13 @@ module.exports = class MetamaskController { // handle rpc request this.provider.sendAsync(request, function onPayloadHandled (err, response) { - if (err) { - return logger(err) - } - logger(null, request, response) - try { - stream.write(response) - } catch (err) { - logger(err) + logger(err, request, response) + if (response) { + try { + stream.write(response) + } catch (err) { + logger(err) + } } }) |