1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 01:39:44 +01:00

Merge pull request #408 from MetaMask/FixNoDeclineCallback

Fix bug where rejected tx would not call back
This commit is contained in:
kumavis 2016-07-07 11:13:14 -07:00 committed by GitHub
commit 768b049696

View File

@ -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)
}
}
})