Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/tender-frogs-change.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"thirdweb": patch
---

Fix PayEmbed fiat values to 2 decimal places
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ export function FiatValue(
}

return cryptoToFiatQuery.data?.result ? (
<Text {...props}>${formatNumber(cryptoToFiatQuery.data.result, 2)}</Text>
<Text {...props}>
${formatNumber(cryptoToFiatQuery.data.result, 2).toFixed(2)}
Copy link
Member

Choose a reason for hiding this comment

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

Doesn't the 2 param inside formatNumber already does it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It doesn't, format number just rounds it but leaves off trailing zeros (it returns a number)

Copy link
Member

Choose a reason for hiding this comment

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

Ah I see

</Text>
) : null;
}
Loading