Commit Graph

1143 Commits

Author SHA1 Message Date
Dario Gabriel Lipicar 228197e2c4 feat(@desktop/wallet): Round down max value in Send and Swap modals 2024-11-29 08:39:58 -03: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 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 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 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
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
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
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 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
Alex Jbanca 7d3cd5c7bf feat(WalletConnect): Expose `emitSessionEvent` function from the WC js SDK
This commit exposes the `emitSessionEvent` function to qml
2024-11-20 18:10:29 +02:00
Alex Jbanca 517a10f805 feat(WC): Implementing SIWE flows
To squash - Implementing SIWE flows
2024-11-20 18:10:29 +02:00
Alex Jbanca 65013e8b58 fix(WC): Fix property names collisions
to squash - property names collisions
2024-11-20 18:10:29 +02:00
Alex Jbanca 7553ae45e0 feat(SIWE): Add siwe support to the webSdk integration
This PR implements the functions needed for siwe in the webSdk integration, updates the WC version and fixes an issue where the webpack does not automatically inject `Buffer` plugin needed by the SIWE impl in WC.
2024-11-20 18:10:29 +02:00
Anthony 22c4bb2846 feat: hide mercuryo
fix #16757
fix #16765
2024-11-19 11:16:16 +01:00
Dario Gabriel Lipicar 3e9e8bfe07 chore: remove unused components 2024-11-08 17:09:14 -03:00
Dario Gabriel Lipicar a53eb6001f feat(activity): remove activity details screen 2024-11-08 17:09:14 -03:00
Sale Djenic e3128587d8 fix: fill missing fees in tx object received from dApp
Fixes #16528
2024-11-04 11:32:19 +01:00
Dario Gabriel Lipicar ea94065c57 fix(swap): invalidate old uuid and route when a new route request is made
Fixes #16574
2024-10-31 12:12:28 -03:00
Anastasiya Semenkevich 4409c20264 chore(@e2e): change object name for AccountListItem 2024-10-29 21:16:40 +03:00
Sale Djenic f2883fdcee fix: animation for updating fees added to send and swap modal
Closes #16624
2024-10-29 16:12:07 +01:00
Sale Djenic f6055946d4 chore: usage of goerli removed 2024-10-29 15:46:09 +01:00
Khushboo Mehta b279bcedc2 fix(@desktop/wallet): Swap transaction - Wrong copy on the tooltip of the 'Swap' button
fixes #16568
2024-10-29 14:45:40 +01:00
Michał Cieślak fe249225a2 Storybook pages - multiple fixes regarding stores 2024-10-28 23:16:31 +01:00
Cuteivist c47f42eb39
fix: Show only selected networks (#16588) 2024-10-28 13:10:30 +01:00
Alex Jbanca 0962497e89 fix: Sign transaction popup scroll when content changes height 2024-10-24 12:06:40 +03:00
Michał Cieślak c9ba0a9aa7 Components for storing chart data renamed and moved
ChartStoreBase -> ChartDataBase
TokenBalanceHistoryStore -> TokenBalanceHistoryData
TokenMarketValuesStore -> TokenMarketValuesData

Those components store data without any interaction with the backend.
Therefore they are not stores.

Closes: #16295
2024-10-23 14:36:21 +02:00
Michał Cieślak ee5fb50c29 chore: TokenMarketValuesStore removed from shared/RootStore 2024-10-23 14:36:21 +02:00
Lukáš Tinkl d9d6d90dc9 [Style] remove legacy Style and its themes
- legacy Style and ThemePalette removed
- moved and deduplicated font definitions into `Theme` (unrelated to a
color palette)
- `Style.current.foo` -> `Theme.foo`
- `Style.current.fooColor` -> `Theme.palette.fooColor`
- upgrade the imports to 5.15
- removed some mode dead components

Fixes #16514
2024-10-22 15:54:31 +02:00
Cuteivist 5d12440562
fix; Update default sorting for assets and collectibles (#16552) 2024-10-21 12:26:14 +02: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
Alex Jbanca 684d0b4d63 fix: DAppsWorkflow flaky test 2024-10-15 13:40:48 +03: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
Khushboo Mehta 95369bca11 feat(@desktop/wallet): Remove network prefixes from main wallet accounts list 2024-10-11 18:48:37 +02:00
Khushboo Mehta 16a403e3e5 feat(@desktop/wallet): Remove network prefixes in Profile, Profile showcase and Profile preview 2024-10-11 18:48:37 +02:00
Alex Jbanca e99f817ccc chore: Migrate to the new WC packages
Migrate from `Web3Wallet` to `WalletKit`.
More details in the WC docs https://docs.reown.com/walletkit/upgrade/from-web3wallet-web
2024-10-10 23:32:50 +03:00
Alex Jbanca fd99b96cb5 feat(WalletConnect): Handle sign request expiration
Implementing the user-story for sign request expiry and add qml tests
+ other minor fixes

## Acceptance Criteria

```
//Always show the expiration
Given the sign/transaction request dialog is shown
When request has an expiration date
Then the user sees a 1 minute countdown in the dialog
```

```
// Show 1 minute timer
Given the sign/transaction request dialog is shown
When the request has 1 minute or less before expiring
Then the user sees a 1 second countdown in the dialog
```

```
Given the sign/transaction dialog is open
When the request expires
Then the Accept button is removed
And the only option for the user is to close the dialog
```

```
Given the sign/transaction request dialog is open
When the request expired
Then the `Sign` and `Reject` buttons are removed
And the `Close` button is visible
```

```
Given the sign/transaction request expired
Then a toast message is showing
And it contains the "<dapp domain> sign request timed out" message
```

```
Given the sign/transaction request dialog is open
When the request expired
Then the sign/transaction request dialog is still visible
```

```
Given the sign/transaction request expires
Then a console message is shown
And it contains 'WC WalletConnectSDK.onSessionRequestExpire; id: ${id}`'
```
2024-10-10 12:49:15 +03:00