768 Commits

Author SHA1 Message Date
Samuel Hawksby-Robinson
987c0b28ec test_: Added much better coverage for testing for filterCapacityValidationV2 2024-05-28 22:05:57 +01:00
Samuel Hawksby-Robinson
a648635d60 test_: Added much better coverage for testing for filterNetworkComplianceV2 2024-05-28 22:05:57 +01:00
Samuel Hawksby-Robinson
4f2cd8ff7a test_: Added testing for filterRoutesV2 2024-05-28 22:05:57 +01:00
Samuel Hawksby-Robinson
a91ce6067d test_: Added testing for filterCapacityValidationV2 2024-05-28 22:05:57 +01:00
Samuel Hawksby-Robinson
3a50ce0397 test_: Added testing for filterNetworkComplianceV2 2024-05-28 22:05:57 +01:00
Samuel Hawksby-Robinson
69125cd594 test_: Added testing for hasSufficientCapacityV2 2024-05-28 22:05:57 +01:00
Samuel Hawksby-Robinson
e1f65fb531 test_: Added testing for isValidForNetworkComplianceV2 2024-05-28 22:05:57 +01:00
Samuel Hawksby-Robinson
0f33076ceb test_: added testing for TestCalculateTotalRestAmountV2 2024-05-28 22:05:57 +01:00
Samuel Hawksby-Robinson
dd9e4e787c test_: added testing for setupRouteValidationMapsV2 2024-05-28 22:05:57 +01:00
Samuel Hawksby-Robinson
889675e42a test_: Modulised filterRoutesV2 to make more testible
This is as per my original draft earlier this week https://github.com/status-im/samyoul-notes/blob/master/analysis/wallet/Router/code/filterRoutes.go
2024-05-28 22:05:57 +01:00
Dario Gabriel Lipicar
717c7df690 feat(wallet)_: added supported chains and recurrent purchase url to onramp providers 2024-05-28 14:51:38 -03:00
Stefan
e06c490ec8 feat(dapps)_: implement basic dApp persistance
Implement required basic CRUD APIs

- Add session to wallet connect
- Delete session used in tests only
- Get active dApps: the order of retrieval is
    based on the first time the DApp was added
    in descending order.

Also add tests to validate the main requirements

Closes: #14615
2024-05-28 19:29:08 +02:00
Stefan
1bd2f119de chore(dapps)_: remove WalletConnect service POC
The clients will all handle separately the wallet connect protocol
and only call static APIs to deal with persistance and blockchain
related operations.

Updates: #14615
2024-05-28 19:29:08 +02:00
Sale Djenic
dd7b3d1af8 fix_: unblocking the router calculation if an approval is required for the gas estimation 2024-05-28 13:55:54 +02:00
Sale Djenic
74b1dfd694 fix_: hop contracts' addresses updated 2024-05-28 13:55:54 +02:00
Sale Djenic
c74931c333 fix_: hop bridge improvements
- handling `null` values in the Hop response
- using data returned from the Hop api when preparing data for estimation and calling `swapAndSend` and `sendToL2`
- estimating gas for bridges implemented in the bridges implementation types, avoiding wrong gas for placing bridge transactions
2024-05-28 13:55:54 +02:00
Ivan Belyakov
4e51b5ba24 feat(wallet)_: more fixes for rpc_limiter_db and chain client, more
tests
2024-05-28 13:44:40 +02:00
Ivan Belyakov
cec11e9313 feat(wallet)_: Fixed account limit period for history to infinite instead of per day
Fix rpc stats doubling.
Add test for infinite limit
2024-05-28 13:44:40 +02:00
Ivan Belyakov
ce773b69ce feat(wallet)_: fixed lint issues. Fixed rpc stats to include tagged
requests
2024-05-28 13:44:40 +02:00
Ivan Belyakov
725fef8f24 feat(wallet)_: implemented storing RPC requests in sql table
Fixed some tests and minor issues
2024-05-28 13:44:40 +02:00
Ivan Belyakov
cdf80b5300 feat(wallet)_: added group tag for RPC chain client
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
2024-05-28 13:44:40 +02:00
Ivan Belyakov
bf7aabfa3e feat(wallet)_: renamed some methods for clarity 2024-05-28 13:44:40 +02:00
Ivan Belyakov
9fe87657d6 feat(wallet)_: added and fixed tests for findBlocksCommand with limiter. 2024-05-28 13:44:40 +02:00
Ivan Belyakov
78f05f60b2 feat(wallet)_: add limiter to rpc.client
Add tests for limiter
Use limiter for transfer history commands
2024-05-28 13:44:40 +02:00
Ivan Belyakov
4a1f751ced feat(wallet)_: Implemented RPC limiter interface
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
2024-05-28 13:44:40 +02:00
Ivan Belyakov
d2343ee03e fix(wallet)_: fixed disconnected event sent for all providers ignoring
type of error
2024-05-28 08:39:36 +02:00
Sale Djenic
534c756bf5 fix_: re-trying http requests up to the predefined max retries
This commit should fix the issue with Cryptocompare and CoinGecko providers down.
Often happens that the first request fails and because of that:
- the Router cannot complete calculation successfully
- some tests are failing
- some users very often see a red banner line saying the providers are down
2024-05-23 16:28:50 +02:00
Sale Djenic
dcef87af3f fix_: token store clearing
This commit fixes issue with having a multiple contract addresses for the same symbols at the same networks.
An issue we had with this was that when we're searching for a token by symbol, always the first one from the
list was returned. That thing may result later in not having enough balance for that token on certain network,
even the user actually has it.
2024-05-23 14:39:46 +02:00
Ivan Belyakov
16171c9dc8 fix(wallet)_: fix crash on cbridge fee calculation 2024-05-20 06:38:35 +02:00
Sale Djenic
4a1a29b6a5 chore_: checks per sending type added (part3) 2024-05-18 00:00:23 +02:00
Sale Djenic
7a016d0859 chore_: router moved to router package (part2) 2024-05-18 00:00:23 +02:00
Sale Djenic
4894808839 chore_: review comments applied (part1) 2024-05-18 00:00:23 +02:00
Sale Djenic
08fef4afde chore_: the router implementation simplification 2024-05-18 00:00:23 +02:00
Sale Djenic
437ad499c8 chore_: SendType moved to another file 2024-05-18 00:00:23 +02:00
Michal Iskierko
c3ab8bd658 feat_: add l1 transaction fee to community token contracts operations
Move estimation funtions to a estimations.go
Compute gas, suggested fees and l1 fee in one status-go call

Issue #14166
2024-05-17 09:57:03 +02:00
Michal Iskierko
574450289c feat_: Move community tokens transaction listening to status-go
Use EventWatcher to catch wallet events.
Handling all community tokens wallet events in communitytokens service (database and messenger operations).
Adding new signal to nim: CommunityTokenTransactionSignal, which is emitted everytime when the event is received.

Issue #4351
2024-05-16 16:18:15 +02:00
Cuteivist
6b680f0722
feat_: Correct opt short names (#5163) 2024-05-16 16:01:30 +02:00
Sale Djenic
c9ee0e04c2 fix_: logic for checking if the route can be established updated 2024-05-15 17:36:28 +02:00
Ivan Belyakov
5be610e653 fix(wallet)_: reduce block range size for eth_getLogs request for
Sepolia
2024-05-15 17:24:06 +02:00
Ivan Belyakov
c0e922f0af fix(wallet)_: fix crash on nil db for statusd if wallet is enabled
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
2024-05-15 10:19:25 +02:00
Cuteivist
838311e902
fix_: Prioritize tokens on eth platform (#5151) 2024-05-15 07:33:12 +02:00
Khushboo-dev-cpp
867cd1f14b
feat(api)_: add api and functionality to get collection website and twitter handle from alchemy (#5007) 2024-05-14 08:58:08 +02:00
Ivan Belyakov
3b6b38a414 chore(wallet)_: Fix tests after wallet api sign and send clean up
- Get rid of InsertTestMultiTransaction function in test utils and
use InsertMultiTransaction method of transaction manager
- Use MultiTransaction type instead of TestMultiTransaction

Added a missing wallet DB migration file for multi transactions
2024-05-09 18:11:58 +02:00
Ivan Belyakov
ed164e4ac5 chore(wallet)_: clean up wallet API send and sign transactions 2024-05-09 18:11:58 +02:00
Dario Gabriel Lipicar
8a0b7ddbb5 feat(wallet)_: switch rarible client to eth sepolia 2024-05-03 08:49:20 -03:00
Ivan Belyakov
12d2a1ac2d fix(wallet)_: fixed crash when bridging and chain id not set 2024-04-26 09:45:40 +02:00
Cuteivist
eb1ed696f6
fix_: Fix timestamo integer cast (#5092) 2024-04-25 14:15:07 +02:00
Siddarth Kumar
d6c4682479
chore_: bump go to 1.20 (#5027)
This commit attempts to upgrade go version to 1.20.12
This commit also removes the following items from lint checks :
* `goconst`
* `structcheck`
* `deadcode`
* `golint`
* `varcheck`

Mobile PR for QA purposes -> https://github.com/status-im/status-mobile/pull/19564
2024-04-18 18:48:02 +02:00
Ivan Belyakov
12deb23360 chore(wallet)_: removed all addresses parameter as redundant.
Instead we check directly if passed addresses are all wallet addresses that
we have in accounts DB.
2024-04-12 14:36:44 +02:00
Ivan Belyakov
a549529637 fix(wallet)_: balances were not updated for accounts not checked during
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.
2024-04-11 19:29:55 +02:00