The wallet rejected the connection with:
“Connection was established via this URL”
The Rust implementation used optional_namespaces while the JavaScript SDK uses requiredNamespaces for Qubic.
required_namespaces: HashMap::new(), // empty
optional_namespaces, // Qubic was here (wrong)required_namespaces, // Qubic is required (correct)
optional_namespaces: HashMap::new(), // emptyFile: src/wallet_connect/client.rs
- moved Qubic namespace from optional → required
- kept optional empty (or used only for truly optional features)
- mandatory requirements for the session
- the wallet must support these chains/methods
- used for core blockchain functionality
- optional capabilities the wallet may support
- the session can still be established without them
- used for non-critical extras
| Parameter | Before | After |
|---|---|---|
required_namespaces |
{} |
{ qubic: {...} } |
optional_namespaces |
{ qubic: {...} } |
{} |
| Wallet behavior | ❌ rejects | ✅ accepts |
| Parity with JS SDK | ❌ no | ✅ yes |
set RUST_LOG=debug
cargo runConfirm logs indicate Qubic is placed in required_namespaces, then scan the QR code and approve the session.
Along with the root fix:
cleanup_old_state()clears stale state before reconnects- better logging clarifies which namespaces are used
- documentation and quick start were updated
If you build your own WalletConnect client:
- ✅ use
requiredNamespacesfor core chain methods - ❌ do not put critical methods into
optionalNamespaces
src/wallet_connect/client.rs- root fixWALLETCONNECT_FIX_RU.md- note (now English)QUICKSTART_WALLETCONNECT_RU.md- quick start (now English)
Date: 2025-11-01
Status: ✅ fixed