Commit Graph

9 Commits

Author SHA1 Message Date
Ivan Belyakov 12deb23360 chore(wallet)_: removed all addresses parameter as redundant.
Instead we check directly if passed addresses are all wallet addresses that
we have in accounts DB.
2024-04-12 14:36:44 +02:00
Sale Djenic f69ee07593 fix: calculating next nonce for optimism chain improved to align with calculation on mainnet and arbitrum 2024-03-13 15:21:33 +01:00
Stefan e1c7c715aa fix(wallet): fix activity filter updates special case
This commit fixes a special case where the activity filter incremental
updates were reported as new even that they were present in a previous
update.

Updates status-desktop #12120
2024-03-11 09:37:05 +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
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
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
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