Skip to content

fix: replace non-existent SwitchboardWallet with Wallet, add Default impl, fix clippy#38

Open
knoal wants to merge 2 commits into
kcolbchain:mainfrom
knoal:fix/cr8-client-switchboard-wallet
Open

fix: replace non-existent SwitchboardWallet with Wallet, add Default impl, fix clippy#38
knoal wants to merge 2 commits into
kcolbchain:mainfrom
knoal:fix/cr8-client-switchboard-wallet

Conversation

@knoal

@knoal knoal commented Jul 2, 2026

Copy link
Copy Markdown

Fixes several issues in PR #30 (feat: implement CR8Client trait and builder per spec):

  1. Non-existent type: SwitchboardWallet doesn't exist in crate::wallet. Replaced all occurrences with the actual Wallet type throughout src/cr8/mod.rs and src/cr8/tests.rs.

  2. Missing Default impl: Added impl Default for CR8ClientBuilder to satisfy clippy::new-without-default.

  3. Dead code warning: Added #[allow(dead_code)] on DefaultCR8Client struct since its fields are legitimately unused while methods are TODO stubs.

  4. clippy::question_mark in mcp/mod.rs: Replaced multi-line let Some(id) = id else { return None; } with let id = id?; as suggested by clippy. This is the same pre-existing fix mentioned in PR feat(mpp): implement x402 payment-offer + signed payment-proof core #35's description.

  5. Unused variables: Prefixed unused amount params in deposit/withdraw with underscore (_amount).

  6. Wrong chain variant: Replaced Chain::ArbitrumSepoliaChain::Arbitrum in tests (the Sepolia variant doesn't exist on this branch).

All checks pass: cargo fmt --check, cargo clippy --all-features -- -D warnings, cargo test (32 tests).

mugumaismael-commit and others added 2 commits June 8, 2026 13:24
…impl, fix clippy issues

- Replace invalid import of crate::wallet::switchboard::SwitchboardWallet
  with crate::wallet::Wallet throughout src/cr8/mod.rs and tests
- Add impl Default for CR8ClientBuilder (clippy new-without-default)
- Add #[allow(dead_code)] on DefaultCR8Client (fields unused due to TODO stubs)
- Fix clippy::question_mark in src/mcp/mod.rs (let id = id?)
- Fix unused variable warnings in deposit/withdraw (_amount prefix)
- Replace ArbitrumSepolia → Arbitrum in tests (chain doesn't exist)
- Run cargo fmt to normalize formatting
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