Commit Graph

242 Commits

Author SHA1 Message Date
Lukáš Tinkl d37341caee fix(DAppSignRequestModal): correct wallet account color
- we are getting a colorId, so convert it

Fixes #16094
2024-09-06 16:19:59 +02:00
Michał Cieślak 204d72cd40 TokenSelectorNew: workaround for QTBUG-62411, minor sizing fixes 2024-09-05 08:55:15 +02:00
Michał Cieślak d82499fd7b AssetSelector added
This component is simpler version of TokenSelector, composed of the same
basic componets, useful when only assets are subject of selection.

Closes: #16234
2024-09-05 08:55:15 +02:00
Michał Cieślak 01a24e1b19 TokenSelectorNew decomposed into smaller, reusable subcomponents 2024-09-05 08:55:15 +02:00
Anastasiya Semenkevich 9598e9a44c qml: new object names for token selector panel 2024-09-04 16:16:10 +03:00
Khushboo Mehta b8f41e35c4 feat(@desktop/wallet): Buy Mercuryo flow - Improvements
fixes #16041
2024-09-02 16:51:16 +02:00
Michał Cieślak a8940a71f5 Using ClipboardUtils.setText instead of nim's copyToClipboard 2024-08-29 15:46:17 +02:00
Seitseman 2275fe4f1f fix(Stored): Make stores typed
Adding types instead of var for stores used in qml components

Closes: #14801
2024-08-27 10:52:18 +02:00
Lukáš Tinkl e3dae7e1db feat(StatusButton) Add support to show text when button is loading
- add a secondary "loading" state (`loadingWithText`), that is show the
loading indicator next to the text
- simplify the StatusBaseButton layout (esp. handling the overall
opacity/visibility)
- add a QML test suite; the code was becoming too complex and adding a
simple boolean prop was getting "dangerous"
- port the SwapModal to use the new `loadingWithText` property

Fixes #15313
2024-08-19 22:36:50 +02:00
Lukáš Tinkl 7c10b16b67 chore(AmountToSend): AmountToSendNew is dead, long live AmountToSend 2024-08-17 09:39:42 +02:00
Lukáš Tinkl 114abc7015 chore(swap): port SwapInputPanel to AmountToSendNew
- adjust the API calls
- fixup the tests
2024-08-17 09:39:42 +02:00
Lukáš Tinkl a7e74f3e00 chore(Global): Remove FeatureFlags access via Global singleton
- rationale: do not save global state in a singleton, gather and
propagate the values via FeatureFlagsStore

Fixes #14697
2024-08-12 20:00:31 +02:00
Khushboo Mehta 03e75e9532 fix(@desktop/wallet): Creating the UI flow needed to select params for making a purchase via Mercuryo 2024-08-12 11:25:00 -03:00
Valentina Novgorodtceva b4ef71142e test: share wallet address test and default account values in send/receive/bridge 2024-08-09 11:14:54 +03:00
Michał Cieślak a0a688c3e4 Wallet: swap/bridge buttons visibility adjusted
Closes: #15952
Closes: #15931
2024-08-08 17:29:29 +02:00
Michał Cieślak bb05c068fa fix(Wallet/SendModal): Using community assets in SendModal unblocked
Closes: #15766
2024-08-08 15:40:18 +02:00
Lukáš Tinkl 96824dbb91 feat(Wallet): Display the "Buy" button everywhere
- display the "Buy" button in every context in the wallet footer except
when viewing a collectible's details

Fixes #15813
2024-08-08 09:30:49 +02:00
Roman Chornii 6aa6746de2
fix(dApps): Improved handling of connected dApps. (#15985)
1. Hiding DApps button on not supported wallet account selection
2. Filtering DApps in connected dApps list based on account selection

closes: #15589
closes: #15647
2024-08-05 16:41:20 +03:00
Lukáš Tinkl 6159f53839 fix: Add additional information to the Beta tags
- display additional beta information as a tooltip
- don't overlap the Beta badge with the unread msg indicator
- some minor cleanups & fixes

Fixes #15795
Fixes #15929
2024-08-05 15:39:51 +02:00
Khushboo Mehta 27aaa97ebd fix(@desktop/wallet): fix for Swap Input parameters reset when balances are reloaded
fixes #15785
2024-08-05 14:39:27 +02:00
Lukáš Tinkl 40f7aff086 fix: inconsistent/incorrect decimal value formatting
- format Big decimal numbers correctly according to the current locale;
some precisions loss is tolerated here for the display purposes
- fixes wrong decimal separators in some places and aligns with the
standard in terms of number of decimals, as everywhere else in the app

Fixes #15612
Fixes #15790
2024-08-01 15:35:52 +02:00
Cuteivist 74bc695f10
chore(wallet): Hide Swap if cannot send (#15918) 2024-07-31 16:02:03 +02:00
Khushboo Mehta 2447fa3554 fix(@desktop/wallet): Swap modal - Pay input amount - deleting 1 decimal deletes the entire number
fixes #15818
2024-07-31 15:20:37 +02:00
belalshehab 1aa2221834 fix(wallet)_: Temporarily disable Max Amount button pending #15709
- This commit temporarily disables the MaxAmount button in the `SwapInputPanel` and `SendModal` components.
     - The MaxAmount button will be reintroduced with the correct behavior in issue #15709 for the 2.31 release.

closes: #15710
2024-07-25 17:53:40 +03:00
Stefan f6ae5ceabe fix(dapps) Wallet Connect url validation
The static url validation state `Pairing.errors.ok` was directly
responsible for the validation action in UX. With current change
the validation is now based on the pairing response. When the
pairing response is received the UX is validated and after half second
UX is moved to the approval process (`ConnectedDAppModal`)

Closes: #15591
2024-07-25 12:55:29 +02:00
Lukáš Tinkl ee01c20b88 fix(SwapModal) disable exchange button when params empty
- when we arrive to a point when all input params are empty, disable the
middle Exchange button
- add QML test for the Exchange button enabled/disabled state

Fixes #15751
2024-07-24 15:05:05 +02:00
Stefan e57f7552d9 feat(dapps) make wallet connect request data human readable
Notify user if he doesn't hold enough funds to make the transaction
Also check fees funds including the amount to be sent

Closes: #15192
2024-07-23 00:24:22 +02:00
Alex Jbanca 32aff401d6 fix(SendModal): Various issues fixed
1. Bridge panel not showing
2. Max button value when showing the fiat balance
3. Wallet footer visibility when Swap feature is disabled
2024-07-19 19:53:31 +03:00
Alex Jbanca 6e93935298 fix(Send): Fixing Send button text on wallet footer on owner collectibles details view
Fixing a bug where the community name is not shown in the `Send` button
Get the collectible community name from the community model for community tokens. Otherwise default to community id.

+ Fix WalletFooter layout when the buttons text exceeds the available width

to squash: Fixing send on owner token - name
2024-07-19 19:53:31 +03:00
Alex Jbanca b36e2759af fix(Send): Fine tune the Send action on collectibles
1. Show Send Button on wallet footer when all accounts is selected
2. Hide Send Button in collectibles context menu and collectibles details view when the collectible is not owned by the user
3. Disable the Send Button in collectibles context menu and collectibles details view when the collectible is soulbound

to squash: Fine tune send action on collectibles

to squash: Fine tune send on collectibles

to squash: Fine-tune collectibles
2024-07-19 19:53:31 +03:00
Michał Cieślak 1e88756c13 SendModal: new AmountToSend initial integration
- new AmountToSend used in SendModal
- MaxSendButton simplified

Closes: #15207
2024-07-19 17:27:08 +02:00
Stefan 248ba1c1c8 feat(dapps): Add support for max fees in WalletConnect requests
Compute max fees for transaction related requests and display the
results to user.

Also:

- Add helper to convert from hex (backend) to decimal (frontend) values.
- Add helper to convert from float gwei to hex wei
- Update tests to accommodate for the new dependencies.

Sourcing of account balances is not included therefore the transaction is
allowed to go through even if the account balance is insufficient. An error
will be generated by the backend in this case.

Updates: #15192
2024-07-19 10:02:50 +02:00
Stefan 4341cfb4d2 feat(dapps) reject request on closing of modal
Closes: #15585
2024-07-18 17:15:24 +02:00
Khushboo Mehta ec86a30d6e fix(@desktop/wallet): Fix for Swap - Pay and Receive assets get unselected, Pay amount resets to 0
fixes #15525
2024-07-17 17:25:57 +02:00
Khushboo Mehta 1d7ab859be fix(!desktop/wallet): Swap Modal doesn't have cursor visible when launched
fixes #15417
2024-07-17 17:25:57 +02:00
Roman Chornii c4d930ef88
fix(dapps) fail to process a transaction if missing usual fields (#15481)
Updates: #15189

Co-authored-by: Stefan <stefand@status.im>
2024-07-15 12:23:35 +03:00
Lukáš Tinkl 38d155f590 feat(SwapModal): Integrate Sign and Approve modals
- remove old popup and related components/adaptors
- simplify the API of the Sign/Approve modals to take pre-formatted
amounts as strings
- correct login/auth icon
- SB: make it possible to open the new secondary modals
- SB: fix the `fetchSuggestedRoutes` response handling, pass around the
`uuid` and inject it to the mocked suggested routes
- adjust SB pages and tests

Fixes #15443
2024-07-12 16:04:21 +02:00
Stefan 4deea3461f feat(dapps): show estimated time for dApps requests
Implemented using the fees from the transaction data sent
by the dApp.

Also fixed the nim status go wrapper to send proper formatted
string as expected on the other side.

Updates: #15192
2024-07-12 15:39:41 +02:00
Anthony Laibe b2592d5d01 fix(@wallet): disable state for refresh
in case not interactive, we should not change the color on hover
2024-07-12 14:35:48 +03:00
Alex Jbanca ca8a0028a8
feat(WalletConnect): Implement sign request modal (#15520)
* feat(WalletConnect): Implement sign request modal

1. Implementing sign request modal based on SignTransactionModalBase
2. Adding storybook page
3. Integrate it in the app
4. Removing DAppRequestModal
5. Update RoundImageWithBadge to preserve aspect ratio between badge and main image

* fix(WalletConnect): Remove unneeded properties from WalletConnectService API

Removing `selectedAccountAddress` and `loginType`. These properties are now passed through DAppsWorkflow API

* fix(WalletConnect): Removing unnecessary changes
2024-07-12 00:00:15 +03:00
Khushboo Mehta 7caba84833 fix(@desktop/wallet): Fixing issue in deleting characters from Input area
fixes #15418
2024-07-11 17:41:04 +02:00
Stefan 136194c112 feat(dapp) handle pairing errors or timeout if no response
Found out while testing that in some corner cases there will be no
response of error in case of pairing. This is handled now by showing
a generic error message. The implementation is using a timer to handle
this case.
Extend the logic to report errors in the pairing process.

Closes #14676
2024-07-09 19:21:09 +02:00
Stefan 15b2c084d2 feat(dapps) check Wallet Connect pair uri for already used and expired
Refactor and bring all the error check back to services
Automate pairing procedure and move to the connect dialog
if uri was validated

Updates: #14676
2024-07-09 16:11:23 +02:00
Khushboo Mehta 2df35ff0c9 feat(@desktop/wallet): Implements auto refresh
fixes #14952
2024-07-09 15:48:09 +02:00
Michał Cieślak 4a6257282e feat(Wallet): New tokens selector and related adaptor
Closes: #15121
2024-07-09 13:13:52 +02:00
Lukáš Tinkl 5665602451 feat:[UI - Swap] Create swap approve dialog
- create a new UI component
- add it to StoryBook
- add QML tests
- integration will be done as part of
https://github.com/status-im/status-desktop/issues/15443

Fixes #15442
2024-07-09 12:06:49 +02:00
Stefan 94dc7b04a5 feat(dapp) disconnect wallet connect dapps
Closes: #15189
2024-07-05 17:48:30 +02:00
Alex Jbanca 2f050a025f feat(WalletConnect): Fine-tune connect dApp modal
Changes:
1. Align dialog with Figma design
2. Add new components for round image with badge and connection status tag
3. Add tests
4. Dapps service will now receive wallet `RootStore` as input and reuse existing models with account balance and other necessary info for account selection and chain selection
5. Minor updates in stores
6. Minor updates in WC toast messages to display app domain instead of app url
2024-07-05 01:03:23 +03:00
Lukáš Tinkl 7146d5af5b feat: [UI - Swap] Create swap sign dialog
- create a common base for "sign" transaction popups/modals:
`SignTransactionModalBase`
- add SwapSignModal, deriving from the above common modal base
- add it to StoryBook; integration TBD as part of a different followup
PR
- add QML tests

Fixes #14785
2024-07-04 11:12:14 +02:00
belalshehab 3452fbadc6 feat(wallet)_: add manual reload button to WalletHeader.qml
- Added a manual reload button to the WalletHeader to allow users to refresh wallet data on demand.
- Implemented a throttle timer to prevent excessive reloads.
- Show the last reload time.
- Updated UI elements to reflect the reloading state for user feedback.
- Connected the reload button to the backend to trigger the wallet reload functionality.

resolves: #13652
2024-07-04 00:19:42 +03:00