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

πŸ› fix(llm) account item wrong balance #9134

Merged
merged 1 commit into from
Feb 7, 2025
Merged

Conversation

LucasWerey
Copy link
Contributor

@LucasWerey LucasWerey commented Feb 6, 2025

βœ… Checklist

  • npx changeset was attached.
  • Covered by automatic tests.
  • Impact of the changes:
    • accountItem

πŸ“ Description

Spendable balance was used instead of balance. User wouldn't see the all balance (including staked)
Test added to ensure we well display the balance and not the spendable balance

❓ Context


🧐 Checklist for the PR Reviewers

  • The code aligns with the requirements described in the linked JIRA or GitHub issue.
  • The PR description clearly documents the changes made and explains any technical trade-offs or design decisions.
  • There are no undocumented trade-offs, technical debt, or maintainability issues.
  • The PR has been tested thoroughly, and any potential edge cases have been considered and handled.
  • Any new dependencies have been justified and documented.
  • Performance considerations have been taken into account. (changes have been profiled or benchmarked if necessary)

@LucasWerey LucasWerey requested a review from a team as a code owner February 6, 2025 13:06
Copy link

vercel bot commented Feb 6, 2025

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

4 Skipped Deployments
Name Status Preview Comments Updated (UTC)
ledger-live-github-bot ⬜️ Ignored (Inspect) Visit Preview Feb 7, 2025 1:44pm
native-ui-storybook ⬜️ Ignored (Inspect) Visit Preview Feb 7, 2025 1:44pm
react-ui-storybook ⬜️ Ignored (Inspect) Visit Preview Feb 7, 2025 1:44pm
web-tools ⬜️ Ignored (Inspect) Visit Preview Feb 7, 2025 1:44pm

@live-github-bot live-github-bot bot added the mobile Has changes in LLM label Feb 6, 2025
@LucasWerey LucasWerey force-pushed the fix/LIVE-16846 branch 2 times, most recently from 4de77b1 to a9e3f62 Compare February 6, 2025 13:14
@LucasWerey LucasWerey enabled auto-merge February 6, 2025 13:52
@@ -319,7 +319,7 @@ const SelectableAccount = ({
padding="8px"
columnGap={8}
>
<AccountItem account={account as Account} balance={account.spendableBalance} />
<AccountItem account={account as Account} balance={account.balance} />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we sure we want that?

Because into those flows, the aim is to send/receive, we want what we currently is available, not staking value for exemple no?

Copy link
Contributor Author

@LucasWerey LucasWerey Feb 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've switch for useFullBalance ? account.balance : account.spendableBalance because today with the ff off we use accountCar with this logic => <CurrencyUnitValue showCode unit={unit} value={useFullBalance ? account.balance : getAccountSpendableBalance(account)} />

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will need to check again my bad I am not sure about what we should use because the currencyUnitValue as not the same behaviour as Countervalue component inside AccountCard for the balance

Copy link
Contributor Author

@LucasWerey LucasWerey Feb 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok so today in the send flow we display the all balance and not only the spendable balance. So I think we can keep this <CurrencyUnitValue showCode unit={unit} value={useFullBalance ? account.balance : getAccountSpendableBalance(account)} /> wdyt ? Also this component is used for the addAccount it's another list for send/receive so should be good

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok with final thought

@LucasWerey LucasWerey force-pushed the fix/LIVE-16846 branch 3 times, most recently from 22d3aac to 0a7ef38 Compare February 7, 2025 13:17
@LucasWerey LucasWerey added this pull request to the merge queue Feb 7, 2025
Merged via the queue into develop with commit fcbf8b6 Feb 7, 2025
43 of 47 checks passed
@LucasWerey LucasWerey deleted the fix/LIVE-16846 branch February 7, 2025 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mobile Has changes in LLM
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants