-
Notifications
You must be signed in to change notification settings - Fork 0
refactor: decouple capi from presentation layer #223
Conversation
✅ Deploy Preview for capi-multisig ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much @statictype for doing this.
I'm also of the opinion that it's best to keep the presentation layer as decoupled from CAPI as possible. As they saying goes: "good fences make good neighbors" 🙁.
As I've mentioned offline: I'm still not completely sure that these functions that take a callback (for the intermediate events) and return a Promise
with the final value are the best way to go. However, I do think that this is much better than having no separation at all, and it's quite pragmatic.
LGTM. One thing which just comes to mind is that this way we are not exposing the Runes to the caller of these We might not need the actual Rune of the flow of these extrinsics but doing this already prevents the creation of a So maybe this handling of the notification will probably look different to these callback stuff once we leverage the abilty of an In my mental model decoupling the notification stuff from the actual creation of the ExtrinsicRune feels nicer than doing this callback message type approach. Maybe we still do the notification handling in these function but with the OrthoRunes but than it's hard to disable the notification from the outside. 🤷 |
@peetzweg yes, things will look different. i don't like the callbacks either. this is just a first step in creating a layer between capi and the UI |
This PR just removes capi from the preact components as first step in a larger refactoring.
coming up
#225
#224