The original GH issue https://github.com/status-im/status-mobile/issues/21113
came from a request from the Legal team. We must show to Status v1 users the new
terms (Terms of Use & Privacy Policy) right after they upgrade to Status v2
from the stores.
The solution we use is to create a flag in the accounts table, named
hasAcceptedTerms. The flag will be set to true on the first account ever
created in v2 and we provide a native call in mobile/status.go#AcceptTerms,
which allows the client to persist the user's choice in case they are upgrading
(from v1 -> v2, or from a v2 older than this PR).
This solution is not the best because we should store the setting in a separate
table, not in the accounts table.
Related Mobile PR https://github.com/status-im/status-mobile/pull/21124
---------
Co-authored-by: Igor Sirotin <sirotin@status.im>
When added more command to the circuit breaker, we forget to keep a real fallback mechanism,
the last call should ALWAYS be made.
As such, i am manually skipping to use circuit breaker in that case.
* fix_: when preparing a balance map skip chains where cannot get the balance, instead of returning the error
* fix_: crash sending collectibles fixed
When mapping `MultipathProcessorTxArgs` to `ProcessorInputParams` setting `FromChain` was missed.
* fix_: crash when selected token cannot be found is fixed
When going offline, all the rpc calls fail making hystrix open all the
circuits.
This commit changes the behavior so that when we go back online, we
close all the circuits.
We should also avoid making rpc requests while offline, but this should
work for release.
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.
* feat(rpc_user_agent)_: Added User Agent to the authed rpc client
* feat(rpc_user_agent)_: Added OS conditioned agent naming
* feat(rpc-user-agent)_: Added user agent to upstream client
* chore_: unused `BuildTx` function removed from the processor interface and types that are implement it
Since the `BuildTx` function is not used anywhere, it's removed from the code.
* fix_: resolving nonce improvements
When the app sends more than a single tx from the same account on the same chain, some
chains do not return appropriate nonce (they do not consider pending txs), because of
that we place more tx with the same nonce, where all but the first one fail.
Changes in this PR keep track of nonces being used in the same sending/bridging flow, which means
for the first tx from the multi txs the app asks the chain for the nonce, and every next nonce is resolved
by incrementing the last used nonce by 1.
Fixes https://github.com/status-im/status-desktop/issues/15930
The issue happened because I received a notification about a contact request, but the request was not associated with a message in the DB. The DB didn't have a message with the required ID in it.
This potential fix moves the creation of the contact request later in the handling code, because the only way this bug can happen as far as I see it is if there is an error later in the handler function and the message is never added to the response, and therefore never saved.
- 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>
The Router algorithm is checking all the routes in order to find one the user has a balance to execute it
even that one is not the cheapest one. But if the user has some balances, but not enough to execute any
of suggested routes, we we're returning the last route which was checked, with the changes from this commit
we will return the last route for which the user has some balance, but not enough.
For tokens that it does not support and some that were listed in mapping
we responded with error
Co-authored-by: Ivan Belyakov <ivan.belyakov.job@gmail.com>
* 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
Co-authored-by: IvanBelyakoff <ivan.belyakov.job@gmail.com>
* feat(wallet)_: add basic auth for cryptocompare proxy (#5536)
* feat(wallet)_: add basic auth for cryptocompare proxy
* test(wallet)_: add a test for httpclient used in market clients
* feat(wallet)_: add status proxy RPC urls for blockchain providers
Replace the status proxy URL for cryptocompare.