Commit Graph

3368 Commits

Author SHA1 Message Date
Alex Jbanca 106988d534 fix(WC): Refactor dapps service to work with multiple SDKs
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.
2024-11-20 18:10:29 +02:00
Alex Jbanca bb483b3365 feat(BC): Unify dapp sessions between WalletConnect and BrowserConnect
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
2024-11-20 18:10:29 +02:00
Alex Jbanca 7e1e827148 feat(WC): Enable Wallet Connect feature by default
+ 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
2024-11-20 18:10:29 +02:00
Alex Jbanca 0d67d5138b fix(connectionStatus): Remove redundant `changed` notifier from nim
There is no need to emit `changed` event for the QObject exposed from nim if only the underlying data changes.
2024-11-20 18:10:29 +02:00
Michał Cieślak fd768c0fe8 IsCurrentUser role exposed from user/member models
Additionally, fixed but causing that isCurrentUser was not initialized
via initMemberItem
2024-11-13 09:49:07 +01:00
Jonathan Rainville d6d546739d fix skipping hidden chats 2024-11-05 11:33:35 +01:00
Lukáš Tinkl 3dd94f4b72 fix[Chat] Jump to popup missing channel emojis
- add `emoji` to the channel list model
- WIP fix hiding unavailable channels due to permissions

Fixes #16623
2024-11-05 11:33:35 +01:00
Sale Djenic e3128587d8 fix: fill missing fees in tx object received from dApp
Fixes #16528
2024-11-04 11:32:19 +01:00
Jonathan Rainville 27ececad63
perf(contacts): make initial contacts fetching async (#16560)
* 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
2024-11-01 10:32:20 -04:00
Jonathan Rainville 36f2bb79a9
fix(members): fix member count not updating correctly on join (#16680)
* 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>
2024-11-01 09:45:09 -04:00
Jonathan Rainville 5aa5390b6c
fix(curated): only load curated communities once (#16657) 2024-10-31 11:07:05 -04:00
Michał Cieślak ba80ba97f7 compressedPubKey exposed via backend models, usages of Utils.getCompressedPk removed, SB pages simplified 2024-10-31 11:11:30 +01:00
Jonathan Rainville 189d016694
fix(members): fix list showing all members when missing encryption keys (#16654)
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
2024-10-30 15:02:58 -04:00
Sale Djenic 03a0a18313 fix: links do not work in the terms of name registration popup
Fixes #16658
2024-10-30 14:10:40 +01:00
Jonathan Rainville d511c25d2e
remove old code about ID verification and fix trustStatus bug (#16548)
* 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
2024-10-29 14:08:12 -04:00
Sale Djenic f6055946d4 chore: usage of goerli removed 2024-10-29 15:46:09 +01:00
Jonathan Rainville f7823cd0b7
refactor(members): unify members models into one (#16508)
Fixes #16433
2024-10-25 21:25:50 -04:00
Jonathan Rainville d317df032d
Improve performance by only updating the properties that changed in the model instead of reseting (#16436)
* perf(notifications): update item props instead of resetting the item

* perf(sections): update sections by properties instead of reseting
2024-10-23 09:50:05 -04:00
Jakub Sokołowski 5a97b034e2
fix(nim-tests): split tests into individual targets (#16546)
* 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>
2024-10-21 14:49:17 -04:00
Sale Djenic fe5c135486 chore: sign the flow only once if approval and transaction need to be placed once after another (swap flow)
Closes #16337
2024-10-16 09:52:46 +02:00
Michał Cieślak f75e4e0c47 Introduce ability of calling StatusQ methods from nim
Closes: #16496
2024-10-11 23:37:50 +02:00
Khushboo Mehta 3f55e6c9c5 feat(@desktop/wallet): Remove preferred chains from wallet accounts all over the app 2024-10-11 18:48:37 +02:00
Khushboo Mehta 7003ba73e2 feat(@desktop/wallet): Remove network prefixes in saved addresses and ReceiveModal 2024-10-11 18:48:37 +02:00
Jonathan Rainville d6031f8126
refactor(members): use a single members list for public community chats (#16301)
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.
2024-10-11 12:35:35 -04:00
Michał Cieślak 206bc79ab4 downloadImageByUrl moved to SystemUtils 2024-10-11 12:14:53 +02:00
Michał Cieślak 3f9f175e07 restartApplication() removed from Utils.qml and nim 2024-10-11 12:14:53 +02:00
Jonathan Rainville 0bb2bc0e03
Fix some of the freezes experienced by the admins when the community updates (#16384)
* 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
2024-10-10 13:01:47 -04:00
Alex Jbanca 63f6323185 fix: Remove forced OpenGl context sharing
This is freezing the app when initialising the webengineview on linux with qt 5.15.8
2024-10-10 10:29:12 +03:00
Sale Djenic 46f34ec8fc fix: optimizes send modal flow for ens usernames 2024-10-09 13:10:14 +02:00
Cuteivist 932e6e2820
feat(wallet): Recalculate specific entries in accounts model (#16344) 2024-10-03 14:49:10 +02:00
Sale Djenic 100389aa8d chore: align buying/releasing/setting ens usernames with the new sending flow
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
2024-10-02 16:16:29 +02:00
Jonathan Rainville 252061d8e8
feat(sync): add a fallback mechanism when the pairing does't work (#15820)
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
2024-10-02 09:54:35 -04:00
Michał Cieślak f8d33656e6 fix: add PreferredDisplayName to user_model
- 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
2024-10-01 23:57:41 +02:00
Sale Djenic ee9091377f chore: align buying stickers flow with the new sending flow
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
2024-10-01 17:21:26 +02:00
Sale Djenic ad7e2df78a chore: improvements of the sending route generated by the router process
Closes #14636
2024-10-01 17:21:26 +02:00
Jonathan Rainville 0a8f8d7026
fix(minting): fix minting tokens on Windows (#16422)
Fixes #16326

Passes the image through the image formatting function before sending
2024-09-30 11:14:41 -04:00
Cuteivist 83d7c03585
feat(wallet): Add metrics for Send / Bridge / Swap (#16400) 2024-09-30 10:34:28 +02:00
Jonathan Rainville 1cad66bb2c
perf(admin): speed up admin tabs significantly (#16363)
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
2024-09-27 13:28:27 -04:00
Jonathan Rainville bb7e5be065
fix(members): fix slow chat switching by improving model (#16279)
Fixes #16132
2024-09-25 11:29:26 -04:00
Jonathan Rainville 1faa8e6561
chore(notiifcations): stop logging messages in debug logs for notifs (#16381) 2024-09-24 09:58:12 -04:00
Khushboo Mehta 2a57b21761 feat@(desktop/wallet): Make Send Via Personal chat enabled by default 2024-09-23 11:20:56 +02:00
Khushboo Mehta 5771a33eaa feat(@desktop/wallet): Added feature flag FLAG_SEND_VIA_PERSONAL_CHAT_ENABLED for the send via personal chat feature
Also added logic in order to detect and highlight an address/ens name in the chat
2024-09-23 11:20:56 +02:00
Cuteivist baf3061fda
feat(wallet): Remove unused functions (#16342) 2024-09-23 08:04:04 +02:00
Alex Jbanca c7a936bfe6 chore: Remove the experimental log
Reason: Not experimental for quite some time
2024-09-20 20:51:20 +03:00
Jonathan Rainville 3f8dfee3cd
refactor(community_tokens): only fetch holders when going to the page (#16308)
* 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
2024-09-19 16:32:38 -04:00
Sale Djenic ea8827ec97 fix: wallet connect - sake.lido.fi dApp - staking transaction gets stuck
Fixes #16096
2024-09-17 19:39:32 +02:00
Cuteivist 7cd2ed888c
Fix/remove send collectibles model 16328 (#16332)
* fix(wallet): Remove collectibles nested model

* fix(wallet): Remove collectible controller from send module
2024-09-16 13:21:25 +02:00
Sale Djenic 8dc067e0c4 feat: fees update integration after calculating the initial route 2024-09-12 19:52:32 +02:00
Jonathan Rainville 1a3b75fc9d
fix(categories): make categories collapsing async to fix performance (#16271)
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.
2024-09-12 11:55:16 -04:00
Sale Djenic c4363be418 feat: fees update integration after calculating the initial route 2024-09-11 14:43:19 +02:00