Skip to content

Latest commit

Β 

History

History
84 lines (65 loc) Β· 2.11 KB

File metadata and controls

84 lines (65 loc) Β· 2.11 KB

πŸ§ͺ Testing the WalletConnect Fix

βœ… What was fixed

Critical fix: switched from optional_namespaces to required_namespaces.
This is the real reason behind the wallet-side rejection/error.

πŸš€ Run the test

1. Run the program

cargo run

2. Expected console output

You should see:

πŸ”— WalletConnect for Qubic - QR connection
Step 1: Creating configuration...
Step 2: Creating client...
Step 3: Initializing...
Step 4: Generating URI...
ℹ️  Old sessions/state are cleaned up automatically
ℹ️  Each run generates a NEW unique URI
βœ… URI generated successfully

3. Expected debug logs

If you run with RUST_LOG=debug, you should see that Qubic is placed in required_namespaces.

set RUST_LOG=debug
cargo run

4. Scan the QR code

  • Open the Qubic wallet on your phone
  • Find WalletConnect
  • Scan the QR code
  • Approve the connection

5. Expected result

βœ… Success β€” the wallet connects without the previous rejection.

πŸ” What changed in the code

Before

required_namespaces: HashMap::new(), // empty ❌
optional_namespaces,                // Qubic was here

After

required_namespaces,                 // Qubic is here βœ…
optional_namespaces: HashMap::new(), // empty

πŸ“ Testing checklist

  • cargo build succeeds
  • cargo run starts
  • QR code/URI is displayed
  • Wallet scans the QR successfully
  • Wallet approves the connection
  • Session becomes active
  • Restarting the program keeps working (fresh URI each run)

πŸ› If the problem remains

If you still see a rejection:

  1. Verify the wallet supports WalletConnect v2 + Qubic namespace
  2. Verify the Project ID is valid
  3. Clear old WalletConnect sessions in the wallet
  4. Inspect logs and confirm required_namespaces usage
  5. Compare the proposal payload with the JavaScript implementation

πŸ“š Documentation

  • WALLETCONNECT_FIX_REQUIRED_NAMESPACES.md - root cause explanation
  • WALLET_CONNECT_QUICKSTART.md - quick start
  • TROUBLESHOOTING.md - common issues

Next step: run cargo run and verify a successful wallet connection.