This PR is refactoring the dapps service to avoid code duplication between SDKs and also to avoid overlapping requests/responses.
It brings Browser Connect inline with Wallet Connect in terms of session management and sign transactions.
New architecture:
WalletConnectService becomes DAppsService. Its responsibility is to provide dapp access to the app. This is the component currently used by the UI
What does it do:
1. Provide dapp APIs line connect, disconnect, session requests etc
2. Spawn app notifications on dapp events
3. Timeout requests if the dapp does not respons
DAppsRequestHandler becomes DAppsModule. This component is consumed by the DAppService. Its responsibility is to aggregate all the building blocks for the dapps, but does not control any of the dapp features or consume the SDKs requests.
What does it do:
1. Aggregate all the building blocks for dapps (currently known as plugins)
DAppConnectionsPlugin - This component provides the session management features line connect, disconnect and provide a model with the connected dapps.
SignRequestPlugin - This component provides the sign request management. It receives the sign request from the dapp, translates it to what Status understands and manages the lifecycle of the request.
New component introduced (DAppsModel) to provide a common model for WC and BC. The WCDappsProvider and BCDappsProvider components are responsible to fill the model from different sources
+ Update the dialog where the user choses the connection to enable or disable the connection option based on flags
+ Separating the walletConnect flag and browserConnect flag usage so that either one can be disabled without affecting the other feature
+ Update qml test
* perf(contacts): make initial contacts fetching async
Fixes#16509
* fix: don't fetch contact if we don't have it in cache
Fixes#16509
* feat: add a visible loading indicator when the chats are not ready yet
* fix(members): fix member count not updating correctly on join
Fixes#16672
The issue was that the requests to join were not handled in time for when the community update came in, so when we udpated the section, we got both the normal member and the pending member still and they clashed and the pending one came on top, meaning that the joined member was not counted.
On a restart it would fix itself.
To fix it, I reordered the parsing of communities and requests, so that the request is updated first, ie deleted because it is now accepted.
I also fixed the function that handles request to that the state gets updated at all times. Before, it would only get updated if it was not accepted, pending or waiting for address.
Finally, there was a weird scenario where as a TM, I saw myself as pending even if I was joined, so I fixed it by removing duplicates.
* chore(@e2e): remove xfail mark from pin messages test
---------
Co-authored-by: Anastasiya Semenkevich <anastasija.ig@gmail.com>
Fixes#16614
The problem was that I was missing encryption keys for some channels, but since I'm an admin, I still have access, so I could see the member list and it was showing me all members because of a missing condition in the code
* chore: remove old code about ID verification
* refactor(trust): remove untrustowrthy and isVerified from items and use trustStatus
* chore(status-go): up status-go to get fix for trustStatus reseting
Fixes#16392
* chore: remove verified/trusted profile showcase category
* fix(nim-tests): split tests into individual targets
Otherwise combining separate `nim` calls with `;` results in only the
last one informing `make` call what exit code the hole target had.
Resolves:
https://github.com/status-im/status-desktop/issues/16545
Signed-off-by: Jakub Sokołowski <jakub@status.im>
* test: fix message_model test
* fix; Update default sorting for assets and collectibles (#16552)
* chore(status-go): bump status-go to latest (#16559)
* test: fix collectibles_model test
---------
Signed-off-by: Jakub Sokołowski <jakub@status.im>
Co-authored-by: Jonathan Rainville <rainville.jonathan@gmail.com>
Co-authored-by: Cuteivist <emil.sawicki9@gmail.com>
Co-authored-by: Dario Gabriel Lipicar <dario@status.im>
Fixes#16288
Introduces a new instance of the users module, but managed by the section module.
This user module is managing the "public" community members list. Meaning that everytime we have a public channel in a community, we use that module instead.
The channel's user module is empty for public channels to reduce the amount of processing and memory used.
If the channel becomes private, we update the member list and populate it.
* fix: force focus on search inputs in permissions and sort members
* fix(admin): fix freezes when community gets updated
* fix(airdrop): use FastExpressionFilter to speed up
Iterates #16043
When the community gets updated by any means, we reconstruct the section item, which is already bad, but we also re-fetch all tokens and all shared addresses, which in turn re-updates models for no reason.
Instead, I make sure to only fetch those on first section build, then, I get the new shared addresses when members join using the request to join response that comes from status-go
Based on changes done in this PR https://github.com/status-im/status-go/pull/5807
we can simplify our client logic a lot.
This results in the removal of many lines of code that are no longer needed
Closes 2nd part of #16336
Fixes#15750
When the pairing fails, the UI now let's the user use the seed phrase instead.
When they do, a call is send to the original device and both instances will show an AC notif.
When the original device accepts the pairing, the call is made to pair and sync the devices and the AC notifs get deleted
- excludes logic of resolving preferred display name to shared
contacts_utils
- expose PreferredDisplayName role from user_model
- improves PreferredDisplayName handling in member_model
Closes: #16429
Based on changes done in this PR https://github.com/status-im/status-go/pull/5807
we can simplify our client logic a lot.
This results in the removal of many lines of code that are no longer needed
Closes 1st part of #16336
Iterates #16043
* fix(admin): improve admin panel loading by putting sections in loaders
* fix(admin): speed up members tab by using nim model and real search
* fix(admin): speed up airdrop panel
* fix(admin): mint panel and airdrop panel interactions and previous btn
* fix(admin): speed up overview page
* fix(admin): speed up permissions page
* refactor(community_tokens): only fetch holders when going to the page
Fixes#16307
Instead of fetching community token holders each time members change, we fetch when the page for the token is opened.
It shows a small loading text then the resulting holders.
If the list is already available (fetched previously, we show it directly).
There is still the timer to refresh the list if you stay on the page.
* add loading property to storybook
Fixes#16270
Makes the category collapsing and opening async, so UI feedback is immediate, while the actual save in the DB is done async in the background.