-
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): alternate eth address #2923
Conversation
WalkthroughThe recent update enhances 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
The update standardizes the handling of the Ethereum address '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE' by treating it as equivalent to the zero address in the token parsing function.
- Modified
packages/synapse-interface/constants/tokens/index.ts
to handle '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE' as zero address. - Ensures the
tokenAddressToToken
function returns theETH
token object for the specified address. - Aligns with the pull request description to standardize address handling across the codebase.
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/constants/tokens/index.ts (1 hunks)
Additional comments not posted (1)
packages/synapse-interface/constants/tokens/index.ts (1)
138-139
: Ensure the new address is handled correctly.The added condition checks if the
tokenAddress
matches the Ethereum address0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE
and returnsETH
. This change is correct and follows the intended functionality to treat this address as equivalent to the zero address.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2923 +/- ##
=============================================
Coverage 25.70802% 25.70802%
=============================================
Files 771 771
Lines 55613 55613
Branches 80 80
=============================================
Hits 14297 14297
Misses 39830 39830
Partials 1486 1486
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Deploying sanguine-fe with Cloudflare Pages
|
Bundle ReportChanges will increase total bundle size by 533.85kB ⬆️
|
@@ -135,6 +135,8 @@ export const tokenAddressToToken = ( | |||
if (chainId) { | |||
if (tokenAddress === WETH.addresses[chainId]) { | |||
return WETH | |||
} else if (tokenAddress === '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE') { |
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.
'constants/index.ts' file has this address so dont have to hardcode here
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.
missed that - thank you! updated in bdeabe5
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/constants/tokens/index.ts (2 hunks)
Files skipped from review as they are similar to previous changes (1)
- packages/synapse-interface/constants/tokens/index.ts
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
(updates since last review)
The pull request introduces significant updates to enhance token mapping and improve the maintainability of the codebase.
- Token Parsing Enhancement: Updated
packages/synapse-interface/constants/tokens/index.ts
to treat '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE' as the zero address. - Prometheus Exporter Refactor: Refactored
contrib/promexporter/exporters/bridge.go
to replace OpenTelemetry metrics with a customotelRecorder
. - New Metrics Collection: Added
contrib/promexporter/exporters/dfk.go
andcontrib/promexporter/exporters/submitter.go
for enhanced metrics collection. - Chain and Token Support: Added support for new chains and tokens in
packages/synapse-interface/constants/chains/index.tsx
andpackages/synapse-interface/constants/tokens/bridgeable.ts
. - Maintenance State Management: Introduced new hooks and reducers in
packages/synapse-interface/components/Maintenance
for better maintenance state handling.
71 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.
PR Summary
(updates since last review)
The pull request enhances token mapping to include support for ETH, improving the recognition of additional token addresses.
- Token Parsing Enhancement: Updated
packages/synapse-interface/constants/tokens/index.ts
to treat '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE' as the zero address. - Transaction Payload Detail: Modified
packages/synapse-interface/components/Activity/Transaction/components/TransactionPayloadDetail.tsx
to useformatAmount
utility for token amount formatting, increasing precision to 18 decimal places. - Token Address Handling: Updated
packages/synapse-interface/utils/getUnderlyingBridgeTokens.ts
to map zero address to '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE'. - Token Approval: Adjusted
packages/synapse-interface/utils/approveToken.tsx
to handle the new ETH address format. - Token Lookup: Modified
packages/synapse-interface/utils/findTokenByAddressAndChainId.ts
to recognize the new ETH address format.
1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
Update token parsing function to read address '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE' same as zeroAddress
Summary by CodeRabbit
0901a58: synapse-interface preview link
fd37156: synapse-interface preview link
6c476cf: synapse-interface preview link