Skip to content

Commit

Permalink
Merge pull request #796 from liquity/fix-amount-default-format
Browse files Browse the repository at this point in the history
Fix Amount default format
  • Loading branch information
bpierre authored Jan 30, 2025
2 parents f2eed7b + b9f6181 commit 9a4e0a1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions frontend/app/src/comps/Amount/Amount.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,12 @@ export function Amount({
if (percentage && !suffix) {
suffix = "%";
}
if (percentage && !format) {
format = "pct2z";
if (format === undefined) {
if (percentage) {
format = "pct2z";
} else {
format = "2z";
}
}

const showFallback = value === null || value === undefined;
Expand Down

0 comments on commit 9a4e0a1

Please sign in to comment.