wharfkit / transact-plugin-finality-checker

TransactPlugin for the Wharf Session Kit. Calls a callback function when broadcasted transaction is final.

Home Page:https://wharfkit.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Idea: Emit events as the finality checker performs its checks

aaroncox opened this issue · comments

Got a recommendation today that it'd be nice if this finality "monitor" (or whatever we're calling this one) could somehow emit events to the frontend related to finality, so that the app could then handle those results in their own UI.

I don't know the structure of how we relay these events back to the app, but I imagine every time we call get_transaction_status we can relay that info back to the app. Then when the finality threshold is reached, we call the callback like it does now.

Yeah, that would be cool. Maybe the FE can pass an updateCallback function as a parameter when initializing the package?

And maybe that should be a parameter in the transact-plugin-finality-callback plugin instead of this one?