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.
* fix(wallet)_: fix provider down event happening too often
- handle context cancelled error
- do not count expected errors when calling tokenURI as providers
errors
- use archival not for optimism (was silently added by Grove makeing the
old URL non-archival)
Closes#5555
* test(wallet)_: add test for collectibles manager to verify that main
circuit is not tripped calling by tokenURI method
This commit adds support for centralized metrics.
There are two providers as of now, and we haven't quite decided which
one to go for, so for the time being both are supported.
It also introduces a new endpoint InitializeApplication that replaces
OpenAccounts
fix rpc limiter to delete limits on account removal
fix rpc limiter to not overwrite existing account limit on startup
fix providers down banner on limit reached error
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
It is needed to be able to set common limits for chain client
Added a test for group tag limiter
Added a mutex to RPC limiter to change counters atomically
Replaced isConnected with atomic.Bool and made it a pointer to
be shared across client instances
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
Fixed some other issues with prevented startup of statusd:
- ensure paths for DBs are created
- ensure DBs are opened before calling `StartNode`
- ignore error if multiacc database is not available
Updates #14693
* in all cases update the original urls in case they changed with a new
api key
* Update current urls only if the current one is the same as the
previous original one and the original one did change
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
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.