822 Commits

Author SHA1 Message Date
Andrey Bocharnikov
2dfc9c3594 fix_: add gofakeit creds 2025-01-14 14:06:52 +04:00
Andrey Bocharnikov
f57ff43ed1 feat(config)_: Do not store embedded RPC provider credentials in the DB
* +tests
2025-01-14 14:06:52 +04:00
Andrey Bocharnikov
593cdc0314 chore(config)_: Integration of new RPC Provider configurations
* default_networks.go
  * explicit provider initialization with more granular config (rps limiter, order)
  * token overrides made more flexible, support not only infura and grove
* get_status_node.go
  * override status-proxy auth instead of passing override config to rpc/client.go
* config.go
  * ProviderConfig removed
* client.go
  * Now any provider can be enabled/disabled (if user wants to use only his custom RPC urls)
  * Use bearer auth instead of URL auth
  * Provider order is defined by default_networks.go
2025-01-14 14:06:52 +04:00
Sale Djenic
b91c5fd29c feat(wallet)!: allowing client to set custom values for fees, nonce, gas
Removed properties from `Path` type:
- `MaxFeesPerGas`, based on the sending flow progress appropriate new properties (`TxMaxFeesPerGas`, `ApprovalMaxFeesPerGas`) should be used

Added new properties to `Path` type:
- `RouterInputParamsUuid`, used to identify from which router input params this path was created
- `TxNonce`, used to set nonce for the tx
- `TxMaxFeesPerGas`, used to set max fees per gas for the tx
- `TxEstimatedTime`, used to estimate time for executing the tx
- `ApprovalTxNonce`, used to set nonce for the approval tx
- `ApprovalTxMaxFeesPerGas`, used to set max fees per gas for the approval tx
- `ApprovalTxEstimatedTime`, used to estimate time for executing the approval tx

New request types added:
- `PathTxCustomParams`, used to pass tx custom params from the client
- `PathTxIdentity`, used to uniquely identify path (tx) to which the custom params need to be applied

New endpoints added:
- `SetFeeMode` used to set fee mode (`GasFeeLow`, `GasFeeMedium` or `GasFeeHigh`)
- `SetCustomTxDetails` used to set custom fee mode (`SetCustomTxDetails`), if this mode is set, client needs to provide:
  - Max fees per gas
  - Max priority fee
  - Nonce
  - Gas amount
2025-01-08 17:22:50 +01:00
Igor Sirotin
0f7c26dc9d
test_: skip flaky TestService_IncrementalUpdateMixed (#6205) 2024-12-16 20:33:46 +00:00
Sale Djenic
c27c773c27 chore(wallet)_: from and to chains added to send details
From and to chains added to SendDetails type that can be used on the client side if the sending fails
that we can display appropriate ephemeral notifications, saying sending from which chain has failed.
2024-12-13 15:45:45 +01:00
Igor Sirotin
dfb591874a
fix_: check group error in GetBalancesAtByChain (#6169)
* fix_: check group error in GetBalancesAtByChain

* fix_: properly wrap error

* test_: FetchBalancesForChain check error
2024-12-07 12:10:38 +00:00
Brian Sztamfater
9a94a82fd6
fix!: add forceRefresh parameter to FetchOrGetCachedWalletBalances endpoint (#6160)
Signed-off-by: Brian Sztamfater <brian@status.im>
2024-12-06 09:48:12 -03:00
Brian Sztamfater
34d2dafbd2
fix_: usdt token decimals on tokenstore for arbitrum (#6158)
Signed-off-by: Brian Sztamfater <brian@status.im>
2024-12-03 18:20:26 -03:00
Volodymyr Kozieiev
7a967e1775
chore_: removed GetWalletToken because mobile not use it anymore (#6131) 2024-12-02 11:27:02 +00:00
Dario Gabriel Lipicar
732347cebf fix_: sort activity entries to list approvals before the intended tx 2024-11-29 13:41:20 -03:00
Dario Gabriel Lipicar
7be222a1d2 feat_: add unique key to each activity entry 2024-11-29 13:41:20 -03:00
dlipicar
5a69c686cf
fix_: clear leftover route execution data on new route calculation (#6132) 2024-11-29 09:05:52 -03:00
Andrey Bocharnikov
c635575e8f
fix_: return 0 fee if oracle fails on GetL1Fee (#6138)
* fix_: return 0 fee if oracle fails on GetL1Fee
2024-11-29 00:28:25 +04:00
dlipicar
3466ac2661
feat!: implement new activityV2 filter (#6102)
* feat!: implement new activityV2 filter

* chore_: pr comments
2024-11-25 17:44:39 -03:00
Mohsen
ad28f15531
fix_: hide mercuryo provider (#6100) 2024-11-25 20:35:45 +03:00
Sale Djenic
5fa57c80ec chore(wallet)_: path processor specific const and functions moved to path processors' common package 2024-11-22 13:32:49 +01:00
Sale Djenic
3c911e3fed fix(wallet)_: broken swap and bridge for erc20 tokens fixed 2024-11-22 13:32:49 +01:00
Sale Djenic
575175c1ee feat(wallet)_: enrich status changed and tx update signals' payload with tx route data 2024-11-22 13:32:49 +01:00
Sale Djenic
bacd132a2b chore(wallet)_: route execution related types moved to services/wallet/wallettypes 2024-11-22 13:32:49 +01:00
Sale Djenic
e354844044 chore(wallet)_: transactions/types.go moved to services/wallet/wallettypes 2024-11-22 13:32:49 +01:00
Sale Djenic
874da40150 chore(wallet)_: send type package simplification
- path processor constants moved to wallet constants
- FetchPrices and FindToken functions moved from send type package to router package
2024-11-22 13:32:49 +01:00
Sale Djenic
f80042c5cb chore(wallet)_: ens resolver identified under ens api
New EnsResolver type identified and will be responsible for network calls,
while ens api will use it (until mobile app switches to a new sending flow) and
continue managing other (db) interactions.
2024-11-22 13:32:49 +01:00
Andrey Bocharnikov
f754315023
chore(wallet)_: returns last timestamps of successful GetWalletToken updates (#5988)
* chore(wallet)_: returns last timestamps of successful GetWalletToken updates

* fix_: return timestamp instead of time

* address feedback from the PR
2024-11-18 22:27:52 +04:00
Sale Djenic
4fc9361f12 fix(wallet)_: broken swap and bridge for erc20 tokens fixed 2024-11-08 13:51:11 +01:00
Dario Gabriel Lipicar
1940d26c7f chore_: adapt route db to new transaction code 2024-11-08 09:03:33 -03:00
Dario Gabriel Lipicar
414e08b283 chore_: rework transaction code to make it more reusable 2024-11-08 09:03:33 -03:00
Dario Gabriel Lipicar
cfcef92e64 feat(wallet)_: store route execution data to db 2024-11-08 09:03:33 -03:00
Sale Djenic
b329b158c8 fix_: bridge tx improvements
- increase gas estimation factor increased
- amount parameter added to the key composition, that makes it unique
2024-11-04 10:00:47 +01:00
saledjenic
c040cc753e chore(wallet)_: router tx improvements (#6020)
* chore(wallet)_: stickers service removed from the router, not needed after recent changes

* chore(wallet)_: missed check for error added to few processors
2024-11-01 08:45:53 -03:00
Dario Gabriel Lipicar
89104b3027 fix(wallet)_: properly use amount in erc1155 transfers 2024-11-01 08:45:53 -03:00
Khushboo Mehta
c4bb706e63 feat(addAmountOutInSentTransactions)_: Add amount out in NewRouterSentTransaction function 2024-11-01 12:29:22 +01:00
Dario Gabriel Lipicar
5d4838a752 chore_: remove detection of external swaps and bridges 2024-10-31 08:52:54 +01:00
osmaczko
2ced83abb7
chore_: replace geth logger with zap logger (#5962)
closes: #6002
2024-10-28 20:54:17 +00:00
Dario Gabriel Lipicar
d77d243dd6 chore(wallet)_: move route execution code to separate module 2024-10-28 14:24:37 +01:00
Igor Sirotin
679391999f
feat_: LogOnPanic linter (#5969)
* feat_: LogOnPanic linter

* fix_: add missing defer LogOnPanic

* chore_: make vendor

* fix_: tests, address pr comments

* fix_: address pr comments
2024-10-23 21:33:05 +01:00
Sale Djenic
3179532b64 chore_: completely remove goerli from the code 2024-10-21 17:30:51 +02:00
Sale Djenic
18a9072435 chore_: providers re-ordered
A new order of using providers is:
1. StatusProxy - Node Fleet
2. StatusProxy - Infura
3. Direct Infura
4. StatusProxy - Grove
5. Direct Grove
2024-10-21 17:30:51 +02:00
dlipicar
7f8fd2c1cf
chore(wallet)_: update uniswap token list (#5953)
* chore(wallet)_: update uniswap token list

* chore_: renamed deprecated token
2024-10-21 08:58:08 -03:00
dlipicar
6baf1f78aa
fix(wallet)_: limit max parameter length in cryptocompare price fetches (#5957)
* fix(wallet)_: limit max parameter length in cryptocompare price fetches

* chore(wallet)_: separate package for network-dependant unit tests
2024-10-21 08:57:28 -03:00
Andrey Bocharnikov
fadce938e4
feat_: RPC providers detailed statuses #5923 (#5924)
* feat(wallet)_: Send a new event 'wallet-blockchain-health-changed' #5923
2024-10-15 19:59:17 +04:00
Andrey Bocharnikov
86cd41d04e
chore(wallet)_: remove unused upstream client (#5934)
* chore(wallet)_: remove unused upstream client

fixes #5933
2024-10-11 21:01:14 +04:00
Sale Djenic
6ed10bce81 fix_: native token not found error when generating a new route issue fixed
This commit fixes `native token not found` issue that occurs only when the input params
of an already successfully generated route for a fast chain (refers to a chain that generates
new block very fast, like optimism, arbitrum) are updated.

The reason of the issue was that active route remains the same until the resolving of a new route
for updated input parameters gets generated, for fast chains that was enough time to generate a new
block and send fees update for the previously active route. This commit fixes that possibility by
aborting updates in a better way.
2024-10-11 18:25:01 +02:00
Sale Djenic
0017567ed4 fix_: packing data for ens release path processor fixed 2024-10-08 21:49:35 +02:00
Sale Djenic
55bad8fd7b fix_: zero value update to be a value, not a function pointer 2024-10-07 17:24:00 +02:00
Igor Sirotin
c1dd9397f7
refactor_: remove generated files from source control (#5878)
* fix_: gitignore generated files

* chore_: delete generated files

* fix_: update go generate instructions

* feat(Makefile)_: clean-generated-files target

* feat(Makefile)_: `generate` target

* fix(Makefile)_: dependent generate target

* ci_: run generate, update docker file deps

* fix(Makefile)_: remove `clean-generated-files` target

* fix(Makefile)_: simpler GO_GENERATE_CMD arg

* fix_: temp workspace GO_GENERATE_FAST_DIR
2024-10-03 20:59:44 +01:00
Sale Djenic
04784d18a0 fix_: canceling route generation before the route gets generated doesn't allow subscribing for events 2024-10-02 17:33:00 +02:00
Anton
107e2cb8da test_: added transaction from route test 2024-10-01 14:30:33 +02:00
Sale Djenic
28506bcd17 chore_: improvements of the sending route generated by the router process
This commit simplifies the sending process of the best route suggested by the router.
It also makes the sending process the same for accounts (key pairs) migrated to a keycard
and those stored locally in local keystore files.

Deprecated endpoints:
- `CreateMultiTransaction`
- `ProceedWithTransactionsSignatures`

Deprecated signal:
- `wallet.sign.transactions`

New endpoints:
- `BuildTransactionsFromRoute`
- `SendRouterTransactionsWithSignatures`

The flow for sending the best router suggested by the router:
- call `BuildTransactionsFromRoute`
- wait for the `wallet.router.sign-transactions` signal
- sign received hashes using `SignMessage` call or sign on keycard
- call `SendRouterTransactionsWithSignatures` with the signatures of signed hashes from the previous step
- `wallet.router.transactions-sent` signal will be sent after transactions are sent or if an error occurs

New signals:
- `wallet.router.sending-transactions-started` // notifies client that the sending transactions process started
- `wallet.router.sign-transactions` // notifies client about the list of transactions that need to be signed
- `wallet.router.transactions-sent` // notifies client about transactions that are sent
- `wallet.transaction.status-changed` // notifies about status of sent transactions
2024-10-01 14:30:33 +02:00
Sale Djenic
1128598b03 chore_: build transaction v2 function added to processors 2024-10-01 14:30:33 +02:00