Skip to content

Commit

Permalink
Merge pull request #6858 from LedgerHQ/fix/LIVE-8996
Browse files Browse the repository at this point in the history
fix(lld): remove unnecessary information when the balance has not cha…
  • Loading branch information
LucasWerey committed May 14, 2024
2 parents 77012ea + 50473ce commit 679bf73
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 11 deletions.
5 changes: 5 additions & 0 deletions .changeset/late-vans-lick.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"ledger-live-desktop": patch
---

Remove 0 (currency) when balance hasn't change in the selected time range
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,21 @@ export function BalanceDiff({ valueChange, unit, isAvailable, ...boxProps }: Pro
withIcon
/>
)}
<FormattedVal
unit={unit}
val={valueChange.value}
prefix={valueChange.percentage ? " (" : undefined}
suffix={valueChange.percentage ? ")" : undefined}
withIcon={!valueChange.percentage}
alwaysShowSign={!!valueChange.percentage}
showCode
animateTicker
inline
/>
{valueChange.value === 0 ? (
<Text color={"palette.text.shade100"}>{"-"}</Text>
) : (
<FormattedVal
unit={unit}
val={valueChange.value}
prefix={valueChange.percentage ? " (" : undefined}
suffix={valueChange.percentage ? ")" : undefined}
withIcon={!valueChange.percentage}
alwaysShowSign={!!valueChange.percentage}
showCode
animateTicker
inline
/>
)}
</Box>
</Box>
);
Expand Down

0 comments on commit 679bf73

Please sign in to comment.