Skip to content

Commit

Permalink
added a tx success push, fallback (#354)
Browse files Browse the repository at this point in the history
  • Loading branch information
faboweb authored Feb 20, 2020
1 parent 57ffe9b commit 3ff559d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/controller/transaction/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,11 @@ async function pollTransactionSuccess(
}

assertOk(res)
// publishUserTransactionAdded is also done in the block subscription
// but also here as a fallback
// TODO the client might now update twice as it receives the success twice, could be fine though
const transaction = reducers.transactionReducer(res, reducers)
publishUserTransactionAdded(networkId, senderAddress, transaction)
} catch (error) {
console.error('TX failed:', hash, error)
let transaction
Expand Down

0 comments on commit 3ff559d

Please sign in to comment.