-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove duplicate dex_router state #803
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Went through it. Looks good.
Can merge once there is another review.
6ae0150
to
88dfbc4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
@@ -57,7 +56,7 @@ pub(crate) fn execute_any_deposit( | |||
} | |||
|
|||
let twap_price = get_twap_price(deps.storage, &deps.querier, &env, 24u64)?; | |||
let (token_in, out_denom, remainder, price) = if !deposit_info.base_refund.amount.is_zero() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: why does a pr about removing dex router change remainder here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also not sure why we are changing this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see long explanation below
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense now, to add to the confusion github's view cut this weirdly to make me think this was part of exact_deposit 😓
88dfbc4
to
db77ba0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about why we have certain changes to deposit.rs other than that lgtm and ready to merge once explained or sorted
:D yes, sry for the confusion, probably should have left a comment of all the things I changed to make this actually work as that was puzzling for me too. So here is roughly why the unexpected changes are here.
tldr: test-tube setup was bad and missing a bug, so had to fix a lot to make things actually work can do a first fix of the current code and then rebase this so it just contains the removal of the DEX_ROUTER tomorrow |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, makes sense and lgtm!
@@ -57,7 +56,7 @@ pub(crate) fn execute_any_deposit( | |||
} | |||
|
|||
let twap_price = get_twap_price(deps.storage, &deps.querier, &env, 24u64)?; | |||
let (token_in, out_denom, remainder, price) = if !deposit_info.base_refund.amount.is_zero() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense now, to add to the confusion github's view cut this weirdly to make me think this was part of exact_deposit 😓
I am afraid that this still is not good enough. It will pick up idle funds incorrectly and attribute it to the current deposit. So need to fix that first. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dmed
db77ba0
to
d989136
Compare
d989136
to
ed68c61
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good now after the adjustments
No description provided.