Commit Graph

4923 Commits

Author SHA1 Message Date
Anthony Laibe d1d31bd6c0 fix_: Token cache usage
When fetch or cache, always return the cache
Do not save if the token is not being returns
Resolve connection map AFTER making the call
2024-08-14 14:27:44 +02:00
Igor Sirotin ff1df0c492
fix_: publish community periodically (#5709)
* fix_: publish community at app start

* fix_: allow publishing community with same clock

* chore_: increase community publish interval to 24 hours
2024-08-14 10:32:11 +01:00
Igor Sirotin 67cf830097
fix_: cherry pick 5696: block on logout (#5703)
* fix_: block on logout (#5696)

* fix_: check context on processAndPushTelemetry

* fix_: fix waitgroup add/done in Waku

* fix(pendingTracker)_: stop the pending transacitonTracker on logout

* chore_: lint fix

---------

Co-authored-by: Jonathan Rainville <rainville.jonathan@gmail.com>
2024-08-13 20:13:15 +01:00
Samuel Hawksby-Robinson 3187ce57bf
chore_: cherry-pick: RPC User Agent (#5707)
* 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
2024-08-13 18:54:36 +01:00
saledjenic f7821cfc3d
fix_: calculating route for erc721 checks one more call if the function doesn't exist on the contract (#5691)
Old ERC721 contracts do not have  `safeTransferFrom` function, because of that we couldn't estimate the gas
and we couldn't resolve the right route. Now we firstly check for `safeTransferFrom` function which is supported
by ERC721A contracts and if the contract doesn't have it then we do `transferFrom` function call.

Example of ERC721A contract:
- https://etherscan.io/address/0x0024bc1035d30ae229a4712189b32131758cb000#code

Example of ERC721 contract:
- https://etherscan.io/address/0x06012c8cf97bead5deae237070f9587f8e7a266d#code
2024-08-13 16:26:20 +01:00
saledjenic c39baa80d2
chore_: cherry-pick #5658: improvements on resolving nonce (#5690)
* 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.
2024-08-13 11:17:08 +01:00
Prem Chaitanya Prathi a2ec9c2d8b fix_: add ticker to check peers and update connection status 2024-08-13 10:03:26 +01:00
Igor Sirotin f0b6e3d06b
fix(commit_check)_: use proper base branch (#5699) 2024-08-13 00:04:12 +01:00
dlipicar af0be7ec2f feat(wallet): add split onramp url endpoint (#5656)
* feat(wallet)_: add split onramp url endpoint & fix onrmap url
2024-08-12 13:54:05 +01:00
Anthony Laibe 9c9753f12e fix(wallet)_: return balance when available, do not fail all 2024-08-12 14:08:41 +02:00
dlipicar d4c6734a44
feat(wallet)_: handle paraswap price impact error (#5622) (#5680) 2024-08-09 18:52:53 +01:00
Prem Chaitanya Prathi b8ceedec50 chore_: update go-waku with keepalive timer fix 2024-08-09 08:22:18 +05:30
Prem Chaitanya Prathi 66c5316a96 fix_: filter connection change for pubsubTopics 2024-08-09 08:22:18 +05:30
frank 5dfeb130b0 fix_: make lint-fix 2024-08-08 13:46:51 +01:00
Volodymyr Kozieiev 511ac9e26b fix_: remove the restriction to call InitLogging only once 2024-08-08 13:46:42 +01:00
frank b38a447b1b chore_: ignore sensitive fields of WalletConfig when logging 2024-08-08 13:44:14 +01:00
Jonathan Rainville c5e7ca3827
fix(contact_request)_: potential fix to contact request with no saved message (#5665)
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.
2024-08-08 18:00:16 +05:30
frank f325e95bf1
fix_: enable light client for mobile (#5654)
* fix_: enable light client for mobile

* fix_: rename const name

* fix_: disable store confirmation for mobile v1 by default
2024-08-08 18:00:15 +05:30
Mikhail Rogachev f45dbb3067
feat_: cherry-pick: connector revoke permissions and accounts (#5666)
* feat(connector)_: add `wallet_revokePermissions` endpoint

* feat_: same behavior for `eth_accounts` and `eth_requestAccounts`
2024-08-07 08:32:40 +01:00
richΛrd cea857ed00
chore_: bump go-waku (#5660) 2024-08-06 20:13:07 +01:00
saledjenic c04e0dab4a
feat_: accounts/saved addresses capacity related api endpoints added (#5657)
Added endpoints:
- `RemainingAccountCapacity`
- `RemainingKeypairCapacity`
- `RemainingWatchOnlyAccountCapacity`
- `RmaininngCapacityForSavedAddresses`
2024-08-06 15:40:04 +01:00
Igor Sirotin 8ff95326c4
fix_: conversion from int to string causes code scanning error (#5600) (#5655)
fixes #5599

Co-authored-by: Godfrain Jacques <gkounkou@gmail.com>
2024-08-05 21:06:56 +01:00
Belal Shehab 67373ddbfc
fix(wallet)_: Handle balance fetching errors & fallback to cached values (#5641)
- 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>
2024-08-05 11:07:54 +01:00
saledjenic bb9f14233c
fix_: the last known route with positive balance returned if no route without balance/bonder error (#5648)
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.
2024-08-02 18:57:08 +01:00
saledjenic ca25be4516
fix(wallet)_: fixed error with parsing coingecko response. (#5650)
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>
2024-08-02 18:56:16 +01:00
Mikhail Rogachev 7e87fd0d05
fix(connector)_: connector response structure to valid json (#5625) 2024-08-02 09:43:53 +01:00
Icaro Motta a57055f43b
fix(wallet)_: fix provider down event happening too often (#5595) (#5649)
* 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>
2024-08-01 19:29:05 -03:00
IvanBelyakoff e16d820ecd
chore_: CHERRY-PICK Proxy URLs for blockchain providers (#5644)
* 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.
2024-08-01 10:06:34 +01:00
saledjenic 8dcaf21576
chore_: endpoint for checking address checksum validity added to wallet api (#5632)
- added `IsChecksumValidForAddress` function to `wallet` api
2024-07-31 17:25:13 -03:00
saledjenic a827dee54c
fix_: removes incorrectly added keycards (#5635) 2024-07-31 19:12:02 +01:00
saledjenic dca591f39a
feat_: added new error which will be returned in case bonder fee is higher than the amount being sent (#5637) 2024-07-31 18:25:07 +01:00
Jonathan Rainville 003058915e
fix_: add missing message verification flag when creating an account (#5570) (#5631) 2024-07-30 19:05:22 +01:00
Icaro Motta 919277be38
feat(pairing)_: Fallback pairing seed (#5614) (#5627)
* 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>
2024-07-30 13:03:43 -03:00
Icaro Motta 9570cd2a27
fix(wallet)_: update default wallet account's color to blue for old mobile user (#5621)
Authored-by: qfrank
2024-07-29 15:22:37 -03:00
Andrey Bocharnikov 5dcff278d2
fix(mailservers)_: Do not add backoff if user action triggered store node disconnection (#5602)
fix(mailservers)_: ToggleUseMailservers should connect/disconnect from active store node

fixes status-im/status-desktop#15032
2024-07-29 18:56:42 +01:00
Icaro Motta 62f342c2e9
feat_: Check for mobile data connection if setting is on (#5511) (#5613)
* 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>
2024-07-29 14:22:15 -03:00
saledjenic 82b63ccf29
chore_: needed router changes (#5620)
* fix_: setting best route only when we have it

* chore_: when returning errors, give precedence to custom (network) errors

* chore_: skip flaky tests (#5606)

* chore_: skip TestPeerCount

* chore_: skip flaky wallet tests

* chore_: skip flaky TestMemberReceivesPendingRequestToJoinAfterAfterGettingTokenMasterRole

* test_: flaky router tests fixed

Closes https://github.com/status-im/status-go/issues/5601

---------

Co-authored-by: Igor Sirotin <sirotin@status.im>
2024-07-29 18:03:13 +01:00
Igor Sirotin 07641bf38f
fix_: remove personal information from logs (#5608) 2024-07-28 22:11:24 +01:00
Godfrain Jacques 3b9ad43740
feat_:implement connector requestPermissions api (#5566) (#5604) 2024-07-28 23:22:49 +05:30
Godfrain Jacques 07614f6640
fix_: fix switchEthereum api when processing chain input string (#5603)
fix #5587
2024-07-28 23:22:48 +05:30
Icaro Motta 3ca29b87c3
chore_: cherry-pick PRs #5581 #5557 (#5596)
* fix(Wallet)_: Add quotes around token symbol in insufficient balance error messages to ensure valid JSON parsing

* feat_: migrate v1 keycard account (#5557)

---------

Co-Authored-By: belalshehab <belal@status.im>
Co-Authored-By: flexsurfer <flexsurfer@users.noreply.github.com>
2024-07-28 23:22:47 +05:30
Godfrain Jacques 13b78d2679
fix_: return default chainID instead of throwing error for unregistered dApp (#5584) (#5598)
fix #5583
2024-07-26 21:19:03 +01:00
Igor Sirotin 2013b65c58
fix_: make StoreNodeRequestManager filters ephemeral (#5582) (#5590) 2024-07-26 17:48:01 +01:00
Igor Sirotin 0e579fbd01
fix_: tests (#5585) (#5588)
* fix_: router tests errors sprintf

* chore_: skip flaky tests
2024-07-26 10:46:38 +01:00
Godfrain Jacques 5e88d5b498
fix_: return array of account without accounts key (#5576) 2024-07-25 06:10:13 -07:00
saledjenic 2bbdb35f6c
Added improvements in resolving the best route (#5569)
* 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.
2024-07-25 08:15:30 -04:00
Michal Iskierko 8bb0bb0b3c fix_: fix ticker in metrics
Create ticker in Start() instead of one global in service

Fix #5548
2024-07-25 12:42:33 +02:00
dlipicar 0456dcef8b
fix(wallet)_: exclude paraswap providers not supporting partner fees (#5573) 2024-07-24 16:29:54 -04:00
richΛrd 5b36cf8267
feat_: add lightpush and filter bandwidth usage to telemetry (#5547) 2024-07-24 14:28:38 -04:00
Dario Gabriel Lipicar 7c4b43b4d9 feat(wallet)_: incorporate partner fees for L1 paraswap swaps 2024-07-23 15:27:43 -03:00