Closed otsalex closed 3 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
sommelier-web | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jun 27, 2024 7:15am |
The changes in the src/utils/formatCurrency.ts
file aim to improve code consistency and precision handling. The update includes shifting from single quotes to double quotes for the formatUnits
import and introducing a new function, floorToPrecision
, to manage precision formatting within the toEther
function.
File | Change Summary |
---|---|
src/utils/formatCurrency.ts | Switched from single quotes to double quotes for imports. Added floorToPrecision to handle number precision formatting within toEther function. |
sequenceDiagram
participant User
participant formatCurrency.ts
participant viem
User->>formatCurrency.ts: Call toEther(amount)
formatCurrency.ts->>viem: Import formatUnits
formatCurrency.ts->>floorToPrecision: Format amount with precision
floorToPrecision-->>formatCurrency.ts: Return formatted amount
formatCurrency.ts-->>User: Return formatted Ether amount
🐇✨ In the code where Ether flows,
Precision's touch now softly shows.
Quotes aligned with double light,
Formatting numbers just right.
In the dance of code, so neat,
Every change makes it complete. 🌟
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Summary by CodeRabbit