Commit Graph

502 Commits

Author SHA1 Message Date
Roman Volosovskyi 005e7e6ee4
Fix nonce change detection (#4679) 2024-02-08 12:54:04 +01:00
Dario Gabriel Lipicar 9c89409c94 fix: use opensea only as last resort collectibles provider
Fixes #13442
2024-02-07 12:27:23 -03:00
Anthony Laibe 101f1aeca3 feat: add support for erc1155 2024-02-07 11:59:32 +01:00
Dario Gabriel Lipicar 058fa629a0 feat(wallet): add contract type to collectibles 2024-02-06 13:35:01 -03:00
Roman Volosovskyi d5a10a97f1
[#4646] Return l2 block number when calling BalanceChecker on Arbitrum (#4668) 2024-02-02 12:52:52 +01:00
Roman Volosovskyi 9b10b29da2
[#4630] Add wallet_fetchOrGetCachedWalletBalances method (#4666) 2024-02-02 11:42:56 +01:00
Anthony Laibe 9c131edfaa feat: token list updated at global 2024-02-02 11:30:42 +01:00
Stefan 812910f087 feat(wallet): Add session-based activity API for dynamic updates
This commit introduces the first steps towards implementing a session-based activity API to support dynamic updates of the current visualized filter in the wallet activity service. This change is necessary to move away from static paginated filtering, which was previously done in SQL, to a more dynamic approach that can handle updates in real-time.

The main changes include:
- Add basic `EventActivitySessionUpdated` support for pending transactions.
- Added a `TODO.md` file outlining the plan and requirements for dynamic activity updates.
- New session-related API to the `activity.Service`
- `session.go` contains the logic for session management and event processing related to activity updates.
- Add test case for incremental filter updates.

The commit also includes:

- various other minor changes and refactoring to support the new session-based approach.
- Deprecation notices added to the `api.go` file for methods that are no longer used by the status-desktop application.
- Clarification comments added to the `scheduler.go` file regarding replacement policies.

Updates: #12120

ghstack-source-id: a61ef74184
Pull Request resolved: https://github.com/status-im/status-go/pull/4480
2024-02-01 19:55:06 +01:00
Stefan 21e6914a3c fix(wallet) fix reading amount for pending transactions
The reading of the amount for pending transactions was done in the same
way as for transfers table. However, the transfers table has a string
hex representation of the amount, while the pending transactions table
has a binary representation of the amount (*big.Int). This was
triggering the not int warning and value was missing.

Updates status-desktop #12120
2024-02-01 18:28:55 +01:00
Roman Volosovskyi 241595a871
[#4649] Do not restart reactor when it is already running (#4663) 2024-02-01 17:26:40 +01:00
Stefan 31a2d403ef fix(wallet) prioritize type SendAT for pending entries in activity
In case both to/from addresses are present in the list we were using
the same logic as for transfers. However, this doesn't make sense given
that we can have only one entry in pending activity.

The following cases are still covered

- When the receiver is in addresses we get received
- When both receiver and sender are in the list will get sent
- When the sender is on the list we will get sent

Updates status-desktop #12120
2024-02-01 16:59:09 +01:00
Ivan Belyakov e4745d01b4 fix(wallet): handle BlobTxType transaction.
Update go-ethereum version

Closes #4636
2024-01-31 10:06:14 +01:00
Ivan Belyakov 7d1927396a fix(wallet): do not return gas-only ETH entries of transfers table for
activities request

Closes #4618
2024-01-30 11:37:53 +01:00
Roman Volosovskyi dad2ec3f66
[#4640] Temporary fetch l2 block number for Arbitrum networks separately from BalanceChecker (#4644) 2024-01-30 10:09:44 +01:00
Anthony Laibe 0808b780f7 feat: add sepolia optimism 2024-01-30 08:57:06 +01:00
Ivan Belyakov f6c219c839 fix(wallet): Made loadBlocksAndTransfers command FiniteCommand to
keep restarting on error non-stop, removed some tests accordingly.
Fixed a flaky test for loadBlocksAndTransfers command.
Added tests for async.AtomicGroup.
Made tranfersCommand FiniteCommandWithErrorCounter to prevent infinite
restart.
2024-01-26 17:50:31 +01:00
Ivan Belyakov 95b148a247 fix(wallet): handle errors in findBlocksCommand and
findNewBlocksCommand gracefully.
Add ErrorCounter type for async package.
Add tests

Closes https://github.com/status-im/status-desktop/issues/11074
2024-01-26 17:50:31 +01:00
Roman Volosovskyi 71ae7ca1a0
[#4604] Skip balance requests on checking nonce (#4629) 2024-01-26 13:57:16 +01:00
Roman Volosovskyi 9b7eec0edb
[#4603] Get rid of fetchLatestBlockNumberCommand (#4614) 2024-01-25 13:05:59 +01:00
Roman Volosovskyi 647c3b0fd8
[#4605] Skip nonce check when possible during tx detection 2024-01-24 11:31:14 +01:00
Anthony Laibe 1017d2bc16 fix: query only header for fees 2024-01-23 15:24:39 +01:00
Roman Volosovskyi 9c0526f7d9
[#4202] Detect balance and erc20 transfers by a single contract call (#4508) 2024-01-19 16:57:04 +01:00
Siddarth Kumar 926f6a3c72 Revert "test: bump go-libp2p"
This reverts commit d0ca4447c6.
2024-01-18 20:29:33 +00:00
Richard Ramos d0ca4447c6
test: bump go-libp2p 2024-01-18 14:28:06 +00:00
Dario Gabriel Lipicar b38e2c9278 feat(wallet): add collectibles filter option tokenIDs 2024-01-18 11:14:02 -03:00
Roman Volosovskyi 0bd4a06edc Comment out all logged flaky tests 2024-01-18 06:36:12 +00:00
IvanBelyakoff 3a4dfff20b
fix(wallet): fix blocks ranges update error, add tests (#4560)
Fixes #4559
2024-01-17 12:08:56 +01:00
Dario Gabriel Lipicar 1924828f8d fix: disable Goerli in the OpenSea client 2024-01-16 12:05:06 -03:00
Roman Volosovskyi 9aef13f83e
[#4200] Enable prevention of tx detection on unrevealed mnemonic/address (#4444) 2024-01-16 15:17:02 +01:00
Dario Gabriel Lipicar ee6621b066 feat: link owned collectibles with latest matching transfer
Part of #12942
2024-01-15 12:55:47 -03:00
Dario Gabriel Lipicar 3a00c3fb9d fix: avoid losing cached community collectibles data 2024-01-12 08:55:38 -03:00
Dario Gabriel Lipicar 250b8eea87 fix: update the list of chains supported by opensea 2024-01-11 19:30:56 -03:00
Dario Gabriel Lipicar d4f4d47cdb fix: properly detect relevant incoming token transfers
Fixes #13132
2024-01-10 16:03:55 -03:00
Sale Djenic 280f48877d chore(savedaddresses)!: favourite property removed and primary key updated
- favourite column removed from the saved_addresses table
- favourite property removed from the SavedAddress struct
- ens name removed from the primary key, the primary key now is composed of address and is_test columns
- ens parameter removed from wakuext_deleteSavedAddress
- wallet_getSavedAddresses moved to wakuext_getSavedAddresses (to keep them all in a single place)
- saved addresses related endpoints removed from the wallet service, even they logically belong there, a reason for that
is avoiding emitting sync message if one uses calls from the wallet service, while that's not the case in ext service. Once
we refactor this and introduce devices syncing mechanism in the wallet service, we should not only these but other wallet
related endpoints move there (removed: wallet_getSavedAddresses, wallet_addSavedAddress and wallet_deleteSavedAddress).

Affected area:
Saved addresses
2024-01-10 19:30:56 +01:00
Anthony Laibe 6599be1721 feat: balance endoint without market data 2024-01-08 10:23:44 +01:00
Cuteivist 846a4e2363
feat: Community token received notification (#4515) 2024-01-04 13:22:06 +01:00
Sale Djenic a8357dceac feat: color field added to saved address
- `color` column added to `saved_addresses` table
- `colorId` parameter exposed via `SavedAddress` struct

Affected area - saved addresses.

The following endpoints return or receive `SavedAddress` instance:
- `UpsertSavedAddress`
- `GetSavedAddresses`
- `AddSavedAddress`
2023-12-29 10:39:52 +01:00
Sale Djenic 6bfc1bed08 chore: read and use nonce from network instead from the local cache when sending tx
Reading the Nonce from the local cache may be incorrect if the tx is made out of the Status app or
if Status app sends a tx prepared by the dapp (via WalletConnect). A submitted tx with a wrong Nonce
results in a failing tx, that's why we need to read the Nonce from the network.
2023-12-29 08:43:03 +01:00
Cuteivist dac7a0daf9
feat: Fetch community data for tokens (#4497) 2023-12-22 10:43:19 +01:00
Cuteivist 6bfe626558
feat: Use media server for community token images (#4493) 2023-12-21 16:05:29 +01:00
Cuteivist 313375e215
feat: Save previously owned tokens (#4482) 2023-12-21 15:12:50 +01:00
Anthony Laibe 8cbdc80758 feat: expose token balance API 2023-12-21 08:52:29 +01:00
Dario Gabriel Lipicar 959dcbdea5 feat: lazy load collectibles metadata 2023-12-19 21:27:20 -03:00
Dario Gabriel Lipicar b1e000ed59 feat: add balance to collectibles api 2023-12-18 18:24:21 -03:00
Dario Gabriel Lipicar 9dea2e8875 feat: always include community image in community collectibles 2023-12-16 08:49:58 -03:00
Dario Gabriel Lipicar b3cc73aa7f feat: use media server for community collectible images 2023-12-16 08:49:58 -03:00
Cuteivist 7af313cd53
feat: Add community manager and fetch cached community metadata (#4450) 2023-12-14 17:50:46 +01:00
Ivan Belyakov 81073b208e fix(wallet): Made an interface for BlockRangesSequentialDAO to
mock it in tests.
Made a configurable timeout interval for Commander interface.
Added tests to verify loadBlocksAndTransfers command is stopped
correctly on max errors limit reached
2023-12-14 16:49:23 +01:00
Ivan Belyakov 670954b71b feat(wallet): separated finite and infinite commands in transfers for
proper handling of errors and commands restart.
Now:
- Infinite commands started only once and never restarted, stoped on
context.Done.
- Finite commands are joined into AtomicGroup to stop the rest in the
  group in case one command fails. Otherwise other commands in the group
  will continue running and the failed command is not retried to
  restart. Fixed goroutine leakage in case of failure of some commands
2023-12-14 16:49:23 +01:00
Sale Djenic d2ae23f466 chore(walletconnect)_: record wallet sessions instead of pairings 2023-12-14 12:58:27 +01:00