Skip to content
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

FE release [2024-07-17] #2881

Merged
merged 6 commits into from
Jul 17, 2024
Merged

FE release [2024-07-17] #2881

merged 6 commits into from
Jul 17, 2024

Conversation

ChiTimesChi
Copy link
Collaborator

@ChiTimesChi ChiTimesChi commented Jul 17, 2024

Description
A clear and concise description of the features you're adding in this pull request.

Additional context
Add any other context about the problem you're solving.

Metadata

  • Fixes #[Link to Issue]

Summary by CodeRabbit

  • New Features

    • Improved error messages in bridge request handling to include transaction IDs for better context.
  • Bug Fixes

    • Corrected explorerUrl for the ETH chain from https://etherscan.com to https://etherscan.io.
  • Maintenance

    • Updated package versions for @synapsecns/explorer-ui, @synapsecns/synapse-interface, and synapse-constants indicating routine maintenance with no functional changes.
  • Compatibility

    • Specified minimum required Node.js version as >=18.18.0 for @synapsecns/synapse-interface.
  • Data Handling Enhancements

    • Enhanced data passing within StateManagedBridge component and store subscription logic.

0a77f76: explorer-ui preview link
0a77f76: synapse-interface preview link
cdb0f70: explorer-ui preview link
cdb0f70: synapse-interface preview link

Copy link
Contributor

coderabbitai bot commented Jul 17, 2024

Walkthrough

The updates across various packages mainly involve version bumps and minor metadata changes. Notably, the explorerUrl for the ETH chain was updated, and error messages in service handlers were improved for better context. The StateManagedBridge component and the store have minor enhancements to include additional data in payloads. Overall, these changes reflect routine maintenance with minor improvements in functionality and error handling.

Changes

Files/Paths Change Summary
packages/explorer-ui/CHANGELOG.md Version update from 0.1.47 to 0.1.48, mainly metadata changes.
packages/explorer-ui/package.json Version bump from 0.1.47 to 0.1.48, and synapse-constants from 1.3.19 to 1.3.20.
packages/synapse-constants/CHANGELOG.md Version bump from 1.3.19 to 1.3.20 with no functional changes.
packages/synapse-constants/constants/chains/master.ts Updated explorerUrl for ETH from 'https://etherscan.com' to 'https://etherscan.io'.
packages/synapse-constants/package.json Version bump from 1.3.19 to 1.3.20.
packages/synapse-interface/CHANGELOG.md Version bump from 0.28.2 to 0.28.3 with no functional changes.
packages/synapse-interface/package.json Version bump from 0.28.2 to 0.28.4, updated Node.js minimum version to >=18.18.0.
services/rfq/guard/service/handlers.go Improved error message to include transaction ID in handleProveCalled function.
services/rfq/relayer/service/handlers.go Added conditional check in handleProofProvided method for early return if Relayer field mismatches.
packages/synapse-interface/pages/state-managed-bridge/... Included bridgeQuote object in the payload within StateManagedBridge component.
packages/synapse-interface/store/store.ts Added bridgeQuote to eventData in segmentAnalyticsEvent.

Poem

In the land of code where changes flow,
Small tweaks and bumps make systems grow.
URLs fixed, and errors clear,
A seamless bridge, no need to fear.
With each update, the promise is bright,
A better future, coding in light.


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?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

  • Corrected Ethereum explorer URL in packages/synapse-constants/constants/chains/master.ts
  • Improved error messages with transaction ID in services/rfq/guard/service/handlers.go
  • Added relayer address check in services/rfq/relayer/service/handlers.go
  • Updated synapse-constants dependency in packages/explorer-ui/package.json
  • Version bumps in packages/explorer-ui/package.json, packages/synapse-constants/package.json, and packages/synapse-interface/package.json

8 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings

Copy link

cloudflare-workers-and-pages bot commented Jul 17, 2024

Deploying sanguine-fe with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7cbb76f
Status: ✅  Deploy successful!
Preview URL: https://a34dc0d8.sanguine-fe.pages.dev
Branch Preview URL: https://master.sanguine-fe.pages.dev

View logs

Copy link

@greptile-apps greptile-apps bot left a 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)

  • Added bridgeQuote to analytics event payloads in packages/synapse-interface/pages/state-managed-bridge/index.tsx
  • Enhanced store subscription events with bridgeQuote in packages/synapse-interface/store/store.ts

2 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between a24ab81 and b4f9116.

Files selected for processing (9)
  • packages/explorer-ui/CHANGELOG.md (1 hunks)
  • packages/explorer-ui/package.json (2 hunks)
  • packages/synapse-constants/CHANGELOG.md (1 hunks)
  • packages/synapse-constants/constants/chains/master.ts (1 hunks)
  • packages/synapse-constants/package.json (1 hunks)
  • packages/synapse-interface/CHANGELOG.md (1 hunks)
  • packages/synapse-interface/package.json (1 hunks)
  • services/rfq/guard/service/handlers.go (1 hunks)
  • services/rfq/relayer/service/handlers.go (1 hunks)
Files skipped from review due to trivial changes (4)
  • packages/explorer-ui/CHANGELOG.md
  • packages/synapse-constants/CHANGELOG.md
  • packages/synapse-interface/CHANGELOG.md
  • packages/synapse-interface/package.json
Additional comments not posted (4)
packages/synapse-constants/package.json (1)

3-3: Version bump approved.

The version update from 1.3.19 to 1.3.20 appears to be a minor change, likely for routine updates or bug fixes.

packages/explorer-ui/package.json (1)

3-3: Version and dependency updates approved.

The version bump from 0.1.47 to 0.1.48 and the update of the synapse-constants dependency to version 1.3.20 are both approved. These changes ensure consistency and compatibility within the project.

Also applies to: 41-41

services/rfq/guard/service/handlers.go (1)

120-120: Enhanced error message approved.

Including the transaction ID in the error message (handleProveCalled function) enhances debugging and traceability. This is a valuable improvement for maintaining clarity in error logs.

packages/synapse-constants/constants/chains/master.ts (1)

57-57: URL correction approved.

The update of the explorerUrl for the ETH chain from 'https://etherscan.com' to 'https://etherscan.io' corrects the URL to its proper domain. This change ensures that users and systems are directed to the correct service.

Comment on lines +376 to +379
if req.Relayer != r.signer.Address() {
return nil
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Ensure proper authorization and state transition.

The addition of a conditional check to ensure the req.Relayer matches r.signer.Address() is crucial for security, ensuring that only the intended relayer can make the status update. This is a good practice to prevent unauthorized state changes.

However, the function should also verify that the previous status is ProvePosting before updating it to ProvePosted to ensure correct state transitions.

+  # Verify previous status before updating
+  current_status = r.db.GetQuoteRequestStatus(ctx, req.TransactionId)
+  if current_status != reldb.ProvePosting:
+      return fmt.Errorf("invalid state transition: current status is not ProvePosting")
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if req.Relayer != r.signer.Address() {
return nil
}
if req.Relayer != r.signer.Address() {
return nil
}
# Verify previous status before updating
current_status = r.db.GetQuoteRequestStatus(ctx, req.TransactionId)
if current_status != reldb.ProvePosting:
return fmt.Errorf("invalid state transition: current status is not ProvePosting")

Copy link

codecov bot commented Jul 17, 2024

Bundle Report

Changes will increase total bundle size by 3.51MB ⬆️

Bundle name Size Change
sdk-router-@synapsecns/sdk-router-esm 252.15kB 0 bytes
sdk-router-@synapsecns/sdk-router-cjs 116.93kB 0 bytes
explorer-ui-server-cjs 894.5kB 894.5kB ⬆️
synapse-interface-server-cjs 1.38MB 62 bytes ⬆️
synapse-interface-client-array-push 7.45MB 75 bytes ⬆️
explorer-ui-edge-server-array-push 83 bytes 83 bytes ⬆️
explorer-ui-client-array-push 2.34MB 2.34MB ⬆️
synapse-interface-edge-server-array-push 83 bytes 0 bytes
widget-cjs-esm 273.3kB 273.3kB ⬆️
widget-esm-cjs 275.25kB 0 bytes

Copy link

@greptile-apps greptile-apps bot left a 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)

  • Version update for @synapsecns/synapse-interface package from 0.28.3 to 0.28.4 (packages/synapse-interface/package.json)
  • No major changes found since last review.

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

Commits

Files that changed from the base of the PR and between b4f9116 and a70f29f.

Files selected for processing (2)
  • packages/synapse-interface/pages/state-managed-bridge/index.tsx (2 hunks)
  • packages/synapse-interface/store/store.ts (1 hunks)
Additional comments not posted (2)
packages/synapse-interface/store/store.ts (1)

77-77: Addition of bridgeQuote to eventData is approved, but verify integration.

The addition of the bridgeQuote field to the eventData object is correctly implemented. However, ensure that this new data is correctly handled in all components that consume eventData.

packages/synapse-interface/pages/state-managed-bridge/index.tsx (1)

374-374: Addition of bridgeQuote to function payload is approved, but verify integration.

The addition of the bridgeQuote parameter to the payload of the function call within the executeBridge function is correctly implemented. However, ensure that this new data is correctly handled in all components that consume this payload.

Also applies to: 468-468

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

Commits

Files that changed from the base of the PR and between a70f29f and 7cbb76f.

Files selected for processing (2)
  • packages/synapse-interface/CHANGELOG.md (1 hunks)
  • packages/synapse-interface/package.json (1 hunks)
Files skipped from review as they are similar to previous changes (2)
  • packages/synapse-interface/CHANGELOG.md
  • packages/synapse-interface/package.json

@trajan0x trajan0x merged commit 380cb95 into fe-release Jul 17, 2024
1 check passed
@coderabbitai coderabbitai bot mentioned this pull request Oct 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants