Skip to content

WalletConnect Tendermint session chains are null, unable to activate #2519

@smk762

Description

@smk762

Session created with request:

{
  "method": "wc_new_connection",
  "mmrpc": "2.0",
  "params": {
    "required_namespaces": {
      "cosmos": {
        "chains": [
          "cosmos:cosmoshub-4",
          "cosmos:irishub-1",
          "cosmos:osmosis-1"
        ],
        "methods": [
          "cosmos_signDirect",
          "cosmos_signAmino",
          "cosmos_getAccounts"
        ],
        "events": []
      }
    }
  },
  "id": 0,
  "userpass": "RPC_UserP@SSW0RD"
}
Response:
{
  "mmrpc": "2.0",
  "result": {
    "url": "wc:f4d791c886f01aeae250becf59171fe96d9845bd0f4c7f94343a91179fa7763f@2?symKey=1493b6c51c02a7467fd0b3b8a7fa8487f4e81514f360cbe56781319208fa193c&relay-protocol=irn&expiryTimestamp=1751468470"
  },
  "id": 0
}

Scanned QR code with Keplr mobile wallet, which requested confirmation of selected chains as expected. Clicked to confirm.

Ran get_session for the session topic and got response:


{
  "mmrpc": "2.0",
  "result": {
    "session": {
      "topic": "ce98cae8561b21d14b59379d7b728fd74224241e3e5b44e515d4740d2de04b1b",
      "metadata": {
        "description": "Your Wallet for the Interchain",
        "url": "https://www.keplr.app",
        "icons": [
          "https://asset-icons.s3.us-west-2.amazonaws.com/keplr_512.png"
        ],
        "name": "Keplr"
      },
      "pairing_topic": "f4d791c886f01aeae250becf59171fe96d9845bd0f4c7f94343a91179fa7763f",
      "namespaces": {
        "cosmos": {
          "chains": null,
          "accounts": [
            "cosmos:cosmoshub-4:cosmos1nf4dhvs93paezh5gj3k7zz3tcs5wldx3sqz4cw"
          ],
          "methods": [
            "cosmos_getAccounts",
            "cosmos_signAmino",
            "cosmos_signDirect",
            "keplr_enable",
            "keplr_experimentalSuggestChain",
            "keplr_getKey",
            "keplr_signAmino",
            "keplr_signArbitrary",
            "keplr_signDirect",
            "keplr_signEthereum",
            "keplr_suggestToken"
          ],
          "events": [
            "accountsChanged",
            "chainChanged",
            "keplr_accountsChanged"
          ]
        }
      },
      "expiry": 1752073030
    }
  },
  "id": 0
}

Chains being null does not match responses recorded in earlier testing, where it was

                    "chains": [
                        "cosmos:cosmoshub-4"
                    ],

Next, attempted activation as demonstrated by #2223 (comment)

{
    "userpass": "{{userpass}}",
    "mmrpc": "2.0",
    "method": "task::enable_tendermint::init",
    "params": {
        "ticker": "ATOM",
        "tokens_params": [
        ],
        "nodes": [
            {
                "url": "https://cosmos-rpc.alpha.komodo.earth/",
                "api_url": "https://cosmos-api.alpha.komodo.earth/",
                "grpc_url": "https://cosmos-grpc.alpha.komodo.earth/",
                "ws_url": "wss://cosmos-rpc.alpha.komodo.earth/websocket"
            },
            {
                "url": "https://cosmoshub.rpc.stakin-nodes.com/"
            }
        ],
        "activation_params": {
            "type": "WalletConnect",
            "params": {
                "session_topic": "ce98cae8561b21d14b59379d7b728fd74224241e3e5b44e515d4740d2de04b1b"
            }
        }
    }
}

Which returns:

{
    "mmrpc": "2.0",
    "result": {
        "status": "Error",
        "details": {
            "error": "Error on platform coin ATOM creation: Unable to fetch account for chain: Session Error: No active WalletConnect session found",
            "error_path": "lib.platform_coin_with_tokens.tendermint_with_assets_activation.lib",
            "error_trace": "lib:104] platform_coin_with_tokens:457] tendermint_with_assets_activation:233] lib:548]",
            "error_type": "PlatformCoinCreationError",
            "error_data": {
                "ticker": "ATOM",
                "error": "Unable to fetch account for chain: Session Error: No active WalletConnect session found"
            }
        }
    },
    "id": null
}

This response appears to be the same as if a non-existent session topic value is input.

Logs show

02 15:09:20, kdf_walletconnect:198] INFO WalletConnect: connecting…
02 15:09:21, kdf_walletconnect:208] INFO WalletConnect: online.

but nothing else to indicate any related errors or ops.

Unable to progress with further walletconnect testing until this is overcome.


Found in 2.5.0 RC

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions