Skip to content

fix/transaction-hash-chain-id - #179

Merged
RanaBug merged 1 commit into
masterfrom
fix/transaction-hash-chain-id
Mar 18, 2025
Merged

fix/transaction-hash-chain-id#179
RanaBug merged 1 commit into
masterfrom
fix/transaction-hash-chain-id

Conversation

@RanaBug

@RanaBug RanaBug commented Mar 18, 2025

Copy link
Copy Markdown
Collaborator

Description

  • Replaced batchId param with chainId param in getTransactionHash and made it mandatory param.
  • Extended default waiting time for the txHash to 60 sec instead of 30 sec

How Has This Been Tested?

  • Existing Unit Tests and Manual Testing

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Summary by CodeRabbit

  • Chores

    • Updated the package to version 1.0.5 for enhanced stability and performance.
  • Refactor

    • Improved the transaction processing flow by now requiring a mandatory chain identifier.
    • Increased the default timeout period from 30 seconds to 60 seconds to boost operational reliability.

These updates provide a more consistent transaction experience while maintaining backward compatibility.

@RanaBug
RanaBug requested a review from IAmKio March 18, 2025 16:31
@RanaBug RanaBug self-assigned this Mar 18, 2025
@coderabbitai

coderabbitai Bot commented Mar 18, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

This pull request updates the project version to 1.0.5 and modifies the getTransactionHash function across modules. The parameter previously named batchId is now replaced by a required parameter (chainId in the changelog and txChainId in the code). In addition, the provider's version of this function has an increased default timeout from 30 to 60 seconds and updated SDK initialization logic. These changes are reflected in the changelog, package.json, and relevant TypeScript files.

Changes

Changed File(s) Change Summary
CHANGELOG.md, package.json Updated version to 1.0.5; changelog entry added noting the replacement of batchId with a mandatory chain identifier.
src/contexts/EtherspotTransactionKitContext.tsx, src/providers/EtherspotTransactionKitContextProvider.tsx Modified the getTransactionHash signature by replacing the optional batchId with the required chainId/txChainId. In the provider, increased the default timeout from 30 to 60 seconds and updated SDK initialization logic.

Sequence Diagram(s)

sequenceDiagram
    participant U as User
    participant Provider as EtherspotTransactionKitContextProvider
    participant SDK as etherspotModulaSdk

    U->>Provider: getTransactionHash("userOpHash", txChainId, timeout, retryInterval)
    Provider->>SDK: Initialize SDK with txChainId
    SDK-->>Provider: Return transaction hash
    Provider-->>U: Return transaction hash
Loading

Possibly related PRs

Suggested reviewers

  • IAmKio

Poem

In a field of code, I happily hop,
Swapping batch for chain, never gonna stop.
Timeout extended, the pace is now grand,
New parameters bloom like carrots from the land.
I’m a rabbit with a coder’s delight,
Celebrating changes in the moonlit night! 🐰🌟

Tip

⚡🧪 Multi-step agentic review comment chat (experimental)
  • We're introducing multi-step agentic chat in review comments. This experimental feature enhances review discussions with the CodeRabbit agentic chat by enabling advanced interactions, including the ability to create pull requests directly from comments.
    - To enable this feature, set early_access to true under in the settings.

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 09261fa and 66bf97b.

📒 Files selected for processing (4)
  • CHANGELOG.md (1 hunks)
  • package.json (1 hunks)
  • src/contexts/EtherspotTransactionKitContext.tsx (1 hunks)
  • src/providers/EtherspotTransactionKitContextProvider.tsx (1 hunks)
🔇 Additional comments (4)
package.json (1)

4-4: Version increment looks good.

The version has been correctly updated from 1.0.4 to 1.0.5, which aligns with the changes described in the PR objectives and CHANGELOG.md.

CHANGELOG.md (1)

3-7: LGTM! Changelog entry is clear and accurate.

The changelog correctly documents the replacement of batchId with chainId in the getTransactionHash function and notes that it's now a mandatory parameter.

src/providers/EtherspotTransactionKitContextProvider.tsx (1)

245-251: Implementation change looks good.

The implementation correctly replaces the batchId parameter with txChainId and extends the default timeout from 30 to 60 seconds as specified in the PR objectives. The SDK initialization now properly uses the chain ID.

src/contexts/EtherspotTransactionKitContext.tsx (1)

17-22: Interface updated correctly.

The interface definition has been properly updated to match the implementation change in the provider, replacing the optional batchId parameter with a required txChainId parameter.

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ 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>, please review it.
    • 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 gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @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 using 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 generate docstrings to generate docstrings for this 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.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

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.

@IAmKio IAmKio left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@RanaBug
RanaBug merged commit 206db97 into master Mar 18, 2025
@coderabbitai coderabbitai Bot mentioned this pull request Jul 10, 2025
3 tasks
@coderabbitai coderabbitai Bot mentioned this pull request Jul 24, 2025
3 tasks
@coderabbitai coderabbitai Bot mentioned this pull request Aug 22, 2025
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants