Commit Graph

10885 Commits

Author SHA1 Message Date
Alex Jbanca 9490dbb57e refactoring(dapps): Move WC and BC popups in the global scope
closes #16831

Moving the dapp popups to the global scope in order for them to be triggered on any view.
There are a few changes required for this:
1. DAppsWorkflow has been split. Previously all popups were declared in the `DappsComboBox`. Now the DAppsWorkflow inherits the QObject instead and the `DappsComboBox` is used as is in the wallet header.
2. The DAppsWorkflow has been moved to AppMain. The DAppsWorkflow will be constructed in the scope of DAppsService and connected directly to the service signals
3. Updated tests and storybook with the new structure
4. Removed the `dAppsService` from `Global`. There's no reason to keep the `dAppsService` instance in the `Global` singleton.
2024-12-03 09:52:28 +02:00
Alex Jbanca 674b316287 fix(BC): Fixing chains transformation on connect 2024-12-02 16:02:01 +02:00
Alex Jbanca 845fd4a445 fix(BC): Fixing the chains parsing on accepted connections
+ Fixing crash due to exception raised in the Qt slot execution
2024-12-02 16:02:01 +02:00
Anastasiya Semenkevich 3673723a0c chore: bump status-go 2024-12-02 15:48:28 +03:00
Marko Burčul ea57f31ceb
ci: enable sentry in the release builds (#16845)
Referenced issue: https://github.com/status-im/status-desktop/issues/16842

Signed-off-by: markoburcul <marko@status.im>
2024-12-02 11:16:51 +01:00
Michał Cieślak 7323889a8c ContactDetails decomposed into smaller, more specialized components
Closes: #16793
2024-11-29 17:46:50 +01:00
Michał Cieślak 4a36c71f3b Chat/RootStore: contactsModel property removed 2024-11-29 17:46:50 +01:00
Igor Sirotin 0fc01cd530
feat: status-go API logging option (#16808)
* chore_: move toStatusGoSupportedLogLevel

* feat_: initialize status-go log

* fix_: proper read of error in InitializeAPplication

* chore_: bump status-go
2024-11-29 15:44:26 +00:00
Anastasiya Semenkevich 49b74381e3 chore(@e2e): change notification template, combine tests 2024-11-29 17:22:31 +03:00
Dario Gabriel Lipicar 0a358f66bf fix(@desktop/wallet): properly handle tx send error 2024-11-29 09:49:48 -03:00
Dario Gabriel Lipicar 3ce2ec82e2 chore: bump status-go 2024-11-29 09:49:48 -03:00
Dario Gabriel Lipicar 228197e2c4 feat(@desktop/wallet): Round down max value in Send and Swap modals 2024-11-29 08:39:58 -03:00
Jonathan Rainville 50132c5a0e
Refactor contacts models to have a single model, remove useless properties and improve updating (#16667)
* refactor(contacts): refactor 5 contact models into one and filter in QML

Fixes #16549

Refactors the 5 types of contact models (all, mutuals, banned, received and sent) into only the `allContacts` and use an Adaptor on the QML side to filter into the needed models.
This cleans the Nim side a lot and makes applying updates to the contacts' model way simpler.

* chore(contacts): remove useless and duplicated contact properties

OptionalName and isSyncing were never used.
DefaultDisplayName was not really used and is actually a duplication of preferredDisplayName, so I replaced the limited usages of DefaultDisplayName by preferredDisplayName

* refactor(contacts): improve updates by not removing and re-adding

We used to update contact items by removing them from the models and re-adding them. This is highly inefficient.
Instead, the proper way is to update only the values that changed.

* user_model: onItemChanged signal removed

* user_model: sorting by online status no longer needed on nim side

* Chat/RootStore: contactsModel property removed

* ContactsStore encapsulation improved

* ContactsStore: contacts model adaptor moved outside store

---------

Co-authored-by: Michał Cieślak <michalcieslak@status.im>
2024-11-28 09:15:34 -05:00
Khushboo Mehta f1395a3a0a feat(@desktop/wallet): Adapt AmountToSend for Simple Send
fixes #16703
2024-11-27 16:40:53 +01:00
Khushboo Mehta dc716ad1b0 feat(@desktop/wallet): Adapt Token Selector
fixes #16702
2024-11-27 16:40:41 +01:00
Alex Jbanca fa4755ce9e feat(WalletFirst): Integrate the BuyReceiveBanner in the app
+ store the card state in user settings
+ amend the BannerCard close button state. It needs to change color on hover and to become visible only when the card is hovered.
2024-11-27 16:50:58 +02:00
Alex Jbanca 271fc15bd4 chore(BC): Enable BrowserConnect feature flag 2024-11-27 16:43:35 +02:00
Lukáš Tinkl 9ff9c4b01a feat(Storybook): allow opening a given page via cmdline
- syntax: `Storybook <page name>`, e.g. `Storybook CountdownPill` opens
up the corresponding page from the file under
`storybook/pages/CountdownPillPage.qml`
- the idea: for example being able to run squish tests against Storybook
(pages)
- also adjusted Makefile, so that it's possible to do the same via
`make`, e.g. `make run-storybook ARGS=CountdownPill`; unknown
options/arguments are ignored
2024-11-27 15:28:39 +01:00
Alex Jbanca b04a9a4dd2 feat(dapps): Add connector badge to WC and BC dapps
Adding connector badge to the dapps list and connect modal
Updating the RoundImageWithBadge to support custom badge size and margins
Updating the RoundImageWithBadge to support both SVG and PNG as source
Polish the dapps sign modal badge to match the design
2024-11-27 14:19:34 +02:00
Anastasiya Semenkevich 9b73badd22 feat: buy flow wording adjusted 2024-11-26 20:02:47 +03:00
Alex Jbanca c99697134b fix(WC): Fixing the namespace negotiation for non eip155 chains in pairing process
Check if the approved namespaces contains `eip155` property. Show an unsupported chain error if it doesn't.

We should display the unsupported network error when the required namespaces is empty or meets the app supported namespace, but the optional namespace contains only non eip155 chains.
2024-11-26 09:30:02 +02:00
Dario Gabriel Lipicar 63e0ab35f0 fix: fix #16788 2024-11-25 18:48:45 -03:00
Dario Gabriel Lipicar 4a35c7d5b1 chore: fixes 2024-11-25 18:48:45 -03:00
Dario Gabriel Lipicar 338f1f6f47 chore: fixed pr comments 2024-11-25 18:48:45 -03:00
Dario Gabriel Lipicar aa117b5453 feat(activity): added success state to copy tx hash option 2024-11-25 18:48:45 -03:00
Dario Gabriel Lipicar 33e4d39e9a feat(activity): temporarily hide activity tab from collectibles details view 2024-11-25 18:48:45 -03:00
Dario Gabriel Lipicar 96883c39e4 feat(activity): temporarily hide filter from Activity tab 2024-11-25 18:48:45 -03:00
Dario Gabriel Lipicar 15f047f0c0 feat(activity): reworked activity context menu 2024-11-25 18:48:45 -03:00
Dario Gabriel Lipicar bde7507a46 feat(activity): adapt to activityV2 API 2024-11-25 18:48:45 -03:00
Igor Sirotin b8a0ab0e0a
feat: configure status-go sentry (#16786) 2024-11-25 18:59:53 +00:00
Sale Djenic 6cbaf44eef fix(wallet): checking for an ens name now checks all users' addresses instead the default one only 2024-11-25 14:47:03 +01:00
Sale Djenic fd63893515 feat(wallet): in app tx related notifications improvements
Closes #16338
2024-11-25 14:47:03 +01:00
Sale Djenic bb797d56bf chore(general): preparing signals to be able to handle tx status change 2024-11-25 14:47:03 +01:00
Sale Djenic e6c0aa4a1f fix(wallet): set up an new keycard with an existing account screen does not show key pairs
Fixes: #16785
2024-11-22 15:55:28 +01:00
Alex Jbanca 1da7081405 fix(BC): Fixing the send transaction
The send transaction was successful, but the transaction hash is not recognized by the dApp because it was being hashed again.
2024-11-22 13:52:26 +02:00
Alex Jbanca 5e6db4d2ff feat(WalletFirst): Creating the wallet banner UI component
Banner items are created as per design.
Banner items support customizable close button.
Banner items have hove state as per design.
Banner items are added to storybook with all possible configurations.
Banner items have a close animation including fade-out and the remaining item occupy the empty space.
QML tests are added.
2024-11-22 12:47:18 +02:00
Alex Jbanca b555d19a1a feat(BC): Implement eth_signTypedData_v4 in BrowserConnect
This commit renames the personalSign to Sign in nim and status-go to enable `eth_signTypedData_v4` signing.
The sing request coming from the status-go API contains the signing method to be used by the client. Currently we're supporting personal sign and signTypedData_v4.

The only difference between these two signing methods is the order of challenge and address in the `params` array. This is handled in the SappsConnectorSDK::buildSignRequest
2024-11-22 12:47:01 +02:00
Anastasiya Semenkevich 5992054f0d chore(@e2e): fixes for tests according to changes to wallet tab reordering 2024-11-22 12:24:03 +02:00
Alex Jbanca a39728ba94 feat(WalletFirst): Rearrange left nav bar and open wallet section by default
1. Wallet section is the default section
2. Wallet section is the first section in the left nav bar
2024-11-22 12:24:03 +02:00
Alex Jbanca 793aeb15c3 fix(Dapps): Fixing fees in transaction requests
Fixes:
1. Fixing the laggy scrolling on transaction requiests popups. The root cause of this issue was the fees request and also the estimated time request. These periodic requests were blocking. Now we'll call these API async.
2. Fixing the max fees: The fees computation was using 21k as gasLimit. This value was hardcoded in WC. Now we're requesting the gasLimit if it's not provided by the dApp. This call is also async.
3. Fixing the periodicity of the fees computation. The fees were computed by the client only if the tx object didn't already provide the fees. But the tx could fail if when the fees are highly volatile because it was not being overridden. Now Status is computing the fees periodically for all tx requests.
4. Fixing an issue where the loading state of the fees text in the modal was showing text underneath the loading animation. Fixed by updating the AnimatedText to support a custom target property. The text component used for session requests is using `cusomColor` property to set the text color and the `color` for the text must not be overriden.
2024-11-22 11:32:41 +02:00
Alex Jbanca 03df126955 fix(WalletConnect): Fix the parsed account in the session request
The account in the session request composed by the dApp can have a different case from what Status is using.
When resolving the session request the account address will be replaced with the one from the account model.
2024-11-22 11:32:41 +02:00
Alex Jbanca d9a78da1d3 fix(BC): Implementing the personal_sign 2024-11-22 11:32:10 +02:00
Anastasiya Semenkevich 5c9d85bf2c chore: add a reminder in feature template to cover metrics 2024-11-21 16:42:05 +03:00
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 8a81a5fc92 fix(StatusQ): Do not require ssl to check the internet connection 2024-11-20 18:10:29 +02:00
Alex Jbanca 514428ee57 fix(WC): Adding tests for ChainsAvailabilityWatchdog and ChainsSupervisorPlugin
+ move other tests from the wrong folder
2024-11-20 18:10:29 +02:00
Alex Jbanca cb772dc6b5 feat(WC): Handle unavailable chains or internet connection
This commits implements the `connect` `disconnect` session events for WC and also disables primary buttons for WC whenever there is no connection to internet or chains.

+ update tests
2024-11-20 18:10:29 +02:00
Alex Jbanca 519bfaedfa fix(WC): Disable primary action buttons when the service is not available
+ Disable the `Connect` button after the first request
2024-11-20 18:10:29 +02:00