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.
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.
+ 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
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
* 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
ChartStoreBase -> ChartDataBase
TokenBalanceHistoryStore -> TokenBalanceHistoryData
TokenMarketValuesStore -> TokenMarketValuesData
Those components store data without any interaction with the backend.
Therefore they are not stores.
Closes: #16295
- 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
- set the pass max length to 100 (via `Constants`, not with a hardcoded
regexp)
- delay the validation until the user hits the limit
- clear the categories (lower/upper/num/sym) info if the password is
cleared too
- update the error messages according to latest Figma designs
Fixes#16239
- enable the Next button, and delay the validation after it's been clicked
- visually display required fields also for logo, banner, and tags (min
1 tag is required now)
- when pasting over limit, chop the text to the maximum length, instead
of just leaving the text field empty
- do not let the popup autoclose on clicking outside or pressing Esc
- add a StoryBook page
- minor cleanups and alignments to the latest Figma designs/flows
Fixes#13966Fixes#16479Fixes#14902
There were two version of plainText - one exposed from the backend,
another, backend-independent in StringUtils. The latter one is now
used in all cases.
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}`'
```
- do not allow DND when the StatusChatInput is disabled
- remove `Global.dragArea` variable from the Global singleton
- move the `DropAreaPanel` into `StatusChatInput` and handle its
enabling from there
Fixes#16451
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.