-
Notifications
You must be signed in to change notification settings - Fork 32
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
feat(synapse-interface): display small tx origin values #2922
Conversation
WalkthroughThe recent updates to the Changes
Poem
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 as PR comments)
Additionally, you can add 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.
PR Summary
Enhanced the display of small transaction values by replacing the numeral
library with a custom formatAmount
utility function, increasing precision from 4 to 18 decimal places.
- Modified
packages/synapse-interface/components/Activity/Transaction/components/TransactionPayloadDetail.tsx
to useformatAmount
for better precision. - Integrated
formatBigIntToString
andtrimTrailingZeroesAfterDecimal
withformatAmount
for consistent formatting. - Improved accuracy and readability of transaction details, especially for small values.
1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
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.yaml
Review profile: CHILL
Files selected for processing (1)
- packages/synapse-interface/components/Activity/Transaction/components/TransactionPayloadDetail.tsx (3 hunks)
Additional comments not posted (3)
packages/synapse-interface/components/Activity/Transaction/components/TransactionPayloadDetail.tsx (3)
13-13
: Import statement looks good!The import statement for
formatAmount
is correct.
95-96
: JSX rendering logic fortokenAmount
as a string looks good!The changes correctly use
formatAmount
to format the result offormatBigIntToString
with increased precision.Verification successful
JSX rendering logic for
tokenAmount
as a string looks good!The changes correctly use
formatAmount
to format the result offormatBigIntToString
with increased precision.
packages/synapse-interface/components/Activity/Transaction/components/TransactionPayloadDetail.tsx
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of `formatAmount` and `formatBigIntToString` in the codebase. # Test: Search for the function usage. Expect: Consistent usage of `formatAmount` and `formatBigIntToString`. rg --type tsx -A 5 $'formatAmount' rg --type tsx -A 5 $'formatBigIntToString'Length of output: 131
Script:
#!/bin/bash # Description: Verify the usage of `formatAmount` and `formatBigIntToString` in the codebase. # Test: Search for the function usage. Expect: Consistent usage of `formatAmount` and `formatBigIntToString`. rg --type-add 'tsx:*.{ts,tsx}' -t tsx -A 5 'formatAmount' rg --type-add 'tsx:*.{ts,tsx}' -t tsx -A 5 'formatBigIntToString'Length of output: 56358
102-102
: JSX rendering logic fortokenAmount
as a number looks good!The changes correctly use
formatAmount
to format thetokenAmount
after converting it to a string.Verification successful
JSX rendering logic for
tokenAmount
as a number looks good!The changes correctly use
formatAmount
to format thetokenAmount
after converting it to a string. The usage offormatAmount
is consistent across the codebase.
packages/synapse-interface/components/Activity/Transaction/components/TransactionPayloadDetail.tsx
packages/synapse-interface/components/Portfolio/components/PortfolioTokenAsset.tsx
packages/synapse-interface/components/ui/SelectSpecificTokenButton.tsx
packages/synapse-interface/components/WipWrapperComponents/Ticker.tsx
packages/synapse-interface/components/Portfolio/components/PortfolioTokenVisualizer.tsx
packages/synapse-interface/components/Portfolio/components/GasTokenAsset.tsx
packages/synapse-interface/components/StateManagedBridge/InputContainer.tsx
packages/synapse-interface/components/StateManagedSwap/SwapInputContainer.tsx
packages/synapse-interface/components/StateManagedBridge/AvailableBalance.tsx
packages/explorer-ui/components/misc/IconAndAmount.tsx
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of `formatAmount` in the codebase. # Test: Search for the function usage. Expect: Consistent usage of `formatAmount`. rg --type tsx -A 5 $'formatAmount'Length of output: 61
Script:
#!/bin/bash # Description: Verify the usage of `formatAmount` in the codebase. # Test: Search for the function usage. Expect: Consistent usage of `formatAmount`. rg --type-add 'tsx:*.tsx' --type tsx -A 5 'formatAmount'Length of output: 17445
Bundle ReportChanges will increase total bundle size by 4.21MB ⬆️
|
Deploying sanguine-fe with Cloudflare Pages
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2922 +/- ##
===================================================
+ Coverage 25.39826% 25.71321% +0.31494%
===================================================
Files 785 770 -15
Lines 56559 55524 -1035
Branches 80 80
===================================================
- Hits 14365 14277 -88
+ Misses 40713 39769 -944
+ Partials 1481 1478 -3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Summary by CodeRabbit
New Features
Bug Fixes
4fe8ec3: synapse-interface preview link