paritytech / capi-multisig-app

[WIP] Simple multisig administration
https://multisig.capi.dev/
Apache License 2.0
8 stars 0 forks source link

refactor: decouple capi from presentation layer #223

Closed statictype closed 1 year ago

statictype commented 1 year ago

This PR just removes capi from the preact components as first step in a larger refactoring.

coming up https://github.com/paritytech/capi-multisig-app/issues/225 https://github.com/paritytech/capi-multisig-app/issues/224

netlify[bot] commented 1 year ago

Deploy Preview for capi-multisig ready!

Name Link
Latest commit 668d1efc387ff09c03c101793ddf5b12d93a634f
Latest deploy log https://app.netlify.com/sites/capi-multisig/deploys/64a4bc4001855c000835eb0c
Deploy Preview https://deploy-preview-223--capi-multisig.netlify.app/
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

peetzweg commented 1 year ago

LGTM.

One thing which just comes to mind is that this way we are not exposing the Runes to the caller of these cancel(), ratify() etc function as we are just calling .run() on the already in the creation.

We might not need the actual Rune of the flow of these extrinsics but doing this already prevents the creation of a ExtrinsicRune only and doing some different stuff with it as we intended to do with the OrthoRunes. 🤔

https://github.com/paritytech/capi/issues/1090

So maybe this handling of the notification will probably look different to these callback stuff once we leverage the abilty of an OrthoRune as described here: https://github.com/paritytech/capi/issues/1090 .

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. 🤷

https://github.com/paritytech/capi-multisig-app/pull/223/files#diff-74b31376d82cad53a7057c16707bde102daa50dca6962d8adb5a89eeb8daf5d8R25-R41

statictype commented 1 year ago

@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