Skip to content

safe login init#1834

Merged
simo6529 merged 1 commit intomainfrom
safe-login
Jan 27, 2026
Merged

safe login init#1834
simo6529 merged 1 commit intomainfrom
safe-login

Conversation

@simo6529
Copy link
Copy Markdown
Collaborator

@simo6529 simo6529 commented Jan 27, 2026

Summary by CodeRabbit

  • New Features
    • Added support for contract-based signatures alongside standard wallet signatures
    • Wallet names and icons now dynamically detected and displayed
    • Enhanced detection for smart contract account types

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

Signed-off-by: Simo <simo@6529.io>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jan 27, 2026

📝 Walkthrough

Walkthrough

This pull request enhances the secure signing flow to support both EOA (externally owned account) and contract-based signatures. The hook now accepts configuration options to determine signature type, with corresponding validation logic, wallet detection utilities, and updated invocation sites to pass the appropriate signature type based on wallet characteristics.

Changes

Cohort / File(s) Summary
Contract Signature Support
hooks/useSecureSign.ts, __tests__/hooks/useSecureSign-wagmi.test.ts
Enhanced hook with optional options parameter to configure signature type ("eoa" or "contract"). Added dual validation paths: validateEoaSignature and validateContractSignature with constants for hex patterns and length constraints. Introduced classifySigningError for robust error handling. New test case verifies contract-based signature acceptance.
Wallet Info Integration
components/auth/SeizeConnectContext.tsx, components/auth/Auth.tsx
Integrated wallet info hook to dynamically populate wallet name, icon, and safe wallet detection. Auth component now passes signatureType to useSecureSign based on isSafeWallet check.
Wallet Detection Utility
utils/wallet-detection.ts
New utility module exporting isSafeWalletInfo() function with internal name/type matching against SAFE_WALLET_NAMES and SAFE_WALLET_TYPES sets.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Suggested reviewers

  • ragnep
  • analyticsflowee

Poem

🐰 A rabbit bounces through signatures fine,
Both EOA and contracts align,
With wallets detected and validation so neat,
Secure signing now feels oh so sweet! 🔐✨

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title "safe login init" is vague and generic, using non-descriptive terms that don't clearly convey the main changes to the codebase. Consider a more descriptive title that summarizes the primary change, such as "Add contract signature support for Safe wallets" or "Implement Safe wallet signature handling."
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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

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

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Jan 27, 2026

Quality Gate Passed Quality Gate passed

Issues
0 New issues
1 Accepted issue

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

@simo6529 simo6529 merged commit d114da5 into main Jan 27, 2026
7 checks passed
@simo6529 simo6529 deleted the safe-login branch January 27, 2026 08:32
This was referenced Feb 27, 2026
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.

2 participants