status-desktop/ui/imports/shared/popups
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
..
addaccount fix: can't add ens name as watched address 2024-08-21 12:08:26 +02:00
common Use ClipboardUtils.text instead of backend-dependent getFromClipboard 2024-08-29 15:46:17 +02:00
keycard chore: new parameters for local pairing (#15943) 2024-08-15 18:36:32 +01:00
keypairimport chore(StatusQ): Backpressure files deduplicated, imports adjusted 2024-07-12 14:00:15 +02:00
send chore: improvements of the sending route generated by the router process 2024-10-01 17:21:26 +02:00
walletconnect refactor: Remove business logic from WC ui components 2024-10-09 13:32:53 +03:00
AlertPopup.qml
BlockContactConfirmationDialog.qml test: block and unblock user test added (#15577) 2024-07-18 17:57:24 +07:00
ChatCommandsPopup.qml
CommonContactDialog.qml fix: ENS keycap display issues 2024-05-13 16:20:54 +02:00
CommunityAssetsInfoPopup.qml fix(CommunityAssetsInfoPopup): fix missing OK button 2024-03-19 14:18:55 +01:00
CommunityMembershipSetupDialog.qml fix(CommunityMembershipSetupDialog): wait for the Join Permission response only 2024-05-17 14:26:55 +02:00
ConfirmExternalLinkPopup.qml feat: Add URL trust options when the user clicks on a link 2023-10-12 10:57:15 +02:00
ConfirmationDialog.qml feat(token mgmt): update main wallet view layout with community assets 2023-12-06 11:18:36 +01:00
ContactVerificationRequestPopup.qml fix(Stored): Make stores typed 2024-08-27 10:52:18 +02:00
DeleteMessageConfirmationPopup.qml fix(Stored): Make stores typed 2024-08-27 10:52:18 +02:00
DownloadPage.qml
GetSyncCodeInstructionsPopup.qml fix(GetSyncCodeInstructionsPopup): mention same network 2023-10-05 10:12:48 +02:00
ImageContextMenu.qml copyImageToClipboardByUrl moved to ClipboardUtils 2024-08-29 15:46:17 +02:00
ImageCropWorkflow.qml fix(images-formats): Remove .heif and .tif(f) from supported formats 2023-12-22 14:04:47 +03:00
ImportCommunityPopup.qml fix(Stored): Make stores typed 2024-08-27 10:52:18 +02:00
InviteFriendsPopup.qml Using ClipboardUtils.setText instead of nim's copyToClipboard 2024-08-29 15:46:17 +02:00
MarkAsIDVerifiedDialog.qml feat(Profile flow): ID verification flows (incoming/outgoing) 2024-03-04 09:56:30 +01:00
MarkAsUntrustedPopup.qml feat(Profile flow): ID verification flows (incoming/outgoing) 2024-03-04 09:56:30 +01:00
MetricsEnablePopup.qml feat(Settings/Privacy and security): add Privacy Policy popup 2024-08-21 15:28:11 +02:00
ModalPopup.qml
NicknamePopup.qml fix(Profile flow) Validate nickname on edit 2024-03-12 15:55:31 +01:00
NoPermissionsToJoinPopup.qml
OutgoingContactVerificationRequestPopup.qml feat(Profile flow): ID verification flows (incoming/outgoing) 2024-03-04 09:56:30 +01:00
PopupMenu.qml
ProfileDialog.qml [ProfileShowcase] Updated delegates as per design + added web tab 2024-04-02 10:21:13 +03:00
RemoveAccountConfirmationPopup.qml feat(@wallet): delete account new design 2023-12-12 13:25:39 +01:00
RemoveContactPopup.qml test: replaced old test of sending request to send/accept/decline request and remove contact 2024-06-24 16:24:57 +03:00
RemoveIDVerificationDialog.qml feat(Profile flow): ID verification flows (incoming/outgoing) 2024-03-04 09:56:30 +01:00
RenameGroupPopup.qml fix: Revisit character set usage (ASCII/Latin1/UTF-8) in description fields 2023-08-02 09:52:48 +02:00
ReviewContactRequestPopup.qml feat(Profile flow): Respond to/review an incoming CR 2024-03-04 10:56:10 +01:00
SendContactRequestModal.qml fix(Stored): Make stores typed 2024-08-27 10:52:18 +02:00
SettingsDirtyToastMessage.qml chore: applicationWindow property removed from Global singleton 2024-10-05 14:15:35 +02:00
UnblockContactConfirmationDialog.qml test: block and unblock user test added (#15577) 2024-07-18 17:57:24 +07:00
UserAgreementPopup.qml fix: Update "Welcome to Status Beta" startup dialog 2024-10-08 12:51:51 +02:00
UserStatusContextMenu.qml Using ClipboardUtils.setText instead of nim's copyToClipboard 2024-08-29 15:46:17 +02:00
qmldir feat(@desktop/metrics): Add metrics management page 2024-07-23 10:59:03 +02:00