Skip to content

Fix: update isConnected method to exclude wallets without Identity contract#519

Open
blueogin wants to merge 1 commit intomasterfrom
fix/topwallet-isconnected-filter-base
Open

Fix: update isConnected method to exclude wallets without Identity contract#519
blueogin wants to merge 1 commit intomasterfrom
fix/topwallet-isconnected-filter-base

Conversation

@blueogin
Copy link
Collaborator

@blueogin blueogin commented Mar 12, 2026

Description

Base has no Identity contract, so MultiWallet.isConnected() was failing when it ran on BaseAdminWallet and broke /verify/topwallet. We now skip BaseAdminWallet in the isConnected check so only wallets with Identity (e.g. Celo) are used.
You can refer msgs on Slack

About # (link your issue here)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.

Checklist:

  • PR title matches follow: (Feature|Bug|Chore) Task Name
  • My code follows the style guidelines of this project
  • I have followed all the instructions described in the initial task (check Definitions of Done)
  • I have performed a self-review of my own code
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have added reference to a related issue in the repository
  • I have added a detailed description of the changes proposed in the pull request. I am as descriptive as possible, assisting reviewers as much as possible.
  • I have added screenshots related to my pull request (for frontend tasks)
  • I have pasted a gif showing the feature.
  • @mentions of the person or team responsible for reviewing proposed changes

Summary by Sourcery

Bug Fixes:

  • Prevent MultiWallet.isConnected from failing on BaseAdminWallet by excluding wallets without an Identity contract from the connection check.

@blueogin blueogin self-assigned this Mar 12, 2026
@blueogin blueogin requested review from L03TJ3 and sirpy March 12, 2026 16:29
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • Relying on instanceof BaseAdminWallet inside MultiWallet tightly couples this class to a specific wallet implementation; consider adding a capability flag or interface method (e.g. supportsIdentity() or similar) on wallets and filtering based on that instead.
  • If all wallets are filtered out (e.g. only admin wallets are configured), isConnected will always return false; consider explicitly handling/logging this scenario so it's easier to debug unexpected connectivity results.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Relying on `instanceof BaseAdminWallet` inside `MultiWallet` tightly couples this class to a specific wallet implementation; consider adding a capability flag or interface method (e.g. `supportsIdentity()` or similar) on wallets and filtering based on that instead.
- If all wallets are filtered out (e.g. only admin wallets are configured), `isConnected` will always return false; consider explicitly handling/logging this scenario so it's easier to debug unexpected connectivity results.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

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.

1 participant