Commit Graph

12 Commits

Author SHA1 Message Date
dlipicar dd994587a3
chore_: initial steps to decouple rpc chain modules (#5856)
* chore_: moved chain rpclimiter and tagger to separate packages

* chore_: initial steps to decouple rpc chain modules
2024-09-24 14:07:26 +01:00
dlipicar f165103f66
chore_: migrate to uber's mock fork (#5858)
* chore_: migrate to uber's mock fork

* chore_: make vendor
2024-09-20 10:08:11 +01:00
Ivan Belyakov 3983114ae5 test(wallet)_: add unit tests for balance fetcher
replace types with interfaces where necessary to allow mocking
implement fake eth scanner and erc20 contracts
2024-07-04 09:29:49 +02:00
Michal Iskierko 574450289c feat_: Move community tokens transaction listening to status-go
Use EventWatcher to catch wallet events.
Handling all community tokens wallet events in communitytokens service (database and messenger operations).
Adding new signal to nim: CommunityTokenTransactionSignal, which is emitted everytime when the event is received.

Issue #4351
2024-05-16 16:18:15 +02:00
Patryk Osmaczko 1f42f2582a Revert "Comment out all logged flaky tests"
This reverts commit 0bd4a06edc.
2024-02-27 11:00:29 +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 0bd4a06edc Comment out all logged flaky tests 2024-01-18 06:36:12 +00:00
Stefan 3c4fcaa2ed feat(wallet): propagate status with the pending tx status changed
Replace usage of `eth_getTransactionByHash` with `eth_getTransactionReceipt`
when polling for changes. `eth_getTransactionReceipt` delivers also the
status of the transaction.

Update tests to account for the new changes
Propagate status with the update event

Refactoring of the `pendingtxtracker.go` file to emit notifications with
a new payload structure that includes transaction identity and deletion status.

Closes status-desktop [#12120](https://github.com/status-im/status-desktop/issues/13124)

ghstack-source-id: 936bff5a41
Pull Request resolved: https://github.com/status-im/status-go/pull/4523
2024-01-10 19:42:51 +01:00
Stefan e088e1b3bd chore(wallet): refactor test helpers and update event names
Refactor the test helpers for pending transactions by extracting the mock
implementations and helper functions into a new file `transactions/testhelpers.go`.

Update event names for clarity and consistency in `pendingtxtracker.go`.

Updates status-desktop: [#13124](https://github.com/status-im/status-desktop/issues/13124)

ghstack-source-id: d85756b80f
Pull Request resolved: https://github.com/status-im/status-go/pull/4492
2024-01-10 19:42:51 +01:00
Roman Volosovskyi 1dca3adb89
Basic test for findBlocksCommand 2023-09-19 13:17:36 +02:00
Stefan 71800a19f1 fix(wallet) fix pending transactions notification
Also, add regression test.
2023-09-01 00:18:26 +02:00
Stefan 524c21834b fix(wallet) propagate multi-transactions IDs to transfers
Mainly refactor API to have control on pending_transactions operations.
Use the new API to migrate the multi-transaction ID from to transfers
in one SQL transaction.
The refactoring was done to better mirror the purpose of pending_transactions

Also:
- Externalize TransactionManager from WalletService to be used by
  other services
- Extract walletEvent as a dependency for all services that need to
  propagate events
- Batch chain requests
- Remove unused APIs
- Add auto delete option for clients that fire and forget transactions

Updates status-desktop #11754
2023-08-22 18:39:42 +02:00