833 Commits

Author SHA1 Message Date
Sale Djenic
c4dca62c4b chore(wallet)_: use proxy instead of OVM_GasPriceOracle contract for estimating l1 fee
- A new contract is used for estimating L1 fee.
- New contract's addresses are known only for Optimims and Sepolia Optimimsm.
- Old contract and addresses per chain are kept so far, but not in use anymore.

Comparing to other wallets, seems L1 fee is added to the total fee only for the Optimims chain.
So we're doing the same in this commit, disabling L1 fees for other than the Optimism.
2025-01-31 21:11:27 +01:00
Sale Djenic
9957dd330c chore(wallet)_: adjusting fees calculation to get closer to MM values 2025-01-31 21:11:27 +01:00
Sale Djenic
55268de845 chore(wallet)_: include l1 fees info (for the tx and approval) in the response
While ago we've disabled l1 info cause the estimated L1 fees were significantly higher than they should have been
(if I remember well, the L1 fees were about 1000 times higher than they should have been).

From this point, that wrong value might be coming from unreliable pokt calls/values, these changes bring them back.
2025-01-31 21:11:27 +01:00
Andrey Bocharnikov
17adba689e
chore(config)_: integrate new rpc providers configs (#6178)
* 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

* Do not store embedded RPC provider credentials in the DB

* FIXME:  TestLoginAndMigrationsStillWorkWithExistingDesktopUser uses deprecated test data (with non-existing related_chain_id in networks table)
2025-01-31 18:12:07 +04:00
Brian Sztamfater
214cac9fa5
fix_: check if bridge for token exists in ToChainId before returning contract address for FromChainId (#6272)
Signed-off-by: Brian Sztamfater <brian@status.im>
2025-01-30 18:55:15 -03:00
Sale Djenic
a44d4143b4 chore(communities)!: rename communitytokensv2 package to communitytokens
This is a breaking change which renames `communitytokensv2` package to `communitytokens`.
2025-01-30 14:56:13 +01:00
Sale Djenic
07a9d9aa2f chore(communities)!: remove communitytokens package
This is a breaking change which removes `communitytokens` package.

This commit removes old `communitytokens` package, cause previously added `communitytokensv2` package,
which is in use now, will be renamed to `communitytokens` in next commit.
2025-01-30 14:56:13 +01:00
Sale Djenic
bf1ef87cc0 chore(wallet-community)_: move community transactions to the wallet router
- new file `contracts/community-tokens/contracts.go` added to unify contracts creation

- the following community related path processors added:
- `CommunityBurnProcessor`
- `CommunityDeployAssetsProcessor`
- `CommunityDeployCollectiblesProcessor`
- `CommunityDeployOwnerTokenProcessor`
- `CommunityMintTokensProcessor`
- `CommunityRemoteBurnProcessor`
- `CommunitySetSignerPubKeyProcessor`

- `SendType` extended with appropriate options

- added endpoints to duplicated `communitytokens` api:
- `StoreDeployedCollectibles`
- `StoreDeployedOwnerToken`
- `StoreDeployedAssets`

- removed endpoints from duplicated `communitytokens` api:
- `DeployCollectibles`
- `DeployOwnerToken`
- `ReTrackOwnerTokenDeploymentTransaction`
- `DeployAssets`
- `DeployCollectiblesEstimate`
- `DeployAssetsEstimate`
- `DeployOwnerTokenEstimate`
- `EstimateMintTokens`
- `EstimateRemoteBurn`
- `EstimateBurn`
- `EstimateSetSignerPubKey`
- `NewOwnerTokenInstance`
- `NewCommunityTokenDeployerInstance`
- `NewCommunityOwnerTokenRegistryInstance`
- `NewCollectiblesInstance`
- `NewAssetsInstance`
- `MintTokens`
- `RemoteBurn`
- `GetCollectiblesContractInstance`
- `GetAssetContractInstance`
- `Burn`
- `SetSignerPubKey`

- `Path` type extended with new property:
- `UsedContractAddress` - an address of the contract that will be used for the transaction
2025-01-30 14:56:13 +01:00
Sale Djenic
d5517f8f5c chore(wallet)_: community deployment related types moved to wallet requests package
`DeploymentParameters` and `DeploymentDetails` types moved from `communitytokens` package
to `requests` of the wallet service.
2025-01-30 14:56:13 +01:00
Lungu Cristian
e71fdbc63c
fix(suggested-fees)_: crash caused by null GasPrice (#6274)
* fix_: suggested fees crash caused by null GasPrice

* fix_: tests

---------

Co-authored-by: Andrey Bocharnikov <andrey.bocharnikov@gmail.com>
2025-01-24 16:10:22 +02:00
Brian Sztamfater
27ad41ba8f
feat_: integrate base chain (#6228)
* feat_: integrate base chain

Signed-off-by: Brian Sztamfater <brian@status.im>
Co-authored-by: Dario Gabriel Lipicar <dario@status.im>
2025-01-20 12:12:11 -03:00
Sale Djenic
bb7b1f246d chore(wallet)_: unused getBaseFee function removed from fee manager 2025-01-17 12:04:06 +01:00
Sale Djenic
90f4740add feat(wallet)_: added suggested min and max priority fee and current base fee for the path
- `Path` type extended with the following fields:
  - `SuggestedMinPriorityFee`, suggested min priority fee by the network
  - `SuggestedMaxPriorityFee`, suggested max priority fee by the network
  - `CurrentBaseFee`, current network base fee

- The following wallet api endpoints marked as deprecated:
  - `GetSuggestedFees`
  - `GetTransactionEstimatedTime`
2025-01-17 12:04:06 +01:00
Dario Gabriel Lipicar
4a5a3387af fix_: guard against malformed tokenID in router 2025-01-14 09:50:36 -03: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