16

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?

eth
  • 85,679
  • 53
  • 285
  • 406
J-B
  • 8,941
  • 16
  • 46
  • 77

1 Answers1

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