-
Notifications
You must be signed in to change notification settings - Fork 148
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
fix: runes formatted balance, closes #5293 #5313
Conversation
cc @brandonmarshall-tm this should be correct now? |
What is the issue bc that was just released? Are they not correct? What are you seeing? |
@brandonmarshall-tm sorry, I think I edited your comment by mistake. Pretty confident I did a quote reply thou 🤷♀️ |
Added a fix here for: #4408 (comment) |
6351442
to
79d94e9
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.
🚀
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 for fixing Fara.
Some spring cleaning here that'd be great if not too much work: the issue with formatbalance not accepting Money.
Also, please take the time to write a test that ensures we display Rune and BRC 20 balances correctly.
const balanceAsString = convertAmountToBaseUnit(rune.balance).toString(); | ||
const formattedBalance = formatBalance(balanceAsString); |
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.
This is problematic, why doesn't formatBalance
accept Money
?
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.
Good point, I can change 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.
Really not sure I understand needing to change this when we need the string to display at this point? Why keep it as Money
just to display it?
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.
Questioning only bc balanceAsString
is used in more than one place and is done this way in several components to handle the formatting w/ tooltip.
79d94e9
to
4a67a60
Compare
Added a new issue to circle back to adding integrations tests for our asset list / token display. We need to add several new tokens to our test wallet as part of this effort. #5318 |
I think you're good @fbwoolf! These numbers and prices are looking much more accurate to me. Prices can vary widly across exchanges (second screenshot), so depending on where BIS or Coingecko are pulling from, you might see some pretty big swings. But before it was like 10x the amount so this is much more accurate than before. |
decimals and suffixes looking good now, this is going in the next release (after 6.36.0 that just went live), right? |
This PR fixes a UI bug when we formatted the runes (and BRC-20) token balance. We needed to convert the amount to the base unit first, my bad.