Commit Graph

74 Commits

Author SHA1 Message Date
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
Anthony Laibe ec5449c2bd fix: collectible status event 2023-03-31 19:22:53 +02:00
Anthony Laibe ba75bda39e feat: event on error 2023-03-31 19:22:53 +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
Dario Gabriel Lipicar a1e7eed141 feat: fetch NFT metadata from Communities 2023-03-24 15:17:41 -03: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
Dario Gabriel Lipicar bac7eb08ca feat(Wallet): add API to fetch collectibles in a paginated way 2023-03-10 11:27:03 -03:00
Stefan f607164122 feat(wallet) add GetMultiTransactions wallet API
Updates status-desktop #7663
2023-03-07 19:38:31 +04:00
Dario Gabriel Lipicar 3f3e8f8894 feat(Wallet): add opensea asset fetching by contract address and token id 2023-03-07 10:33:50 -03:00
IvanBelyakoff 48078393f9
feat: Update saved addresses DB to store ENS, isTest flag and chains (#3183)
prefixes. Changed primary keys and API methods.
Fixed tests and added new ones.
Fixed saved addresses and transaction tests to use ':memory:' sqlite
DB instead of a tmp file to speed up testing by hundred of times.

Fixes #8599
2023-03-06 16:26:46 +03: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
Anthony Laibe 60e1978bb5 feat: fallback rpc endpoint 2023-02-28 08:43:57 +01:00
Anthony Laibe e543fda4b5 feat: add coingecko fallback 2023-02-27 09:55:04 +01:00
dlipicar 1d1a95091d
feat: implement currency formatting calculation (#3191) 2023-02-17 11:11:07 -03:00
Stefan f4f6b25302 feat: convert history balance tokens to fiat
Add history.exchange sub-package with following responsibilities

- fetch and caches daily exchange rates for tokens
    - Partial update if missing form yesterday back
- Implement all time fetching special case
- Fetches the price of the token after merging entries for the selected
chains

history.service package changes

- Return ValuePoint instead of DataPoint
    - Value point contains the value in fiat as float64 instead
- Convert merged values from tokens balance (wei) to fiat

Other changes

- Move start/stop balance history to startWallet/stopWallet
- Move cryptocompare to thirdparty package to avoid recursive import
- Rename DataPoint.Value to DataPoint.Balance
- Don't merge entries for single chain
2023-02-15 18:17:21 +04:00
Sale Djenic d44fa42cbf feat: `GetDerivedAddressForPath` endpoint added 2023-02-01 09:03:59 +01:00
Stefan a2ff03c79e feat: retrieve balance history for tokens and cache it to DB
Extends wallet module with the history package with the following
components:

BalanceDB (balance_db.go)

- Keeps track of balance information (token count, block, block timestamp)
for a token identity (chain, address, currency)
- The cached data is stored in `balance_history` table.
- Uniqueness constrained is enforced by the `balance_history_identify_entry`
UNIQUE index.
- Optimal DB fetching is ensured by the `balance_history_filter_entries`
index

Balance (balance.go)

- Provides two stages:
    - Fetch of balance history using RPC calls (Balance.update function)
    - Retrieving of cached balance data from the DB it exists (Balance.get
    function)
- Fetching and retrieving of data is done for specific time intervals
    defined by TimeInterval "enumeration"
- Update process is done for a token identity by the Balance.Update function
- The granularity of data points returned is defined by the constant
increment step define in `timeIntervalToStride` for each time interval.
- The `blocksStride` values have a common divisor to have cache hit
between time intervals.

Service (service.go)

- Main APIs
    - StartBalanceHistory: Regularly updates balance history for all
    enabled networks, available accounts and provided tokens.
    - GetBalanceHistory: retrieves cached token count for a token identity
    (chain, address, currency) for multiple chains
    - UpdateVisibleTokens: will set the list of tokens to have historical
    balance fetched. This is a simplification to limit tokens to a small
    list that make sense

Fetch balance history for ECR20 tokens

- Add token.Manager.GetTokenBalanceAt to fetch balance of a specific
block number of ECR20.
- Add tokenChainClientSource concrete implementation of DataSource
to fetch balance of ECR20 tokens.
- Chose the correct DataSource implementation based on the token
"is native" property.

Tests

Tests are implemented using a mock of `DataSource` interface used
to intercept the RPC calls.

Notes:

- the timestamp used for retrieving block balance is constant

Closes status-desktop: #8175, #8226, #8862
2023-01-25 22:25:50 +04:00
Anthony Laibe e8cd779e35 feat: api to return service up or down 2023-01-21 13:11:03 +01:00
dlipicar c2a8dd8a0c
feat(wallet): add price cache (#3107) 2023-01-19 11:49:48 -03:00
dlipicar 77a56e2b93
Feature/8640 unified currency rounding (#3079)
* feat(@desktop/wallet): added iso4217 library for fiat currency display decimals

* feat(@desktop/wallet): added token peg info and use numbers for token market values

* feat(@desktop/wallet): added
2023-01-12 14:54:14 -03:00
dlipicar 7d04be3613
Revert "feat/currency rounding (#3041)" (#3046)
This reverts commit 3d22f4a86d.
2023-01-04 09:40:26 -03:00
dlipicar 3d22f4a86d
feat/currency rounding (#3041)
* feat(@desktop/wallet): added iso4217 library for fiat currency display decimals

* feat(@desktop/wallet): added token peg info and use numbers for token market values

* feat(@desktop/wallet): extend wallet api to fetch prices in multiple currencies

* chore(@desktop/wallet): rename token peg field for clarity
2023-01-03 10:24:55 -03:00
Anthony Laibe 6abbe98cd2 feat: allow to lock amount in router 2022-12-21 16:58:33 +01:00
Anthony Laibe d7bf19fdbb feat: allow to get wallet token for specific addresses 2022-12-08 09:16:17 +01:00
Anthony Laibe c735e2a6bb feat: add wallet ticker 2022-12-02 10:53:21 +01:00
Anthony Laibe eff02a79a9 feat: add wallet token endpoint 2022-12-02 09:32:07 +01:00
Stefan 601484af3e feat: Retrieve balance history for native token
Add functionality to sample and retrieve balance history and cache
it in memory for the current transfer controller.

The end of the balance history is snapped at twice per day to
avoid having to query the blockchain again for each fetching within
12 hours interval

The functionality will be extended with DB caching, API call batching,
"smarter" cache hitting and syncing between devices

Updates: #7662
2022-11-07 22:39:21 +01:00
Sale Djenic b0b23076a0 feat: `GetDerivedAddressDetails` added to accounts api 2022-10-28 13:27:55 +02:00
Anthony Laibe b11643e66d feat: hop integration 2022-10-26 09:39:30 +02:00
Khushboo-dev-cpp 3364c159f4
feat: Added API for getting historical data for a token (#2882) 2022-10-10 21:02:04 +02:00
Stefan b9d6e6d8c8 feat: sync saved addresses
Main changes:
- Extend saved addresses DB with sync info: sync timestamp, update timestamp
and soft removed flag
- Create custom protobuf message payload to sync saved addresses
- Cleanup saved addresses on each start of messenger, by deleting
soft removed older entries
- Sync all saved addresses on Messenger.SyncDevices calls
- Sync particular changes to saved addresses
- Add SavedAddressManager instance to messenger
  - Note, can't find a clean way to pass the SavedAddressManager to the
  messenger, so we create another one
- Add tests for sync and new DB API

Closes: #7229
2022-10-10 11:26:35 +02:00
Stefan aa4d95917c feat: merge favourites with saved address
Remove Favourites APIs and update the saved address APIs

Added up migration scripts that move the favourites from the old table
to the saved_addresses table with true flag and then drop the favourites table.

Required by #6546
2022-09-12 13:46:04 +02:00
Khushboo-dev-cpp 25a80cf20b
feat(CryptoCompareApi): Get token details from crypto compare (#2793) 2022-08-23 10:46:15 +02:00
Anthony Laibe ce0caa0f7f
feat: multi transaction (#2751) 2022-07-15 10:53:56 +02:00
Khushboo-dev-cpp b2ce92fd41
feat: Add logic to re caculate route for sending a transaction based on networks disabled by the user (#2742) 2022-07-14 16:22:42 +02:00
Anthony Laibe 35c4001e57
feat: estimate time for a transaction (#2744) 2022-07-12 14:25:32 +02:00
Vitaliy Vlasov 3dee94e505 Wallet sync for generated accounts 2022-07-06 19:24:43 +03:00
Anthony Laibe 4a3c4ad0ca
feat: allows to pass array of chain ids (#2733) 2022-07-04 09:48:30 +02:00
Anthony Laibe 8c0f230644
feat: Simple transaction router (#2686) 2022-06-09 15:09:56 +02:00
Khushboo-dev-cpp 15e5584ed2
feat: Add hasActivity param to derived addresses (#2663)
Added functionality to find target address when 6th param in path is added
for ex: "m'/44'/60'/0'/0/500" reperents the Address at the 500th index

Added a api to get the Address derived from a private key
2022-05-18 13:31:45 +02:00
Anthony Laibe e199ddbe9d
feat: get wallet api (#2619) 2022-05-10 09:48:05 +02:00
Anthony Laibe 907ba8ee5c
feat: visible token api (#2624) 2022-04-13 09:55:38 +02:00
Anthony Laibe 4d39547b81
Feat/expose registrar address (#2600)
* feat: expose registrar address

* fix code gen
2022-04-04 12:54:44 -04:00
Anthony Laibe 16311512cb
feat: add suggested fees api (#2604) 2022-03-29 17:12:05 -04:00
Anthony Laibe b629d6fa74
feat: move fetch prices to status-go (#2595) 2022-03-23 09:35:58 +01:00
Anthony Laibe 66d511e33f
feat: add opensea api key (#2528) 2022-02-16 10:22:19 +01:00
Anthony Laibe 9d8ec4432e
feat: Add token store API (#2482) 2022-01-14 10:21:00 +01:00
Richard Ramos ee41e30881
feat: extract node config from settings to individual tables (#2470) 2022-01-12 16:04:43 -04:00
Roman Volosovskyi 7ef2efaabd
Support for binance chains 2021-11-27 10:47:57 +02:00
Richard Ramos 38cc695753
waku2: log envelope hash and ids for all messages (#2427) 2021-11-11 12:13:55 -04:00