Skip to content

Commit

Permalink
Fabo/track failing txs (#201)
Browse files Browse the repository at this point in the history
* track failing txs

* remove dead code

* linted
  • Loading branch information
faboweb authored Dec 13, 2019
1 parent 33caad7 commit 00210f5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/controller/transaction/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const { getMessage } = require('./messageConstructor')
const { networks } = require('../../networks')
const Sentry = require('@sentry/node')

global.fetch = require('node-fetch')

Expand Down Expand Up @@ -39,8 +40,13 @@ async function broadcast(tx) {
success: true
}
} catch (e) {
Sentry.withScope(function(scope) {
scope.setExtra('api_url', networks[tx.networkId].api_url)
scope.setExtra('transaction', tx.signedMessage)
Sentry.captureException(e)
})
return {
error: e,
error: e.message,
success: false
}
}
Expand Down

0 comments on commit 00210f5

Please sign in to comment.