* feat_: log error and stacktrace when panic in goroutine
* test_: add test TestSafeGo
* chore_: rename logAndCall to call
* chore_: rename SafeGo to Go
* chore_: make lint-fix
* chore_: use t.Cleanup
* chore_: Revert "chore_: use t.Cleanup"
This reverts commit 4eb420d179cc0e208e84c13cb941e6b3d1ed9819.
* chore_: Revert "chore_: make lint-fix"
This reverts commit fcc995f157e671a4229b47419c3a0e4004b5fdab.
* chore_: Revert "chore_: rename SafeGo to Go"
This reverts commit a6d73d6df583f313032d79aac62f66328039cb55.
* chore_: Revert "chore_: rename logAndCall to call"
This reverts commit 8fbe993bedb9fbba67349a44f151e2dd5e3bc4cc.
* chore_: Revert "test_: add test TestSafeGo"
This reverts commit a1fa91839f3960398980c6bf456e6462ec944819.
* chore_: Revert "feat_: log error and stacktrace when panic in goroutine"
This reverts commit f612dd828fa2ce410d0e806fe773ecbe3e86a68a.
* feat_: log error and stacktrace when panic in goroutine
* chore_: make lint-fix
* chore_: rename logAndCall to call
* chore_: renaming LogOnPanic
* chore_: update rest goroutine function calls
* chore_: make lint-fix
This change adapts the market manager to cache the token-market-cap, and modifies the existing `GetWalletToken` function to use the token-price and token-market cache data. Additionally, we choose to use the cached price and market data for roughly 60 seconds when calling the `GetWalletToken` function.
This commits does a few things:
1) Adds cache of token amount to the GetWalletToken endpoint, used by
mobile, in case the user is offline.
2) Split circuits by chain-id (when available) and by host+index when
not
3) It makes GetWalletToken always refresh, as that's directed from an
user action and we want to respect that. A cool down of 10s should be
added in the future to avoid spamming.
- Return errors from fetchBalancesForChain and GetBalancesAtByChain instead of silently ignoring them.
- Use cached balances if fetching new data fails, preventing empty wallets and ensuring data consistency.
- Fixed unit tests that was expecting GetBalancesAtByChain to always return nil error
Closes#15767
Co-authored-by: belalshehab <belal@status.im>
- Added `restartWalletReloadTimer` method in `api.go` to expose an API for restarting the wallet reload timer.
- Implemented `Restart` method in `reader.go` to stop and start the wallet reader.
- Updated reader_test.go to comply with minimum test coverage threshold
chore(wallet)_: split getWalletTokenBalances into multiple functions
Removed some unused balances methods from wallet API
chore(wallet)_: refactored FetchOrGetWalletTokenBalances
- getWalletTokenBalances only returns cached ones
- update of balances is done in a separate method
chore(wallet)_: fix isVisible in getWalletTokenBalances is overwritten
It is overwritten and in some cases its value is desrespected
chore(wallet)_: simplify getWalletTokenBalance even further
chore(wallet)_: remove accountsDB from wallet.Reader
Call GetTestNetworkEnabled from NetworkManager instead
chore(wallet)_: remove rpc.Client from wallet.Reader.
Added GetActiveNetworks() method for NetworkManager
Removed adding native tokens from networks, as this is done already
in NetworkManager
chore(wallet)_: moved Persistence to token package
As it works with token_balances table, moved Persistence to token package.
Fixed TokenManager's Mark/Get previously owned tokens to use persistence
storage instead of direct SQL calls.
Introduced StorageToken that aggregates Token type, because when
Persistence moved to token package, names clash
test(wallet)_: tests for wallet.Reader.FetchorGetCachedBalances
Split ClientInterface to aggregation of multiple interfaces
Added tags to RPC stats API
Use tagged RPC client for transfers commands
Implemented general interface for RPC limiting
initial balance fetch, as cache was considered valid and in case
balance was previously stored in DB for this account, it was returned
though it was not up to date.
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
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
* 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