* 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.
* feat(pairing)!: Add extra parameters and remove v2 compatibility
This commit includes the following changes:
I have added a flag to maintain 2.29 compatibility.
Breaking change in connection string
The local pairing code that was parsing the connection string had a few non-upgradable features:
It was strictly checking the number of parameters, throwing an error if the number was different. This made it impossible to add parameters to it without breaking.
It was strictly checking the version number. This made increasing the version number impossible as older client would just refuse to connect.
The code has been changed so that:
Two parameters have been added, installation-id and key-uid. Those are needed for the fallback flow.
I have also removed version from the payload, since it wasn't used.
This means that we don't support v1 anymore. V2 parsing is supported . Going forward there's a clear strategy on how to update the protocol (append parameters, don't change existing one).
https://www.youtube.com/watch?v=oyLBGkS5ICk Is a must watch video for understanding the strategy
Changed MessengerResponse to use internally a map of installations rather than an array (minor)
Just moving towards maps as arrays tend to lead to subtle bugs.
Moved pairing methods to messenger_pairing.go
Just moved some methods
Added 2 new methods for the fallback flow
FinishPairingThroughSeedPhraseProcess
https://github.com/status-im/status-go/pull/5567/files#diff-1ad620b07fa3bd5fbc96c9f459d88829938a162bf1aaf41c61dea6e38b488d54R29
EnableAndSyncInstallation
https://github.com/status-im/status-go/pull/5567/files#diff-1ad620b07fa3bd5fbc96c9f459d88829938a162bf1aaf41c61dea6e38b488d54R18
Flow for clients
Client A1 is logged in
Client A2 is logged out
Client A1 shows a QR code
Client A2 scans a QR code
If connection fails on A2, the user will be prompted to enter a seed phrase.
If the generated account matches the key-uid from the QR code, A2 should call FinishPairingThroughSeedPhraseProcess with the installation id passed in the QR code. This will send installation information over waku. The user should be shown its own installation id and prompted to check the other device.
Client A1 will receive new installation data through waku, if they are still on the qr code page, they should show a popup to the user showing the received installation id, and a way to Enable and Sync, which should call the EnableAndSyncInstallation endpoint. This should finish the fallback syncing flow.
Current issues
Currently I haven't tested that all the data is synced after finishing the flow. I see that the two devices are paired correctly, but for example the DisplayName is not changed on the receiving device. I haven't had time to look into it further.
* test_: add more test for connection string parser
* fix_: fix panic when parse old connection string
* test_: add comments for TestMessengerPairAfterSeedPhrase
* fix_: correct error description
* feat_:rename FinishPairingThroughSeedPhraseProcess to EnableInstallationAndPair
* fix_: delete leftover
* fix_: add UniqueKey method
* fix_: unify the response for InputConnectionStringForBootstrapping
* fix_: remove fields installationID and keyUID in GethStatusBackend
* fix_: rename messenger_pairing to messenger_pairing_and_syncing
---------
Co-authored-by: frank <lovefree103@gmail.com>
Co-authored-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
* feat_: Check for mobile data connection if setting is on
* fix_: check code control flag inside asyncRequestAllHistoricMessages
---------
Co-authored-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
Co-authored-by: Igor Sirotin <sirotin@status.im>
* fix_: filtering out routes which do not match the amount in
* fix_: finding the best route logic updated
* fix_: "to" chains being used in sending bridge tx via hop are more explicit
Using `ChainIDTo` depicts better an intention which chain should be used.
* chore_: checking for required balance improved
An error contains now more details, for which token on which chain there is not enough balance for
executing a tx. Also check for required balance now calculates in fees for all tx that possibly can be
sent from the same chain.