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

Removes deprecated field #1540

Merged
merged 1 commit into from
Nov 7, 2023
Merged

Conversation

abtestingalpha
Copy link
Collaborator

@abtestingalpha abtestingalpha commented Nov 7, 2023

Summary by CodeRabbit

  • Refactor
    • Simplified the InputContainer component by removing unnecessary states and logic.
    • Removed the addBridgeTxHash dispatch call from the StateManagedBridge component.
    • Updated the BridgeState interface and its initialState by removing the bridgeTxHashes property and the addBridgeTxHash action creator.

530d560bf444e2459dc56ff59534f93d0383121b: synapse-interface preview link

Copy link
Contributor

coderabbitai bot commented Nov 7, 2023

Walkthrough

The changes revolve around simplifying the StateManagedBridge component and its related logic. The bridgeTxHashes state, its related logic, and the addBridgeTxHash dispatch call have been removed. The useBridgeState hook has been modified for direct variable destructuring. The BridgeState interface has also been updated to reflect these changes.

Changes

File Path Change Summary
.../StateManagedBridge/InputContainer.tsx Simplified the InputContainer component by removing the bridgeTxHashes state and its related logic. Also removed the previousBridgeTxHashesRef and hasMounted state. Modified the useBridgeState hook for direct variable destructuring.
.../state-managed-bridge/index.tsx Removed the addBridgeTxHash dispatch call from the StateManagedBridge component.
.../slices/bridge/reducer.ts Removed the bridgeTxHashes property from the BridgeState interface and its initialization in the initialState. Also removed the addBridgeTxHash action creator and its corresponding export.

Poem

🍂 As the leaves fall, so do old states,
Simplifying code, oh how it elates!
BridgeTxHashes, we bid you adieu,
For cleaner, leaner code is due.
🐇 Hop, hop, hop, goes the CodeRabbit,
Making changes, it's become a habit.
On this day, in history's page,
We've simplified code, the latest rage! 🎉
So here's to autumn, crisp and bright,
And to code that's now feather-light! 🍁


Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • If you reply to a review comment from CodeRabbit, the bot will automatically respond.
  • To engage with CodeRabbit bot directly around the specific lines of code in the PR, mention @coderabbitai in your review comment
  • Note: Review comments are made on code diffs or files, not on the PR overview.
  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

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 a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai help to get help.
  • @coderabbitai resolve to resolve all the CodeRabbit review comments.

Note: For conversation with the bot, please use the review comments on code diffs or files.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • 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/coderabbit-overrides.v2.json

Copy link

codecov bot commented Nov 7, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (413a921) 51.23324% compared to head (2b9ec0e) 51.23324%.
Report is 1 commits behind head on master.

Additional details and impacted files
@@              Coverage Diff              @@
##              master       #1540   +/-   ##
=============================================
  Coverage   51.23324%   51.23324%           
=============================================
  Files            362         362           
  Lines          24691       24691           
  Branches         283         283           
=============================================
  Hits           12650       12650           
  Misses         10813       10813           
  Partials        1228        1228           
Flag Coverage Δ
packages 91.00610% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 804d636 and 2b9ec0e.
Files selected for processing (3)
  • packages/synapse-interface/components/StateManagedBridge/InputContainer.tsx (1 hunks)
  • packages/synapse-interface/pages/state-managed-bridge/index.tsx (2 hunks)
  • packages/synapse-interface/slices/bridge/reducer.ts (4 hunks)
Files skipped from review due to trivial changes (1)
  • packages/synapse-interface/slices/bridge/reducer.ts
Additional comments: 2
packages/synapse-interface/pages/state-managed-bridge/index.tsx (1)
  • 439-441: The addBridgeTxHash dispatch call has been removed. Ensure that this does not affect any other parts of the code that might be relying on this action.
packages/synapse-interface/components/StateManagedBridge/InputContainer.tsx (1)
  • 19-36: The hasMounted state and its related useEffect hook are removed. This simplifies the component's state management and lifecycle. Ensure that this change doesn't affect the component's behavior in edge cases, such as during the initial render.

Copy link

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 2b9ec0e
Status: ✅  Deploy successful!
Preview URL: https://a529ad9f.sanguine.pages.dev
Branch Preview URL: https://fe-deprecate-old-tx-hashes.sanguine.pages.dev

View logs

@abtestingalpha abtestingalpha merged commit bbaa741 into master Nov 7, 2023
43 checks passed
@abtestingalpha abtestingalpha deleted the fe/deprecate-old-tx-hashes branch November 7, 2023 16:13
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.

2 participants