565 Commits

Author SHA1 Message Date
Sale Djenic
0eca7f5088 fix: issues after rebase fixed 2023-05-25 19:46:47 +02:00
Sale Djenic
eeaaf0ce3f feat: accounts improvements applied
- old `accounts` table is moved/mapped to `keypairs` and `keypairs_accounts`
- `keycards` table has foreign key which refers to `keypairs.key_uid`
- `Keypair` introduced as a new type
- api endpoints updated according to this change
2023-05-25 19:46:47 +02:00
Michal Iskierko
1c17fbeacc feat(RemoteBurn): Add remote burn collectibles functionality
* Updating smart contract (new burn function)
* remoteBurn() and estimateRemoteBurn() functions
2023-05-25 13:34:53 +02: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
Anthony Laibe
8b05ba6d8b fix: check balance for address details 2023-05-22 09:13:09 +02:00
Andrea Maria Piana
6acb34bab7 Allow setting up wallet with new config
This commit does a few things:

1) Extend create/import account endpoint to get wallet config, some of
   which has been moved to the backend
2) Set up a loop for retrieving balances every 10 minutes, caching the
   balances
3) Return information about which checks are not passing when trying to
   join a token gated community
4) Add tests to the token gated communities
5) Fixes an issue with addresses not matching when checking for
   permissions

The move to the wallet as a background task is not yet complete, I need
to publish a signal, and most likely I will disable it before merging
for now, as it's currently not used by desktop/mobile, but the PR was
  getting to big
2023-05-19 13:23:21 +01:00
IvanBelyakoff
17aaaf1dca
fix(desktop/wallet): fix bug in balance_cache - balances and nonces (#3509)
were stored in cache by pointers, which caused falsy cache hits in loop
because pointers with same address were created for different block
numbers. Now cache uses block numbers of uint64 as key, which can
overflow but it is not a problem since we use this cache for values
comparison, not as user data.
Fix crash on nil pointer in log.
Remove some unused code.
Protect nonceRanges with mutex while reading.

Updates #10246
2023-05-19 14:46:54 +03:00
IvanBelyakoff
94c7cd32af
feat(wallet): Implemented SequentialFetchStrategy for transfers. (#3480)
By default OnDemandFetchStategy is still used.

Updates #10246
2023-05-19 11:19:48 +03: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
Stefan
c5a8b40d9c fix(wallet) don't delete pending transactions for multi-transaction
This is done in Nim after the watched pending transaction changes state.

Note: tried to delete all transactions, not only multi-transaction,
as soon as the state is downloaded but it didn't work: noticed crashes
with minted transactions after restart.

Updates status-desktop #10474
2023-05-08 11:24:37 +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
Anthony Laibe
722390c784 fix: reponse may contains less results than expected 2023-05-03 08:38:29 +02:00
Stefan
a6d553c937 fix(wallet) ClientWithFallback handling state errors required by BH
The "not found" and "no contract" expected error is caught and wrapped
by ClientWithFallback. The fetching of balance history of next blocks
is aborted which is not desired.

Fix by not treating the error as a connection error in
ClientWithFallback.
2023-05-02 12:07:06 +02:00
Anthony Laibe
dd7c59423f feat: add saved address created at 2023-04-22 10:22:43 +02:00
Dario Gabriel Lipicar
4ef5eba6b5 chore: move chainIDs to constants file 2023-04-19 08:30:10 -03:00
Dario Gabriel Lipicar
633c8d1ed5 chore: clean up passing api keys to the wallet service 2023-04-19 08:30:10 -03:00
Dario Gabriel Lipicar
c8f0ceccc8 feat: add api to get list of owners from a given nft contract
Fixes #10290
2023-04-19 08:30:10 -03:00
Michal Iskierko
4e3ba2941c fix(AddTokenOwners): Move AddTokenOwners from MintTo
Issue #10161
2023-04-13 11:43:48 +02:00
Sale Djenic
1754c23763 chore: improvements to GetWalletToken function 2023-04-06 19:09:13 +02:00
Dario Gabriel Lipicar
ff755a1176 fix: add supported chains to OpenSea 2023-04-06 13:42:38 -03:00
Dario Gabriel Lipicar
5bad40c8be feat: add collectible animation info to data fetched from Opensea 2023-04-03 12:32:32 -03:00
Anthony Laibe
c84d6fcc35 feat: remove consecutive 2023-03-31 19:22:53 +02:00
Anthony Laibe
9c33049b4f chore: update connected on global failure 2023-03-31 19:22:53 +02:00
Anthony Laibe
0c8ce79941 feat: returns tokens even when error 2023-03-31 19:22:53 +02:00
Anthony Laibe
540001e137 feat: chunk correctly coinmarketcap calls 2023-03-31 19:22:53 +02:00
Anthony Laibe
e92049b9ca fix: wallet token return on no network 2023-03-31 19:22:53 +02:00
Anthony Laibe
d86446ad53 chore: adding debug 2023-03-31 19:22:53 +02:00
Anthony Laibe
2baa8e8ead feat: filter token by valid chain ID 2023-03-31 19:22:53 +02:00
Anthony Laibe
c9a8ab13c2 fix: set is connected for chain without fallback 2023-03-31 19:22:53 +02:00
Anthony Laibe
ec5449c2bd fix: collectible status event 2023-03-31 19:22:53 +02:00
Anthony Laibe
62220cedee feat: update chunk limit for token 2023-03-31 19:22:53 +02:00
Anthony Laibe
fae86fcfb7 feat: group all blockchain event 2023-03-31 19:22:53 +02:00
Anthony Laibe
ba75bda39e feat: event on error 2023-03-31 19:22:53 +02:00
Dario Gabriel Lipicar
4e222cc404 feat: collectibles cache 2023-03-31 12:24:33 -03:00
Dario Gabriel Lipicar
f097d3430a feat: reduce usage of OpenSea api key 2023-03-31 12:23:50 -03:00
Dario Gabriel Lipicar
d8ee8786ff fix: simplified tokenURI retrieval. Extended NFTMetadata struct. 2023-03-30 09:17:53 -03:00
Dario Gabriel Lipicar
48e16317a7 fix: added global lock for Opensea requests. Increased number of retries. 2023-03-29 18:20:09 +02:00
Sale Djenic
d30c88b80e neat: accounts and wallet api sorted out
Unused endpoints removed, new ones with more meaningful naming are added and
their purposes were revised.
2023-03-28 16:19:27 +02:00
Anthony Laibe
60dbc5d44d feat: config optimisation 2023-03-28 15:11:35 +02:00
Dario Gabriel Lipicar
a1e7eed141 feat: fetch NFT metadata from Communities 2023-03-24 15:17:41 -03:00
Khushboo-dev-cpp
a3f1a84d29
chore: Improve error logging for OpenSea errors / generic json unmarshalling errors (#3298)
fixes #8798
2023-03-20 16:53:39 +01:00
Dario Gabriel Lipicar
bd82250cf7 feat(Wallet): add API to fetch collectibles by owner and contract address 2023-03-20 10:52:16 -03:00
Khushboo-dev-cpp
bbec93b501
fix: Return token items even when market is down (#3291) 2023-03-20 14:44:23 +01:00
IvanBelyakoff
fe4e079bea
fix(wallet): fix crash on market price cache concurrent write (#3307) 2023-03-17 09:33:20 +03:00
IvanBelyakoff
612efb9b89
fix(Wallet): Fix uninitialized token map accessed (#3289) 2023-03-15 18:10:36 +03:00
IvanBelyakoff
2c9714f0f8
fix(wallet/coingecko): Fix coingecko crash on race writing to tokens map (#3274) 2023-03-14 21:59:10 +03:00
IvanBelyakoff
804b5b43b4
feat(Wallet): implement token list from Uniswap (#3273)
Fixes #8807
2023-03-14 20:33:05 +03:00
Dario Gabriel Lipicar
bac7eb08ca feat(Wallet): add API to fetch collectibles in a paginated way 2023-03-10 11:27:03 -03:00
Dario Gabriel Lipicar
7b6fc87f89 fix(wallet): use OpenSea api key only for mainnet endpoint 2023-03-10 08:55:58 -03:00
Stefan
f607164122 feat(wallet) add GetMultiTransactions wallet API
Updates status-desktop #7663
2023-03-07 19:38:31 +04:00