Commit Graph

13 Commits

Author SHA1 Message Date
Dario Gabriel Lipicar 0809c0b156 feat(wallet)_: upgrade paraswap client to v6.2 2024-08-28 12:53:09 -03:00
Sale Djenic 9b9a91f654 chore_: map insufficient funds error
This commit maps this kind of errors
`status-proxy-0.error: failed with 50011064 gas: insufficient funds for gas * price + value: address 0x4eeB09cf0076F840b38511D808464eE48efD4305 have 0 want 10000000000000`
to this form:
`status-proxy-0.error: failed with 50011064 gas: insufficient funds for gas * price + value: address 0x4eeB09cf0076F840b38511D808464eE48efD4305`

which means that we don't want to display to a user details of how much they have and how much is needed for fees, cause those data are very often
misleading, referring mostly to "how much user has".

New error added in case there is no positive balances across all enabled chains.
2024-08-28 08:23:18 +02:00
saledjenic 79b1c547d1
Improvements on resolving nonce (#5658)
* 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-12 08:07:32 -04:00
dlipicar d7fcbd3444
feat(wallet)_: handle paraswap price impact error (#5622) 2024-08-07 23:33:44 +01:00
Dario Gabriel Lipicar 7c4b43b4d9 feat(wallet)_: incorporate partner fees for L1 paraswap swaps 2024-07-23 15:27:43 -03:00
Dario Gabriel Lipicar afc6e7bcb9 feat(router)_: return processor error when no routes are found 2024-07-19 17:44:08 +02:00
Dario Gabriel Lipicar 4d7c2683f5 fix_: fix swap in routerV2 2024-07-01 15:07:17 +02:00
Sale Djenic 1cdcc0dcc2 chore_: tests for router candidates added 2024-06-26 11:02:13 +01:00
Sale Djenic 68464d949c chore_: calculating multi tx candidates improvements
- router logic splitted into two more logical functions
- locked amount validation improved
- hop and swap processors cached data kept per from/to chain and from/to token
- Clear function which clears the local cache is added
- process of evaluating `amountToSend` if more than a single network is locked is improved
- optimized params for require approval function
2024-06-26 11:02:13 +01:00
Dario Gabriel Lipicar 7b38a5b6bd fix_: make use of slippage percentage parameter (#15096) 2024-06-17 09:51:29 -03:00
Sale Djenic 462013520f chore_: swap via paraswap improvements 2024-06-14 15:44:38 +02:00
Sale Djenic 39a7d41135 chore_: making contract type param internal to hop bridge processor type 2024-06-10 16:38:38 +02:00
Sale Djenic 07cf6cd52d chore_: `Bridge` interface renamed to `PathProcessor` interface and necessary changes applied due to that change 2024-06-07 15:50:38 +02:00