Commit Graph

13 Commits

Author SHA1 Message Date
Ivan Belyakov 2df9df10ab fix(tests): moved test db setup to a common place 't/helpers', created
interface for initializing db, which is implemented for appdatabase and
walletdatabase. TBD for multiaccounts DB.
Unified DB initializion for all tests using helpers and new interface.
Reduced sqlcipher kdf iterations for all tests to 1.
2023-08-18 09:00:56 +02:00
Dario Gabriel Lipicar bf54a57780 fix: correct transfer type detection 2023-06-21 12:10:25 -03:00
Dario Gabriel Lipicar 86350379b1 chore: rework activity test utils 2023-06-15 22:04:19 -03:00
Stefan 87ce6cfbcd feat(wallet) filter activity by status
Main changes:

- extend DB query include status for transactions and pending_transactions
- extend DB query to aggregate data from complex activity entries
- extend tests to include the new status values

Other changes:

- Improve tests with mocked addresses in DB to have a true to/from state

Update status-desktop #10746
2023-06-10 11:43:00 +02:00
Stefan 5b6f7226bb feat(wallet) extract json blobs and add custom migration support
Extended the migration process with a generic way of applying custom
migration code on top of the SQL files. The implementation provides
a safer way to run GO code along with the SQL migrations and possibility
of rolling back the changes in case of failure to keep the database
consistent.
This custom GO migration is needed to extract the status from
the JSON blob receipt and store it in transfers table.

Other changes:
- Add NULL DB value tracking to JSONBlob helper
- Index status column on transfers table
- Remove unnecessary panic calls
- Move log_parser to wallet's common package and use to extract token
  identity from the logs

Notes:
- there is already an index on transfers table, sqlite creates one for
  each unique constraint therefore add only status to a new index
- the planned refactoring and improvements to the database have been
  postponed due to time constraints. Got the time to migrate the data
  though, extracting it can be done later for a more efficient
  implementation

Update status-desktop #10746
2023-06-08 13:54:40 +02:00
Dario Gabriel Lipicar 2fc79fb9b5 feat(Wallet) detect uniswapV2 swap events
Part of #10251
2023-06-05 12:08:18 -03:00
Stefan e78a73bd9f feat(Wallet) complete the filter API
It uses the current data only and doesn't extend with new types or
include new features in activity sources DBs.

Major changes:
- Partially filter by chain IDs
- Partially filter by Status if it is the case
- Partially filter by token types
- Filter by counterparty addresses
- Use wallet accounts for TO/FROM instead of filters

Closes: #10634
2023-05-23 14:48:29 +02:00
Stefan c020222f1b feat(Wallet): add activity filter api prototype
Add the possibility of retrieving the metadata of wallet activity based
on the given filter criteria.

Current implementation relies that after fetching the metadata, user
will follow up with more requests for details. However, after some
experimenting I'm considering extracting all required information
for the summary viewing while filtering. This way there will be no
need for another batch requests for transfers, multi-transactions and
pending transactions to show the summary. Only when user wants to see
the details for one will specifically request it.

For this first prototype, the filter criteria is limited to:
- time
- type
- addresses

Major changes:
- Add the filter definition to be used in propagating the filter
  information
- Add GetActivityEntries API to return the list of activity entries
  for the given addresses/chainIDs by a view in the complete list
- GetTransfersForIdentities to batch retrieve further details of the
  transfers
- GetPendingTransactionsForIdentities to batch retrieve further details
  of the pending transactions
- Added a new package testutils for tests.
- Added tests

Updates status-desktop #10366
Closes status-desktop #10633
2023-05-14 23:05:28 +02:00
IvanBelyakoff cb9f2dd7d2
feat(wallet): refactor transfers to allow multiple transfer fetching (#3432)
strategies.

On mobile devices we might not want to load all transfers history
to avoid high internet traffic consumption or to save some space.
On desktop we will load all transfers in background.

- Moved current fetching transfers implementation to
OnDemandFetchStrategy
- Implemented QueuedAtomicGroup to cache outgoing commands above a
threshold
- Refactored some type names, methods for better clarity:
  - LastKnownBlock name was misused
  - Block renamed to BlockDAO to clarify what it does and avoid
confusion with geth Block type
- Cleanup - removed unused parameters and types' members
- Changed tests to use in memory DB for speedup
- Added more logging and comments

Updates #10246
2023-05-08 08:02:00 +02:00
Stefan 7c7c3a1f13 feat(wallet): keep multi-transactions relation after transaction is complete
Updates status-desktop #7663
2023-03-01 23:34:00 +04:00
Richard Ramos bf9abfc350
feat: make kdf iterations configurable when creating a multiaccount (#2796) 2022-09-27 16:27:20 -04:00
Khushboo-dev-cpp 1485b3b4c8
feat: Added new BaseFee param inside transactions (#2847) 2022-09-09 20:22:59 +02:00
Anthony Laibe 07651d4d06
feat: enable wallet without network binding (#2349)
* feat: enable wallet without network binding

* feat: make transfer network aware

* feat: allow to pass initial networks via config

* fix: nil check and feed

* feat: Add documentation with better function name

* fix: do not init the manager more than once

* fix: PR feedbacks

* Bump version

* Update Jenkinsfile.tests

* Convert int to string

Co-authored-by: RichΛrd <info@richardramos.me>
2021-09-09 16:28:54 +02:00