Skip to content
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

Clear Button not visible on Borrow Transaction Modal #1050

Closed
0x4Graham opened this issue Aug 22, 2022 · 3 comments · Fixed by #1058
Closed

Clear Button not visible on Borrow Transaction Modal #1050

0x4Graham opened this issue Aug 22, 2022 · 3 comments · Fixed by #1058
Labels
bug Something isn't working

Comments

@0x4Graham
Copy link
Contributor

Describe the bug
The "X" icon is not in the borrow transaction modal. This will come from closed change #836

image

To Reproduce
Steps to reproduce the behavior:

  1. Go to asset
  2. Select Borrow
  3. Enter amount to borrow
  4. No "x" button to clear the amount is visible,

Expected behavior
After entering a value, the "X" button should be visible to clear the input

@MatthewCYLau can you please investigate.

@0x4Graham 0x4Graham added the bug Something isn't working label Aug 22, 2022
@MatthewCYLau
Copy link
Contributor

👋 @grothem @defispartan could I seek you guidance here 🙏

  • Running the latest code from my local machine, I can definitely see the clear button rendering from the AssetInput component inside of the BorrowModalContent component👇
    image

  • Inside of AssetInput component, the clear button renders when value !== '' i.e. value is present

  • The bug screenshot above is from the RepayModalContent component

  • And so, I wonder if I've missed anything to how RepayModalContent component passes amount when rendering AssetInput which would result in the clear button not being rendered

Thank you! 🙏

@grothem
Copy link
Collaborator

grothem commented Aug 22, 2022

Hey @MatthewCYLau, I didn't catch this the first time around, but if the length of the asset list is greater than 1, then the clear button won't show. You can see this if you open the repay modal, and you have more than 1 asset in your wallet that you are able to repay with.

I think another thing that should be added is to not render the IconButton if disabled is true.

@MatthewCYLau
Copy link
Contributor

Raised a small fix PR 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants