-
Notifications
You must be signed in to change notification settings - Fork 13
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
Add multi-callee support to the frontend #498
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.
- Storybook lgtm ✔️
- Checks are failing
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.
Component approved
Looking at the screenshot:
Why |
Done.
I think it's related to storybook and the pending refactoring of the core, because these values are assigned directly and randomly through helper functions.
Nope. Just checked them all. |
frontend/components/auction/collateral/MarketPriceSelection.vue
Outdated
Show resolved
Hide resolved
frontend/components/auction/collateral/MarketPriceSelection.vue
Outdated
Show resolved
Hide resolved
<span v-else class="opacity-50">Unknown</span> | ||
</div> | ||
</div> | ||
<MarketPriceSelection :auction-transaction="auctionTransaction" :market-id.sync="marketId" /> |
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.
As you raised in the issue and I answered: the values underneath this row is dependent on the selected marketId
. They all now taken from the marketData[marketId]
object: so that switching marketId
displays new values
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.
Exactly. But the calculation of the market difference, profitability, etc. happens in the core. So, shouldn't that be implemented there by using the marketId
that is sent to the store?
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.
OK, nvm. For some reason, I've just noticed the comment you made last week 😅.
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.
Maybe storybook related but to re-iterate on point @valiafetisov mentioned in prev comment
- when expanding component for the first time both selectable callees have "Select" and the uni v3 which is actually selected is not marked accordingly ("Selected")
- Why is the uni v3 callee the default selection (see screenshot below) if the 1inch callee has a better marketUnitPrice?
It's not marked because as long as the user hasn't selected any specific callee the For reference:
— from issue description
I picked an arbitrary value for storybook, but I can implement a function that picks the best unit price there as well. |
Thanks for clarification! Makes sense and no need to write a dedicated function for storybook. |
Currently, I get this error in the browser console whenever I select a callee, which is self-explanatory and reflects the issue we are having:
@LukSteib, regarding the problem you mentioned with the route. The collateral configuration of wstETH on Curve V3 has an empty route array, i.e. it gets swapped directly into DAI without passing by ETH. |
I think the problem is not related to
Get the same error which prevents switching the callee via the UI. This problem however is blocking and I won't approve this PR as I don't want to merge and release a broken component. |
Figured it out! |
frontend/components/auction/collateral/MarketPriceSelection.vue
Outdated
Show resolved
Hide resolved
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.
- (note that it should not block if we cannot figure out easily): On initial load of the transaction page none of the callees is indicated as "Selected". Only after first selecting one of them the indicator holds (see s1 below)
- One more thing that makes me wonder: In the example below (
ETH-A
simulation). We preselect univ2 but a higher price is more favorable in this case. Similar: comparing gross and net profit we indicate that uniswapv3 would yield overall better outcome for the user. Just trying to understand how this is possible. (see comparison in s2 below)
This was answered above |
Issue description doesn't imply that no price should be set as selected in the UI. I think we still need to indicate which one is currently "best" or "selected" |
frontend/components/auction/collateral/MarketPriceSelection.vue
Outdated
Show resolved
Hide resolved
Co-authored-by: valia fetisov <[email protected]>
MarketPriceSelection
component and stories
Closes #496.
Checklist:
#
)