In the user interface of my DApp, how can I detect that a blockchain reorganization happened and what should I do to update the UI state once the fork is resolved?
Asked
Active
Viewed 2,184 times
16
1 Answers
20
There are a few modules around that let you keep track of the "state" of a transaction (unconfirmed, X confirmations, conflicting transaction exists and is being confirmed, fully confirmed, definitely failed) and represent this info in the UI with color-coding. You should then probably only make "irreversible" changes to the data that's represented in the UI after a transaction gets to 12 confirmations.
Vitalik Buterin
- 3,086
- 20
- 13
-
One of said modules is reflux-tx – caktux Jan 21 '16 at 12:55
-
1would like to see a nodejs module. I'm considering adding the equivalent of reflux-tx to ether-pudding if not, so I can transition application state based on promises. – Paul S Apr 08 '16 at 19:03