-
Notifications
You must be signed in to change notification settings - Fork 3
Implement new Pod Market UI #303
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
base: main
Are you sure you want to change the base?
Implement new Pod Market UI #303
Conversation
Fix effective temperature decimal to 2
Add success state after transaction
👷 Deploy request for pintomoney pending review.Visit the deploys page to approve it
|
src/components/ComboInputField.tsx
Outdated
| baseBalance = tokenAndBalanceMap.get(selectedToken) ?? TokenValue.ZERO; | ||
| } else if (farmerTokenBalance) { | ||
| switch (balanceFrom) { | ||
| case FarmFromMode.EXTERNAL: | ||
| baseBalance = farmerTokenBalance.external || TokenValue.ZERO; | ||
| break; | ||
| case FarmFromMode.INTERNAL: | ||
| baseBalance = farmerTokenBalance.internal || TokenValue.ZERO; | ||
| break; | ||
| default: | ||
| baseBalance = farmerTokenBalance.total || TokenValue.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.
What does this and the change on lines 210-219 do and why was it necessary?
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.
Yes. I added this because the buy/fill -> get quote flow was behaving incorrectly.
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.
@burr-nim is this resolved?
This pull request introduces several improvements and fixes to the Pod Market pages and components, focusing on enhancing user experience, clarifying navigation, and improving component flexibility. The most significant changes include a refactor of the market route and tab logic, improved balance/allowance handling, and the addition of a reusable smart approval button. There are also UI improvements for market descriptions and a more flexible accordion component.
Market route and tab logic improvements:
mode(buy/sell) andid(create/fill) parameters, ensuring consistent navigation and correct rendering of components likeCreateOrder,FillListing,CreateListing, andFillOrder. This also updates navigation from charts and tables to use query parameters instead of path segments. [1] [2] [3] [4] [5] [6]Balance and allowance handling:
ComboInputFieldto correctly determine the maximum and displayable token amounts, especially when acustomMaxAmountis provided, ensuring that UI reflects the user's true available balance and not just the allowed amount. [1] [2]New reusable components:
SmartApprovalButtoncomponent that automatically determines if token approval is needed (including support for both ERC20 and protocol-specific allowances), manages approval state, and provides user feedback during the approval process.UI/UX improvements:
ReadMoreAccordioncomponent to support aninlinemode, allowing for more flexible placement and styling of expandable content in the UI. [1] [2]