From 6303659d31d31035520ddf990f5b30bb07c161b8 Mon Sep 17 00:00:00 2001 From: Fabian Date: Tue, 7 Jan 2020 15:46:08 -0500 Subject: [PATCH] track failing transactions in Sentry (#249) --- lib/controller/transaction/index.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/controller/transaction/index.js b/lib/controller/transaction/index.js index 446efc4217..4e4710c1a2 100644 --- a/lib/controller/transaction/index.js +++ b/lib/controller/transaction/index.js @@ -88,7 +88,14 @@ async function broadcastTransaction(networkId, senderAddress, url, signedTx) { .then(assertOk) // check if tx is successful when executed vs when broadcasted - pollTransactionSuccess(networkId, senderAddress, url, res.txhash, res) + pollTransactionSuccess( + networkId, + senderAddress, + url, + res.txhash, + signedTx, + res + ) return res.txhash } @@ -134,6 +141,7 @@ async function pollTransactionSuccess( senderAddress, url, hash, + broadcastedTransaction, broadcastResponse, iteration = 0 ) { @@ -157,6 +165,7 @@ async function pollTransactionSuccess( senderAddress, url, hash, + broadcastedTransaction, broadcastResponse, iteration + 1 ) @@ -192,7 +201,8 @@ async function pollTransactionSuccess( scope.setExtra('api_url', url) scope.setExtra('hash', hash) scope.setExtra('address', senderAddress) - scope.setExtra('transaction', res) + scope.setExtra('tx_query', res) + scope.setExtra('transaction', broadcastedTransaction) scope.setExtra('broadcast_response', broadcastResponse) Sentry.captureException(error) })