Status Desktop client made in Nim & QML https://status.app
Go to file
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
.github chore: Set-up the initial codeowners 2024-10-07 17:34:58 +03:00
app chore: update icons to use the new multicoloured Status logo 2024-05-08 10:22:34 -04:00
ci fix(status-go)_: add missing status-go dependencies (#16470) 2024-10-08 19:36:20 +05:30
cmake chore(CPP/CI): basic CI setup for linux cmake build 2022-07-01 14:41:28 +02:00
libs chore: switch wakuv2 fleet to waku (#14033) 2024-05-28 08:48:04 +02:00
monitoring stores: shared/RootStore made not singleton 2024-10-03 20:08:32 +02:00
nix fix(status-go)_: add missing status-go dependencies (#16470) 2024-10-08 19:36:20 +05:30
resources chore: switch wakuv2 fleet to waku (#14033) 2024-05-28 08:48:04 +02:00
scripts fix(status-go)_: add missing status-go dependencies (#16470) 2024-10-08 19:36:20 +05:30
src feat(wallet): Recalculate specific entries in accounts model (#16344) 2024-10-03 14:49:10 +02:00
storybook refactor: Remove business logic from WC ui components 2024-10-09 13:32:53 +03:00
test tests: keypair rename test simplified 2024-10-08 13:10:15 +03:00
test-scripts chores(@general): remove status-lib deps 2022-02-03 11:52:45 -05:00
ui refactor: Remove business logic from WC ui components 2024-10-09 13:32:53 +03:00
vendor fix(status-go)_: add missing status-go dependencies (#16470) 2024-10-08 19:36:20 +05:30
.clang-format feat(StatusEmojiPopup): reimplement around C++ EmojiModel 2024-09-03 10:19:54 +02:00
.clang-tidy refactor(@desktop/cpp): improve cpp code 2022-03-01 16:05:21 +01:00
.gitignore ci: copy qt 5.15.8 package 2024-06-27 12:16:30 +02:00
.gitmodules chore: remove dictionary 2023-06-09 14:50:08 -04:00
.npmrc chore: refactor Linux and macOS build/packaging steps 2020-06-22 10:53:57 -05:00
.yarnrc chore: refactor Linux and macOS build/packaging steps 2020-06-22 10:53:57 -05:00
AppRun ci: fix more nix build issues 2024-06-27 12:16:31 +02:00
AppRun-cpp chore(CPP/CI): basic CI setup for linux cmake build 2022-07-01 14:41:28 +02:00
CMakeLists.txt chore(cpp): add chat section and list chats 2022-08-11 21:40:39 +02:00
CONTRIBUTING.md CONTRIBUTING.md extended with section regarding unit tests 2024-09-23 15:19:43 +02:00
I18N.md chore(translations): update I18N docs 2022-07-14 22:04:33 +02:00
Info.dev.plist fix(deeplinks): Update plist files to new url scheme 2023-06-09 12:40:03 +03:00
Info.plist fix: Add camera entitlement on MacOS (#11683) 2023-07-27 11:39:43 +03:00
LICENSE.md docs: indicate MPL 2.0 as the license 2020-09-23 15:14:59 -04:00
Makefile fix(status-go)_: install protobuf (#16488) 2024-10-09 14:46:33 +05:30
README.md chore: Architecture guide added and PR template updated 2024-08-09 22:29:44 +02:00
VERSION chore: bump git master version post 0.9 release 2023-02-01 16:55:30 +01:00
build-linux.sh ci: upgrade docker image to Ubuntu 20.04 2023-07-03 20:50:02 +02:00
cacert.pem fix(@desktop/windows): installer to include cacert.pem 2021-09-06 14:47:18 -04:00
conanfile.txt chore(CPP): integrate tokens balance status-go API (POC) 2022-08-02 16:06:33 +02:00
config.nims fix: logs in utc time (#16373) 2024-09-20 19:50:36 +01:00
docker-linux-app-image.sh QR code scanner (QML component) (#9464) 2023-03-07 12:08:38 -04:00
env.sh feat: get collectibles from the contracts and their respective apis 2020-06-18 10:55:48 -04:00
fleets.json chore: rename shards.test to status.prod (#15782) 2024-07-29 18:26:31 -04:00
nim-status.desktop build: use same container as Jenkins CI for local packaged builds on Linux 2021-04-27 13:49:46 -05:00
nim.cfg feat(wallet) complete the filter API 2023-05-31 08:16:28 +02:00
nim_status_client.nimble docs: indicate MPL 2.0 as the license 2020-09-23 15:14:59 -04:00
package-lock.json feat(wallet) integrate Wallet Connect sign APIs 2023-11-15 17:21:27 +01:00
package.json fix(build) fix python package error on make run on MacOS 2024-05-06 16:02:07 +02:00
qwe.sh test(Onboarding) Skip closing test app (#11837) 2023-08-10 08:58:50 +02:00
screenshot.png chore: update the readme to have useful links 2024-04-30 17:56:46 +02:00
shell.nix fix(status-go)_: add missing status-go dependencies (#16470) 2024-10-08 19:36:20 +05:30
status-dev.icns feat: Update app icons 2024-05-20 13:38:04 +03:00
status-dev.ico feat: Update app icons 2024-05-20 13:38:04 +03:00
status-dev.png feat: Update app icons 2024-05-20 13:38:04 +03:00
status-dev.rc feat: Update app icons 2024-05-20 13:38:04 +03:00
status-macos.svg feat: Update app icons 2024-05-20 13:38:04 +03:00
status.desktop chore(CPP/CI): basic CI setup for linux cmake build 2022-07-01 14:41:28 +02:00
status.icns feat: Update app icons 2024-05-20 13:38:04 +03:00
status.ico feat: Update app icons 2024-05-20 13:38:04 +03:00
status.iss fix(deeplinks): Update plist files to new url scheme 2023-06-09 12:40:03 +03:00
status.png feat: Update app icons 2024-05-20 13:38:04 +03:00
status.rc feat: Update app icons 2024-05-20 13:38:04 +03:00
windows-install.txt build: implement packaging steps for the Windows build 2020-07-17 13:57:32 -05:00