Conversation
|
Crate versions that have not been updated:
Crate versions that have been updated:
Runtime version has not been increased. |
Co-authored-by: Martin Hloska <martin.hloska@gmail.com>
martinfridrich
left a comment
There was a problem hiding this comment.
Do we have test where we trade H2O for HDX?
good catch, added both integration and unit tests. We dont do any special handling here, it is a sort of "extra" work as we route from HDX to HDX pool, but the result would be the same we would skip rerouting for such trades. We choose this for code simplicity. |
|
Quick benchmark at commit 29a8757 has been executed successfully. |
| // Snapshot contains the storage of EVM, AssetRegistry, Timestamp, Omnipool and Tokens pallets | ||
| hydra_live_ext(PATH_TO_SNAPSHOT).execute_with(|| { | ||
| // Arrange | ||
| deposit_hdx_to_protocol_account(); |
There was a problem hiding this comment.
why this is here in this PR ?
| let hub_reserve_delta = *state_changes.asset.delta_hub_reserve; | ||
| state_changes.asset.delta_hub_reserve = BalanceUpdate::Increase(Balance::zero()); |
There was a problem hiding this comment.
one additonal check i would add here
because here - we basically loose the information that the hub reserve actually Increases.
i would ensure that the delta_hub_reserve is actually Increase variant. and fail if not.
| let hub_reserve_delta = *state_changes.asset.delta_hub_reserve; | ||
| state_changes.asset.delta_hub_reserve = BalanceUpdate::Increase(Balance::zero()); |
There was a problem hiding this comment.
same here - ensure that it is increase.
|
|
||
| //We need to split in multiple sells to avoid max in ratio error | ||
| for _ in 1..=3 { | ||
| for _ in 1..=2 { |
implements #1336