status-desktop/ui
Alex Jbanca 7603f24372 refactor: Remove business logic from WC ui components
This commit brings a separation of concerns for the UI components involved in dApp interactions.

Issue: The UI components depend on the WalletConnectService and also on its dependencies like DAppsRequestHAndler. As a result the UI components have a hard dependency on the WalletConnect specifics and are incompatible with BC. This results in duplication of logic.
Issue: The UI components operate on WalletConnect specific JSON object. E.g. session objects, session proposal etc. As a result the UI is built around the WalletConnect message format.
Issue: The UI components operate on ListModel items received through functions and stored internally. Any change in the model would result in a crash.
Solution: Remove the WalletConnectService dependency from DAppsWorkflow. The DAppsWorkflow now operates with models, signals and functions. This is the first step in the broader refactoring. Moving the logic into the service itself will allow us to further refactor the WC and BC.

How does it work now:

Dependencies - The UI components have a dependency on models. SessionRequestsModel and DAppsModel.
Pairing - The pairing is initiated in the UI. On user input a pairingValidationRequested signal is emitted and the result is received as a function pairingValidated. If the url is valid the UI requests a pairingRequested. When the WalletConnectService is refactored we can go further and request only pairingRequested and to receive a pairingResult call as a function with the result. In the current implementation on pairingRequested we'll receive a connectDApp request.
Connecting dApps - The flow is initiated with connectDApp function. This call currently contains all the needed info as args. In the next step it could be replaced with a ConnectionRequests model. The connectDApp call triggered a connection popup if we're not currently showing one to the user. If we're currently showing one it will be queued (corner case). The connection can be accepted with connectionAccepted and rejected with connectionDeclined. Once the connection is accepted we're expecting a result connectionSuccessful or connectionFailed. The connectionSuccessful also expects a new id for the established connection.
Signing - The signing flow orbits around the SessionRequestsModel. Each item from the model will generate a popup showing the sign details to the user. Sign can be accepted or rejected using signRequestAccepted or signRequestRejected. No response is currently expected. The model is expected to remove the sign request item.
2024-10-09 13:32:53 +03:00
..
StatusQ refactor: Remove business logic from WC ui components 2024-10-09 13:32:53 +03:00
app refactor: Remove business logic from WC ui components 2024-10-09 13:32:53 +03:00
fonts fix(cpp): make libraries which are not dynamically loaded static 2022-08-02 15:30:08 +02:00
i18n chore: rename holders string to match the general in app approach 2024-05-28 19:50:17 +03:00
imports refactor: Remove business logic from WC ui components 2024-10-09 13:32:53 +03:00
include/StatusDesktop/Monitoring feat(MonitoringTool): Search improved 2024-06-28 15:57:23 +02:00
src/StatusDesktop/Monitoring feat(MonitoringTool): Search improved 2024-06-28 15:57:23 +02:00
MonitoringSources.cmake
generate-rcc.go
main.qml chore: applicationWindow property removed from Global singleton 2024-10-05 14:15:35 +02:00
nim-status-client.pro chore: Architecture guide added and PR template updated 2024-08-09 22:29:44 +02:00