-
Notifications
You must be signed in to change notification settings - Fork 8
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
Replace formatAmountWithDecimals with formatUnits of viem #371
base: main
Are you sure you want to change the base?
Conversation
@neverm25 is attempting to deploy a commit to the squirrellabs Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughWalkthroughThe changes involve updates to the Changes
Tip We have updated our review workflow to use the Anthropic's Claude family of models. Please share any feedback in the discussion post on our Discord. 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? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- src/components/Claim/Link/Initial.view.tsx (5 hunks)
- src/components/Claim/Link/Onchain/Confirm.view.tsx (4 hunks)
- src/utils/general.utils.ts (1 hunks)
Additional comments not posted (9)
src/components/Claim/Link/Onchain/Confirm.view.tsx (4)
16-16
: LGTM!The code changes are approved.
61-61
: LGTM!The code changes are approved.
69-69
: LGTM!The code changes are approved.
76-76
: LGTM!The code changes are approved.
Also applies to: 152-157, 173-178
src/utils/general.utils.ts (1)
Line range hint
1-1
: Verify the removal offormatAmountWithDecimals
function.The
formatAmountWithDecimals
function has been removed from this file. This indicates a shift in functionality and potentially simplifies the module by eliminating a utility that may no longer be necessary or used.Please confirm that the removal is intentional and the function is no longer used in the codebase. You can use the following script to search for any remaining usages of the function:
Verification successful
Removal of
formatAmountWithDecimals
function verified.The
formatAmountWithDecimals
function is not used anywhere in the codebase, confirming that its removal does not impact other parts of the application. This change likely simplifies the module by eliminating an unused utility.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Search for any usages of the `formatAmountWithDecimals` function in the codebase. # Test: Search for the function usage. Expect: No results found. rg --type typescript --type javascript 'formatAmountWithDecimals'Length of output: 100
Script:
#!/bin/bash # Description: Search for any usages of the `formatAmountWithDecimals` function in the codebase. # Test: Search for the function usage in .ts files. Expect: No results found. rg 'formatAmountWithDecimals' --glob '*.ts'Length of output: 43
src/components/Claim/Link/Initial.view.tsx (4)
20-20
: LGTM!The code changes are approved.
304-304
: LGTM!The code changes are approved.
423-428
: LGTM!The code changes are approved.
452-452
: LGTM!The code changes are approved.
Hey @neverm25, thanks! Good idea! Would love to know how the formatUnits works exactly, and if it makes sense replace the amount formatting throughout the entire webapp! |
Sure, will do. |
Summary by CodeRabbit
New Features
formatUnits
function for improved precision.InitialClaimLinkView
andConfirm.view
components.Bug Fixes
Chores
formatAmountWithDecimals
utility function to simplify the codebase.