Commit Graph

532 Commits

Author SHA1 Message Date
Dario Gabriel Lipicar 55e8fd4554 fix: ensure atomic collectibles ownership updates 2024-03-06 20:45:42 -03:00
Dario Gabriel Lipicar 71377a50d7 feat: fetch collectibles balances 2024-03-06 20:45:42 -03:00
Sale Djenic 846a59b40f chore: tokenstore details for usdc for sepolia and arbitrum sepolia updated 2024-03-06 19:38:35 +01:00
Khushboo-dev-cpp 580f697f57
fix: Fix send Erc 1155 flow (#4865) 2024-03-06 11:16:20 +01:00
Ivan Belyakov 440779fc8c fix: flaky test TestController_watchAccountChanges by making sure
to check the database transfer after removal event is processed.
2024-03-04 10:36:33 +01:00
Anthony Laibe 011a170a03 fix: dup tx
Remove duplicate gas only TX
Remove Send and Receive from self, only the send row is kept
2024-03-01 09:43:47 +01:00
Stefan a63d33e04a feat(wallet) process all the events and debounce updates
Process missing events

Throttle down downloader's events to avoid overloading the CPU with
change detection.

Updates status-desktop #12120
2024-02-29 17:06:40 +01:00
Stefan eecde4c27f feat(wallet) activity filter incremental updates on filter clear
Add an intermediary state to the session to keep track of the changes
made when the filter was applied.

Updates status-desktop #12120
2024-02-29 13:27:05 +01:00
Cuteivist 03b903fd64
feat: Pass community id for wallet activity (#4757) 2024-02-29 11:22:14 +01:00
Sale Djenic bb3006d747 feat: rpc request limiter 2024-02-29 08:26:10 +01:00
Stefan ae9b697eda feat(wallet) implement mixed incremental updates for activity filter
Refactor the activity filter session API to account for the new structure

Also:

- Refactor test helpers to mock for different chains with mixed answers
- Test implementation

Updates status-desktop #12120
2024-02-28 22:14:21 +01:00
Dario Gabriel Lipicar 9fef2d3558 fix: properly setup collectible providers exponential backoff 2024-02-27 18:26:55 -03:00
Dario Gabriel Lipicar 54ea0981a5 fix: properly handle tokenID 0 when filtering activity by collectibles 2024-02-23 09:43:20 -03:00
Anthony Laibe 972a4f9df9 feat: sepolia default 2024-02-23 11:26:31 +01:00
Cuteivist 83678042f4
chore: Pass tx ID instead of hash (#4769) 2024-02-22 23:40:36 +01:00
Sale Djenic 0e8143db76 feat(savedaddresses): mixedcase address added to the saved address struct 2024-02-22 10:16:12 +01:00
Mikhail Rogachev eb5bad4868
Feat: Profile showcase validate collectible ownership (#4737)
* feat: profile showcase checks then presenting collectibles

* chore: more obvious CollectiblesManager configuration
2024-02-22 11:08:58 +03:00
Anthony Laibe 0856efff6f fix: resolve first tx of block
This is a workaround when fetching unknown tx without receiver
2024-02-21 13:28:26 +01:00
Roman Volosovskyi cc708ce0ce
[#4690] Nilable block range values for proper ranges management (#4691) 2024-02-19 16:50:07 +01:00
Cuteivist a866b8025e
feat: Community token received notification (#4682) 2024-02-19 14:55:38 +01:00
Roman Volosovskyi 9e36df449e
Fix range for ERC20/1155/721 tx detection (#4746) 2024-02-19 11:50:03 +01:00
Igor Sirotin 789ee81201
fix: saved addresses sync (`TestSyncDeletesOfSavedAddresses` flaky test) (#4742) 2024-02-16 09:45:10 +00:00
Dario Gabriel Lipicar 12d70e0ce4 fix: notify collectible data update when transferID is set 2024-02-15 12:05:07 -03:00
Roman Volosovskyi 7f6f8b3f7c
Add tokens metadata on FetchOrGetCachedWalletBalances call 2024-02-15 14:19:19 +01:00
Anthony Laibe e0814a488f feat: add sepolia token 2024-02-14 11:11:46 +01:00
Sale Djenic 598d58f0d6 fix: a proper clock set when dispatching saved addresses 2024-02-13 17:39:10 +01:00
Stefan e9ff0fbefe feat(wallet) add GetMoreForFilterSession API method
Also fix StopFilterSession to always notify client

Updates #12120
2024-02-13 17:37:44 +01:00
Stefan ca973b4aa6 feat(wallet) use sql activity filter for incremental updates
Switch from the prototype of duplicating the SQL filter as a runtime
and keeping them in sync on each event that might invalidate the current
filtered entries to a simpler approach of requesting the filter again
and doing the diff to detect the new changes.

Also add a new reset API to model the new entries design requirements.

The new approach shows less corner-case to handle and follows one source
of truth concept making debugging and future maintenance easier.

Other changes

- Fix pending mocking to work with multiple calls
- Refactor tests to account for the new changes

Updates status-desktop #12120
2024-02-12 19:29:15 +01:00
Roman Volosovskyi af16669787
Fetch balances when db cache doesn't exist (second attempt) (#4714) 2024-02-12 13:29:31 +01:00
Roman Volosovskyi 76d58ba7f0
Fetch balances when db cache doesn't exist (#4710) 2024-02-12 10:10:28 +01:00
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