Skip to content

Conversation

@HananINouman
Copy link
Collaborator

@HananINouman HananINouman commented Dec 2, 2025

Summary by CodeRabbit

  • Refactor

    • Simplified the withdrawal request API surface for clearer usage.
    • Ensured cryptographic initialization occurs before signature aggregation to improve reliability.
  • Chores

    • Tightened linting and formatting paths in dev scripts.
    • Updated lint rules to exclude test directories from linting.

✏️ Tip: You can customize this high-level summary in your review settings.

@HananINouman HananINouman requested a review from a team as a code owner December 2, 2025 08:20
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 2, 2025

Walkthrough

Removed the ProviderType import and the provider parameter from the EOA withdrawal helper, added a BLS init('herumi') call before signature aggregation in exit recombination, and tightened lint/prettier script paths and ESLint ignore patterns.

Changes

Cohort / File(s) Summary
EOA Helpers
src/eoa/eoaHelpers.ts
Removed ProviderType import and removed provider parameter from submitEOAWithdrawalRequest; reformatted an allocation validation guard (no behavioral change).
Exit / BLS Aggregation
src/exits/exit.ts
Added await init('herumi') call before aggregateSignatures inside recombineExitBlobs.
Linting Configuration
.eslintrc.js
Added '**/test/**' to ignorePatterns to exclude test directories from ESLint.
Development Scripts
package.json
Rewrote lint script to eslint ./src --ext .ts,.js --fix and prettier script to prettier --write "src/**/*.{js,ts}" (path/glob changes only).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Review attention recommended:
    • src/eoa/eoaHelpers.ts — ensure all call sites updated to remove provider argument.
    • src/exits/exit.ts — confirm BLS initialization timing and dependency impact.
    • package.json / .eslintrc.js — verify intended files are included/excluded by new globs/patterns.

Possibly related PRs

Suggested reviewers

  • agaskrobot

Poem

🐰 I hopped through code at break of day,
Provider gone — I bounded away.
BLS wakes with herumi's song,
Linters skip where tests belong,
Pretty scripts now sing along. ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title specifically references 'recombine signature fix', which directly matches the main change in src/exits/exit.ts where initialization was added to the recombineExitBlobs function's signature aggregation path. However, the title is somewhat vague about what the fix entails.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch Hanna/recombineSignature-fix

📜 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 47ede1a and dd503d3.

📒 Files selected for processing (1)
  • src/eoa/eoaHelpers.ts (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/eoa/eoaHelpers.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build

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

Comment @coderabbitai help to get the list of available commands and usage tips.

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/eoa/eoaHelpers.ts (1)

108-110: Minor: clean up batch deposit error message

The error text "Failed to submit batch deposit'}" contains an extra '}" at the end, which looks like a typo and may confuse consumers. Consider simplifying it:

-  } catch (error: any) {
-    throw new Error("Failed to submit batch deposit'}");
-  }
+  } catch (error: any) {
+    throw new Error('Failed to submit batch deposit');
+  }
🧹 Nitpick comments (2)
.eslintrc.js (1)

22-22: Test directory now fully excluded from ESLint

Adding **/test/** here means tests won’t be linted even if someone runs eslint . from the repo root. If that’s intentional and you only care about linting src, this looks good; otherwise consider narrowing the pattern or including tests in CI linting.

package.json (1)

24-27: Lint/format scripts look good; consider fixing prettier-ci

The updated lint and prettier commands targeting ./src and src/**/*.{js,ts} look cleaner and consistent. However, prettier-ci still uses --ext, which Prettier’s CLI doesn’t support; if that script is ever used, it will likely fail. Consider aligning it with the new glob-based pattern:

-    "lint": "eslint ./src --ext .ts,.js --fix",
-    "lint-ci": "eslint ./src --ext .ts,.js",
-    "prettier-ci": "prettier --check ./src --ext .ts,.js",
-    "prettier": "prettier --write \"src/**/*.{js,ts}\"",
+    "lint": "eslint ./src --ext .ts,.js --fix",
+    "lint-ci": "eslint ./src --ext .ts,.js",
+    "prettier-ci": "prettier --check \"src/**/*.{js,ts}\"",
+    "prettier": "prettier --write \"src/**/*.{js,ts}\"",
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b240c58 and 47ede1a.

📒 Files selected for processing (3)
  • .eslintrc.js (1 hunks)
  • package.json (1 hunks)
  • src/eoa/eoaHelpers.ts (2 hunks)
🧰 Additional context used
🪛 ESLint
src/eoa/eoaHelpers.ts

[error] 28-28: Expected { after 'if' condition.

(curly)

🪛 GitHub Actions: Lint, Unit and E2E Tests
src/eoa/eoaHelpers.ts

[error] 28-28: ESLint: Expected { after 'if' condition curly

🪛 GitHub Check: build
src/eoa/eoaHelpers.ts

[failure] 28-28:
Expected { after 'if' condition

🔇 Additional comments (1)
src/eoa/eoaHelpers.ts (1)

2-25: Provider removal from EOA withdrawal helper looks consistent

The function only depends on signer.sendTransaction, so dropping the provider parameter and narrowing the import to SignerType is coherent with the current implementation. Just ensure all call sites have been updated to stop passing a provider and that no caller relied on provider-specific behavior (e.g. connected vs. disconnected signers).

@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 2, 2025

Quality Gate Failed Quality Gate failed

Failed conditions
D Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@HananINouman HananINouman merged commit 2ad657f into main Dec 4, 2025
5 of 6 checks passed
@HananINouman HananINouman deleted the Hanna/recombineSignature-fix branch December 4, 2025 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants