Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(walletconnect): walletconnect integration #2223

Open
wants to merge 207 commits into
base: dev
Choose a base branch
from
Open

Conversation

borngraced
Copy link
Member

@borngraced borngraced commented Sep 16, 2024

#1543
This PR introduces the integration of WalletConnect into the Komodo DeFi Framework (KDF), enabling secure wallet connections for Cosmos and EVM-based chains. KDF acts as the DApp(in this PR), allowing users to initiate and manage transactions securely with external wallets e.g via Metamask.
Key changes include:

  • Implement multi-session handling for concurrent WalletConnect connections across accounts, integrates SQLite/IndexedDB for persistent session storage across devices, enhances relayer disconnection handling for smoother session management
  • Implemented WalletConnect coin activation for Tendermint and EVM.
  • Implemented Withdraw and Swap functionalities for Tendermint and EVM

https://specs.walletconnect.com/2.0/specs/clients/sign/
https://specs.walletconnect.com/2.0/specs/clients/core/pairing/
https://specs.walletconnect.com/2.0/specs/clients/core/crypto/
https://specs.walletconnect.com/2.0/specs/servers/relay/
https://docs.reown.com/advanced/multichain/rpc-reference/ethereum-rpc

Additional improvements include cleanup of unused dependencies, minor code refinements, and WASM compatibility

Updated deps:
Added deps:
Removed deps:

How to test using EVM coin e.g ETH (Native && WASM)

  1. Start kdf (cargo run)
  2. Create WalletConnect session connection
    • Use the RPC below
    • Copy the connection URL and either:
      • Paste directly in your wallet or
      • Generate QR code using QR Code Generator and scan with your wallet (e.g., MetaMask)
  3. Activate ETH coin (set "priv_key_policy": "wallet_connect": { "session_topic": your_session_topic" } in activation params).
  4. Approve authentication request in your Wallet
  5. Withdraw or trade.

Note: To add more eip155 chains, modify the chains array like this: ["eip155:1", "eip155:250"]

New RPC Methods

New connection

method: wc_new_connection

{
	"method": "wc_new_connection",
	"userpass": "{{ _.userpass }}",
	"mmrpc": "2.0",
	"params": {
		"required_namespaces": {
			"eip155": {
				"chains": [
					"eip155:1"
				],
				"methods": [
					"eth_sendTransaction",
					"eth_signTransaction",
					"personal_sign"
				],
				"events": [
					"accountsChanged",
					"chainChanged"
				]
			},
			"cosmos": {
				"chains": [
					"cosmos:cosmoshub-4"
				],
				"methods": [
					"cosmos_signDirect",
					"cosmos_signAmino",
					"cosmos_getAccounts"
				],
				"events": []
			}
		}
	}
}

Get/Retrieve Walletconnect session(s)

method: wc_get_session | wc_get_sessions

{
	"method": "wc_get_session" | "wc_get_sessions",
	"userpass": "{{ _.userpass }}",
	"mmrpc": "2.0",
	"params": {
		"topic": "3a6327f78840427d3a428e8fbaaaaabc8c89c582bb2ff4464d3c73d8e2e5b253"
	}
}

Ping Walletconnect session

method: wc_ping_session

{
	"method": "wc_ping_session",
	"userpass": "{{ _.userpass }}",
	"mmrpc": "2.0",
	"params": {
		"topic": "3a6327f78840427d3a428e8fbaaaaabc8c89c582bb2ff4464d3c73d8e2e5b253"
	}
}

Delete Walletconnect session

method: wc_delete_session

{
	"method": "wc_delete_session",
	"userpass": "{{ _.userpass }}",
	"mmrpc": "2.0",
	"params": {
		"topic": "3a6327f78840427d3a428e8fbaaaaabc8c89c582bb2ff4464d3c73d8e2e5b253"
	}
}

Active ETH/ERC

method: enable_eth_with_tokens

{
    "priv_key_policy": {
        "wallet_connect": {
            "session_topic": "3a6327f78840427d3a428e8fbaaaaabc8c89c582bb2ff4464d3c73d8e2e5b253"
        }
    },
    ...
}

Active Tendermint/Cosmos

method: enable_tendermint_with_assets

{
    "activation_params": {
        "wallet_connect": {
            "session_topic": "'3a6327f78840427d3a428e8fbaaaaabc8c89c582bb2ff4464d3c73d8e2e5b253"
        }
    },
    ...
}

cc @smk762

@borngraced borngraced self-assigned this Sep 16, 2024
@borngraced
Copy link
Member Author

borngraced commented Mar 20, 2025

I'm unable to test the Cosmos side, as on sending the wc: string with cosmos included, there is an error in browser console: image

In this state, the connection appears in https://react-wallet.walletconnect.com/pairings but without the title and icon image

And it does not appear in https://react-wallet.walletconnect.com/sessions or response from wc_get_sessions.

unfortunately the example wallet didn't add support for comos_getAccounts method. We should add it.

Is it something you can do or I can help with that

@smk762
Copy link

smk762 commented Mar 24, 2025

For the EVM/WalletConnect side of things, I'm able to connect, activate coin and withdraw funds - but am failing to complete a swap. Do both swap participants (and seednode) need to be running this branch?

Error logs for swap attempts:

· 2025-03-24 15:54:24 +0800 [] lp_ordermatch:3302] Entering the taker_swap_loop KMD/MATIC with uuid: e60783fe-b1a3-45b3-b6d8-6b373e85d25e
· 2025-03-24 15:54:34 +0800 [] taker_swap:831] Taker swap e60783fe-b1a3-45b3-b6d8-6b373e85d25e has successfully started
+--- 24 07:54:35 -------
| (0:00) [swap uuid=e60783fe-b1a3-45b3-b6d8-6b373e85d25e] Started...
24 07:54:42, coins::eth::wallet_connect:244] INFO target: WalletConnect: sign-and-send, get_gas_price…
+--- 24 07:54:43 -------
| (0:09) [swap uuid=e60783fe-b1a3-45b3-b6d8-6b373e85d25e] Negotiated...
24 07:54:46, coins::eth::wallet_connect:262] INFO target: WalletConnect: sign-and-send, signing and sending tx
24 07:54:46, kdf_walletconnect:422] INFO [b8cbfba89d1b9c2e374c1bd892d63f9baea5910efe3c18a1e927c973015b8d7b] Publishing message=Request(Request { id: MessageId(446157538861826), jsonrpc: "2.0", params: SessionRequest(SessionRequestRequest { request: Request { method: "eth_sendTransaction", params: Array [Object {"nonce": String("0x1"), "from": String("0xa2eb1ea222163eb1c62d3bca74e99b57b3ac4743"), "gasLimit": String("0x5208"), "value": String("0xd2b199d112c7"), "data": String("0x"), "gasPrice": String("0x686d43ed9"), "to": String("0xd8997941dd1346e9231118d5685d866294f59e5b")}], expiry: None }, chain_id: "eip155:137" }) })
24 07:54:46, kdf_walletconnect:444] INFO [b8cbfba89d1b9c2e374c1bd892d63f9baea5910efe3c18a1e927c973015b8d7b] Message published successfully
+--- 24 07:56:44 -------
| (2:09) [swap uuid=e60783fe-b1a3-45b3-b6d8-6b373e85d25e] Negotiated...
+--- 24 07:57:08 -------
| (2:33) [swap uuid=e60783fe-b1a3-45b3-b6d8-6b373e85d25e] Negotiated...
+--- 24 07:57:32 -------
| (2:57) [swap uuid=e60783fe-b1a3-45b3-b6d8-6b373e85d25e] Negotiated...
+--- 24 07:57:56 -------
| (3:22) [swap uuid=e60783fe-b1a3-45b3-b6d8-6b373e85d25e] Negotiated...
24 07:58:12, kdf_walletconnect::connection_handler:81] INFO WalletConnect disconnected with message: Some("Disconnecting for load balancing reasons (4010)"). Attempting to reconnect...
24 07:58:13, kdf_walletconnect::connection_handler:85] INFO Reconnection process complete.
+--- 24 07:58:20 -------
| (3:46) [swap uuid=e60783fe-b1a3-45b3-b6d8-6b373e85d25e] Negotiated...
+--- 24 07:58:44 -------
| (4:10) [swap uuid=e60783fe-b1a3-45b3-b6d8-6b373e85d25e] Negotiated...
+--- 24 07:59:08 -------
| (4:34) [swap uuid=e60783fe-b1a3-45b3-b6d8-6b373e85d25e] Negotiated...
+--- 24 07:59:32 -------
| (4:58) [swap uuid=e60783fe-b1a3-45b3-b6d8-6b373e85d25e] Negotiated...
24 07:59:46, mm2_main::lp_swap::taker_swap:506] ERROR [swap uuid=e60783fe-b1a3-45b3-b6d8-6b373e85d25e] TakerFeeSendFailed(SwapError { error: "taker_swap:1337] mm2src/coins/eth/wallet_connect.rs:263] wallet_connect:136] lib:630] WalletConnectError(TimeoutError)" })
· 2025-03-24 15:59:46 +0800 [swap uuid=e60783fe-b1a3-45b3-b6d8-6b373e85d25e] Finished


· 2025-03-24 16:00:55 +0800 [] lp_ordermatch:3302] Entering the taker_swap_loop KMD/MATIC with uuid: 50adb3d2-681e-4ce5-9abe-ec53e23552ed
· 2025-03-24 16:01:05 +0800 [] taker_swap:831] Taker swap 50adb3d2-681e-4ce5-9abe-ec53e23552ed has successfully started
+--- 24 08:01:06 -------
| (0:00) [swap uuid=50adb3d2-681e-4ce5-9abe-ec53e23552ed] Started...
24 08:01:12, coins::eth::wallet_connect:244] INFO target: WalletConnect: sign-and-send, get_gas_price…
+--- 24 08:01:14 -------
| (0:08) [swap uuid=50adb3d2-681e-4ce5-9abe-ec53e23552ed] Negotiated...
24 08:01:16, coins::eth::wallet_connect:262] INFO target: WalletConnect: sign-and-send, signing and sending tx
24 08:01:16, kdf_walletconnect:422] INFO [b8cbfba89d1b9c2e374c1bd892d63f9baea5910efe3c18a1e927c973015b8d7b] Publishing message=Request(Request { id: MessageId(446157638789123), jsonrpc: "2.0", params: SessionRequest(SessionRequestRequest { request: Request { method: "eth_sendTransaction", params: Array [Object {"nonce": String("0x2"), "from": String("0xa2eb1ea222163eb1c62d3bca74e99b57b3ac4743"), "gasLimit": String("0x5208"), "value": String("0x1a56333a2258f"), "data": String("0x"), "gasPrice": String("0x685556941"), "to": String("0xd8997941dd1346e9231118d5685d866294f59e5b")}], expiry: None }, chain_id: "eip155:137" }) })
24 08:01:17, kdf_walletconnect:444] INFO [b8cbfba89d1b9c2e374c1bd892d63f9baea5910efe3c18a1e927c973015b8d7b] Message published successfully
+--- 24 08:01:38 -------
| (0:33) [swap uuid=50adb3d2-681e-4ce5-9abe-ec53e23552ed] Negotiated...
+--- 24 08:02:02 -------
| (0:57) [swap uuid=50adb3d2-681e-4ce5-9abe-ec53e23552ed] Negotiated...
+--- 24 08:02:26 -------
| (1:21) [swap uuid=50adb3d2-681e-4ce5-9abe-ec53e23552ed] Negotiated...
+--- 24 08:02:51 -------
| (1:45) [swap uuid=50adb3d2-681e-4ce5-9abe-ec53e23552ed] Negotiated...
+--- 24 08:03:15 -------
| (2:09) [swap uuid=50adb3d2-681e-4ce5-9abe-ec53e23552ed] Negotiated...
+--- 24 08:03:39 -------
| (2:33) [swap uuid=50adb3d2-681e-4ce5-9abe-ec53e23552ed] Negotiated...
+--- 24 08:04:03 -------
| (2:57) [swap uuid=50adb3d2-681e-4ce5-9abe-ec53e23552ed] Negotiated...
+--- 24 08:04:27 -------
| (3:21) [swap uuid=50adb3d2-681e-4ce5-9abe-ec53e23552ed] Negotiated...
24 08:04:35, kdf_walletconnect::connection_handler:81] INFO WalletConnect disconnected with message: Some("Disconnecting for load balancing reasons (4010)"). Attempting to reconnect...
24 08:04:36, kdf_walletconnect::connection_handler:85] INFO Reconnection process complete.
+--- 24 08:04:51 -------
| (3:45) [swap uuid=50adb3d2-681e-4ce5-9abe-ec53e23552ed] Negotiated...
+--- 24 08:05:15 -------
| (4:09) [swap uuid=50adb3d2-681e-4ce5-9abe-ec53e23552ed] Negotiated...
+--- 24 08:05:39 -------
| (4:33) [swap uuid=50adb3d2-681e-4ce5-9abe-ec53e23552ed] Negotiated...
+--- 24 08:06:03 -------
| (4:58) [swap uuid=50adb3d2-681e-4ce5-9abe-ec53e23552ed] Negotiated...
24 08:06:17, mm2_main::lp_swap::taker_swap:506] ERROR [swap uuid=50adb3d2-681e-4ce5-9abe-ec53e23552ed] TakerFeeSendFailed(SwapError { error: "taker_swap:1337] mm2src/coins/eth/wallet_connect.rs:263] wallet_connect:136] lib:630] WalletConnectError(TimeoutError)" })
· 2025-03-24 16:06:17 +0800 [swap uuid=50adb3d2-681e-4ce5-9abe-ec53e23552ed] Finished

@borngraced
Copy link
Member Author

For the EVM/WalletConnect side of things, I'm able to connect, activate coin and withdraw funds - but am failing to complete a swap. Do both swap participants (and seednode) need to be running this branch?

Error logs for swap attempts:

· 2025-03-24 15:54:24 +0800 [] lp_ordermatch:3302] Entering the taker_swap_loop KMD/MATIC with uuid: e60783fe-b1a3-45b3-b6d8-6b373e85d25e
· 2025-03-24 15:54:34 +0800 [] taker_swap:831] Taker swap e60783fe-b1a3-45b3-b6d8-6b373e85d25e has successfully started
+--- 24 07:54:35 -------
| (0:00) [swap uuid=e60783fe-b1a3-45b3-b6d8-6b373e85d25e] Started...
24 07:54:42, coins::eth::wallet_connect:244] INFO target: WalletConnect: sign-and-send, get_gas_price…
+--- 24 07:54:43 -------
| (0:09) [swap uuid=e60783fe-b1a3-45b3-b6d8-6b373e85d25e] Negotiated...
24 07:54:46, coins::eth::wallet_connect:262] INFO target: WalletConnect: sign-and-send, signing and sending tx
24 07:54:46, kdf_walletconnect:422] INFO [b8cbfba89d1b9c2e374c1bd892d63f9baea5910efe3c18a1e927c973015b8d7b] Publishing message=Request(Request { id: MessageId(446157538861826), jsonrpc: "2.0", params: SessionRequest(SessionRequestRequest { request: Request { method: "eth_sendTransaction", params: Array [Object {"nonce": String("0x1"), "from": String("0xa2eb1ea222163eb1c62d3bca74e99b57b3ac4743"), "gasLimit": String("0x5208"), "value": String("0xd2b199d112c7"), "data": String("0x"), "gasPrice": String("0x686d43ed9"), "to": String("0xd8997941dd1346e9231118d5685d866294f59e5b")}], expiry: None }, chain_id: "eip155:137" }) })
24 07:54:46, kdf_walletconnect:444] INFO [b8cbfba89d1b9c2e374c1bd892d63f9baea5910efe3c18a1e927c973015b8d7b] Message published successfully
+--- 24 07:56:44 -------
| (2:09) [swap uuid=e60783fe-b1a3-45b3-b6d8-6b373e85d25e] Negotiated...
+--- 24 07:57:08 -------
| (2:33) [swap uuid=e60783fe-b1a3-45b3-b6d8-6b373e85d25e] Negotiated...
+--- 24 07:57:32 -------
| (2:57) [swap uuid=e60783fe-b1a3-45b3-b6d8-6b373e85d25e] Negotiated...
+--- 24 07:57:56 -------
| (3:22) [swap uuid=e60783fe-b1a3-45b3-b6d8-6b373e85d25e] Negotiated...
24 07:58:12, kdf_walletconnect::connection_handler:81] INFO WalletConnect disconnected with message: Some("Disconnecting for load balancing reasons (4010)"). Attempting to reconnect...
24 07:58:13, kdf_walletconnect::connection_handler:85] INFO Reconnection process complete.
+--- 24 07:58:20 -------
| (3:46) [swap uuid=e60783fe-b1a3-45b3-b6d8-6b373e85d25e] Negotiated...
+--- 24 07:58:44 -------
| (4:10) [swap uuid=e60783fe-b1a3-45b3-b6d8-6b373e85d25e] Negotiated...
+--- 24 07:59:08 -------
| (4:34) [swap uuid=e60783fe-b1a3-45b3-b6d8-6b373e85d25e] Negotiated...
+--- 24 07:59:32 -------
| (4:58) [swap uuid=e60783fe-b1a3-45b3-b6d8-6b373e85d25e] Negotiated...
24 07:59:46, mm2_main::lp_swap::taker_swap:506] ERROR [swap uuid=e60783fe-b1a3-45b3-b6d8-6b373e85d25e] TakerFeeSendFailed(SwapError { error: "taker_swap:1337] mm2src/coins/eth/wallet_connect.rs:263] wallet_connect:136] lib:630] WalletConnectError(TimeoutError)" })
· 2025-03-24 15:59:46 +0800 [swap uuid=e60783fe-b1a3-45b3-b6d8-6b373e85d25e] Finished


· 2025-03-24 16:00:55 +0800 [] lp_ordermatch:3302] Entering the taker_swap_loop KMD/MATIC with uuid: 50adb3d2-681e-4ce5-9abe-ec53e23552ed
· 2025-03-24 16:01:05 +0800 [] taker_swap:831] Taker swap 50adb3d2-681e-4ce5-9abe-ec53e23552ed has successfully started
+--- 24 08:01:06 -------
| (0:00) [swap uuid=50adb3d2-681e-4ce5-9abe-ec53e23552ed] Started...
24 08:01:12, coins::eth::wallet_connect:244] INFO target: WalletConnect: sign-and-send, get_gas_price…
+--- 24 08:01:14 -------
| (0:08) [swap uuid=50adb3d2-681e-4ce5-9abe-ec53e23552ed] Negotiated...
24 08:01:16, coins::eth::wallet_connect:262] INFO target: WalletConnect: sign-and-send, signing and sending tx
24 08:01:16, kdf_walletconnect:422] INFO [b8cbfba89d1b9c2e374c1bd892d63f9baea5910efe3c18a1e927c973015b8d7b] Publishing message=Request(Request { id: MessageId(446157638789123), jsonrpc: "2.0", params: SessionRequest(SessionRequestRequest { request: Request { method: "eth_sendTransaction", params: Array [Object {"nonce": String("0x2"), "from": String("0xa2eb1ea222163eb1c62d3bca74e99b57b3ac4743"), "gasLimit": String("0x5208"), "value": String("0x1a56333a2258f"), "data": String("0x"), "gasPrice": String("0x685556941"), "to": String("0xd8997941dd1346e9231118d5685d866294f59e5b")}], expiry: None }, chain_id: "eip155:137" }) })
24 08:01:17, kdf_walletconnect:444] INFO [b8cbfba89d1b9c2e374c1bd892d63f9baea5910efe3c18a1e927c973015b8d7b] Message published successfully
+--- 24 08:01:38 -------
| (0:33) [swap uuid=50adb3d2-681e-4ce5-9abe-ec53e23552ed] Negotiated...
+--- 24 08:02:02 -------
| (0:57) [swap uuid=50adb3d2-681e-4ce5-9abe-ec53e23552ed] Negotiated...
+--- 24 08:02:26 -------
| (1:21) [swap uuid=50adb3d2-681e-4ce5-9abe-ec53e23552ed] Negotiated...
+--- 24 08:02:51 -------
| (1:45) [swap uuid=50adb3d2-681e-4ce5-9abe-ec53e23552ed] Negotiated...
+--- 24 08:03:15 -------
| (2:09) [swap uuid=50adb3d2-681e-4ce5-9abe-ec53e23552ed] Negotiated...
+--- 24 08:03:39 -------
| (2:33) [swap uuid=50adb3d2-681e-4ce5-9abe-ec53e23552ed] Negotiated...
+--- 24 08:04:03 -------
| (2:57) [swap uuid=50adb3d2-681e-4ce5-9abe-ec53e23552ed] Negotiated...
+--- 24 08:04:27 -------
| (3:21) [swap uuid=50adb3d2-681e-4ce5-9abe-ec53e23552ed] Negotiated...
24 08:04:35, kdf_walletconnect::connection_handler:81] INFO WalletConnect disconnected with message: Some("Disconnecting for load balancing reasons (4010)"). Attempting to reconnect...
24 08:04:36, kdf_walletconnect::connection_handler:85] INFO Reconnection process complete.
+--- 24 08:04:51 -------
| (3:45) [swap uuid=50adb3d2-681e-4ce5-9abe-ec53e23552ed] Negotiated...
+--- 24 08:05:15 -------
| (4:09) [swap uuid=50adb3d2-681e-4ce5-9abe-ec53e23552ed] Negotiated...
+--- 24 08:05:39 -------
| (4:33) [swap uuid=50adb3d2-681e-4ce5-9abe-ec53e23552ed] Negotiated...
+--- 24 08:06:03 -------
| (4:58) [swap uuid=50adb3d2-681e-4ce5-9abe-ec53e23552ed] Negotiated...
24 08:06:17, mm2_main::lp_swap::taker_swap:506] ERROR [swap uuid=50adb3d2-681e-4ce5-9abe-ec53e23552ed] TakerFeeSendFailed(SwapError { error: "taker_swap:1337] mm2src/coins/eth/wallet_connect.rs:263] wallet_connect:136] lib:630] WalletConnectError(TimeoutError)" })
· 2025-03-24 16:06:17 +0800 [swap uuid=50adb3d2-681e-4ce5-9abe-ec53e23552ed] Finished

message was sent to wallet successfully but did you approve the sign request from your wallet? @smk762

@smk762
Copy link

smk762 commented Mar 24, 2025

Yes, approved both times. Third attempt progressed a little further (new WC session, same swap kickstarting), but then failed towards the end (after clicking confirm button in react wallet)

| (5:43) [swap uuid=dacf571a-0a19-4e4f-bf4a-1ccbb6ddce69] Maker payment validated and confirmed...
+--- 24 08:34:38 -------
| (6:07) [swap uuid=dacf571a-0a19-4e4f-bf4a-1ccbb6ddce69] Maker payment validated and confirmed...
24 08:34:54, mm2_main::lp_swap::taker_swap:506] ERROR [swap uuid=dacf571a-0a19-4e4f-bf4a-1ccbb6ddce69] TakerPaymentTransactionFailed(SwapError { error: "taker_swap:1717] mm2src/coins/eth/wallet_connect.rs:263] wallet_connect:136] lib:630] WalletConnectError(TimeoutError)" })
· 2025-03-24 16:34:54 +0800 [swap uuid=dacf571a-0a19-4e4f-bf4a-1ccbb6ddce69] Finished

@smk762
Copy link

smk762 commented Mar 24, 2025

wc_delete_session times out when session listed in wc_get_sessions response, but not show in https://whiskey-charlie.battlefield.earth/sessions (or equivalent). Ideally, the session list should be the same on both. If deleted via the react wallet, there seems to be no way to delete it from KDF, potentially leading to KDF methods failing attempting to get a response from sessions no longer active externally.

24 08:48:03, kdf_walletconnect:422] INFO [5967a1c960a7da4b6c8b6a21d5d83998a1f95e3e1027099986d055324fbfe9f4] Publishing message=Request(Request { id: MessageId(446158357474312), jsonrpc: "2.0", params: SessionDelete(SessionDeleteRequest { code: 6000, message: "User Disconnected" }) })
24 08:48:04, kdf_walletconnect:444] INFO [5967a1c960a7da4b6c8b6a21d5d83998a1f95e3e1027099986d055324fbfe9f4] Message published successfully

@smk762
Copy link

smk762 commented Mar 25, 2025

Thanks, session delete works like a charm now!

Using metamask app, was able to:

  • initate a session (params must be for eip155:1 only. Subsequent network switching is handled by app).
  • activate MATIC (must be selected as active network in app, otherwise ChainId not supported: eip155:137 error.
  • perform an atomic swap (two in app confirmations required)

Attempting to withdraw a token (USDC-PLG20) returned the following error:

{
    "mmrpc": "2.0",
    "error": "Signing error UnSuccessfulResponse Error: ErrorResponse { id: MessageId(446186146665731), jsonrpc: \"2.0\", error: ErrorData { code: 5000, message: \"{\\\"code\\\":-32004,\\\"message\\\":\\\"Method not supported.\\\"}\", data: None } }",
    "error_path": "eth_withdraw.wallet_connect.inbound_message",
    "error_trace": "eth_withdraw:336] wallet_connect:109] inbound_message:86]",
    "error_type": "SigningError",
    "error_data": "UnSuccessfulResponse Error: ErrorResponse { id: MessageId(446186146665731), jsonrpc: \"2.0\", error: ErrorData { code: 5000, message: \"{\\\"code\\\":-32004,\\\"message\\\":\\\"Method not supported.\\\"}\", data: None } }",
    "id": null
}

and in console logs:

25 14:57:15, kdf_walletconnect:422] INFO [e178803f58e0a73c04956712c155ade28351274cd766425d3a9c9f038455fa65] Publishing message=Request(Request { id: MessageId(446186146665731), jsonrpc: "2.0", params: SessionRequest(SessionRequestRequest { request: Request { method: "eth_signTransaction", params: Array [Object {"chainId": String("137"), "nonce": String("0x2"), "from": String("0x23f1828f7b994c082ff8e977e4ebe1390415f39c"), "gasLimit": String("0xb17f"), "value": String("0x0"), "data": String("0xa9059cbb000000000000000000000000ab95d01bc8214e4d993043e8ca1b68db2c94649800000000000000000000000000000000000000000000000000000000000186a0"), "gasPrice": String("0x63946c9e8"), "to": String("0xab95d01bc8214e4d993043e8ca1b68db2c946498")}], expiry: None }, chain_id: "eip155:137" }) })
25 14:57:15, kdf_walletconnect:444] INFO [e178803f58e0a73c04956712c155ade28351274cd766425d3a9c9f038455fa65] Message published successfully
25 14:57:18, kdf_walletconnect:294] INFO [e178803f58e0a73c04956712c155ade28351274cd766425d3a9c9f038455fa65] Inbound message payload={"id":446186146665731,"jsonrpc":"2.0","error":{"code":5000,"message":"{\"code\":-32004,\"message\":\"Method not supported.\"}"}}
25 14:57:18, mm2_main::rpc::dispatcher:128] ERROR RPC error response: eth_withdraw:336] wallet_connect:109] inbound_message:86] Signing error UnSuccessfulResponse Error: ErrorResponse { id: MessageId(446186146665731), jsonrpc: "2.0", error: ErrorData { code: 5000, message: "{\"code\":-32004,\"message\":\"Method not supported.\"}", data: None } }

A subsequent attempt to withdraw MATIC via metamask also failed with the same message.

Withdrawal attempts for MATIC/USDC-PLG20 using walletconnect (react example) also failed, but with a different error:

{
    "mmrpc": "2.0",
    "error": "Signing error UnSuccessfulResponse Error: ErrorResponse { id: MessageId(446186266251779), jsonrpc: \"2.0\", error: ErrorData { code: -32000, message: \"invalid transaction.chainId (argument=\\\"transaction\\\", value={\\\"chainId\\\":\\\"137\\\",\\\"nonce\\\":\\\"0x7\\\",\\\"gasLimit\\\":\\\"0xb0dc\\\",\\\"value\\\":\\\"0x0\\\",\\\"data\\\":\\\"0xa9059cbb000000000000000000000000ab95d01bc8214e4d993043e8ca1b68db2c94649800000000000000000000000000000000000000000000000000000000000186a0\\\",\\\"gasPrice\\\":\\\"0x63941e81d\\\",\\\"to\\\":\\\"0xab95d01bc8214e4d993043e8ca1b68db2c946498\\\"}, code=INVALID_ARGUMENT, version=transactions/5.7.0)\", data: None } }",
    "error_path": "eth_withdraw.wallet_connect.inbound_message",
    "error_trace": "eth_withdraw:336] wallet_connect:109] inbound_message:86]",
    "error_type": "SigningError",
    "error_data": "UnSuccessfulResponse Error: ErrorResponse { id: MessageId(446186266251779), jsonrpc: \"2.0\", error: ErrorData { code: -32000, message: \"invalid transaction.chainId (argument=\\\"transaction\\\", value={\\\"chainId\\\":\\\"137\\\",\\\"nonce\\\":\\\"0x7\\\",\\\"gasLimit\\\":\\\"0xb0dc\\\",\\\"value\\\":\\\"0x0\\\",\\\"data\\\":\\\"0xa9059cbb000000000000000000000000ab95d01bc8214e4d993043e8ca1b68db2c94649800000000000000000000000000000000000000000000000000000000000186a0\\\",\\\"gasPrice\\\":\\\"0x63941e81d\\\",\\\"to\\\":\\\"0xab95d01bc8214e4d993043e8ca1b68db2c946498\\\"}, code=INVALID_ARGUMENT, version=transactions/5.7.0)\", data: None } }",
    "id": null
}

With console errors:

25 15:05:02, kdf_walletconnect:422] INFO [0f9216d9204155198c4f0d28fee329de090fc89193d3733eb79d1ddb5aede403] Publishing message=Request(Request { id: MessageId(446186266251779), jsonrpc: "2.0", params: SessionRequest(SessionRequestRequest { request: Request { method: "eth_signTransaction", params: Array [Object {"chainId": String("137"), "nonce": String("0x7"), "from": String("0xa2eb1ea222163eb1c62d3bca74e99b57b3ac4743"), "gasLimit": String("0xb0dc"), "value": String("0x0"), "data": String("0xa9059cbb000000000000000000000000ab95d01bc8214e4d993043e8ca1b68db2c94649800000000000000000000000000000000000000000000000000000000000186a0"), "gasPrice": String("0x63941e81d"), "to": String("0xab95d01bc8214e4d993043e8ca1b68db2c946498")}], expiry: None }, chain_id: "eip155:137" }) })
25 15:05:02, kdf_walletconnect:444] INFO [0f9216d9204155198c4f0d28fee329de090fc89193d3733eb79d1ddb5aede403] Message published successfully
25 15:05:30, kdf_walletconnect:294] INFO [0f9216d9204155198c4f0d28fee329de090fc89193d3733eb79d1ddb5aede403] Inbound message payload={"id":446186266251779,"jsonrpc":"2.0","error":{"code":-32000,"message":"invalid transaction.chainId (argument=\"transaction\", value={\"chainId\":\"137\",\"nonce\":\"0x7\",\"gasLimit\":\"0xb0dc\",\"value\":\"0x0\",\"data\":\"0xa9059cbb000000000000000000000000ab95d01bc8214e4d993043e8ca1b68db2c94649800000000000000000000000000000000000000000000000000000000000186a0\",\"gasPrice\":\"0x63941e81d\",\"to\":\"0xab95d01bc8214e4d993043e8ca1b68db2c946498\"}, code=INVALID_ARGUMENT, version=transactions/5.7.0)"}}
25 15:05:30, mm2_main::rpc::dispatcher:128] ERROR RPC error response: eth_withdraw:336] wallet_connect:109] inbound_message:86] Signing error UnSuccessfulResponse Error: ErrorResponse { id: MessageId(446186266251779), jsonrpc: "2.0", error: ErrorData { code: -32000, message: "invalid transaction.chainId (argument=\"transaction\", value={\"chainId\":\"137\",\"nonce\":\"0x7\",\"gasLimit\":\"0xb0dc\",\"value\":\"0x0\",\"data\":\"0xa9059cbb000000000000000000000000ab95d01bc8214e4d993043e8ca1b68db2c94649800000000000000000000000000000000000000000000000000000000000186a0\",\"gasPrice\":\"0x63941e81d\",\"to\":\"0xab95d01bc8214e4d993043e8ca1b68db2c946498\"}, code=INVALID_ARGUMENT, version=transactions/5.7.0)", data: None } }

@borngraced
Copy link
Member Author

borngraced commented Mar 25, 2025

Thanks, session delete works like a charm now!

Using metamask app, was able to:

  • initate a session (params must be for eip155:1 only. Subsequent network switching is handled by app).
  • activate MATIC (must be selected as active network in app, otherwise ChainId not supported: eip155:137 error.
  • perform an atomic swap (two in app confirmations required)

Attempting to withdraw a token (USDC-PLG20) returned the following error:

{
    "mmrpc": "2.0",
    "error": "Signing error UnSuccessfulResponse Error: ErrorResponse { id: MessageId(446186146665731), jsonrpc: \"2.0\", error: ErrorData { code: 5000, message: \"{\\\"code\\\":-32004,\\\"message\\\":\\\"Method not supported.\\\"}\", data: None } }",
    "error_path": "eth_withdraw.wallet_connect.inbound_message",
    "error_trace": "eth_withdraw:336] wallet_connect:109] inbound_message:86]",
    "error_type": "SigningError",
    "error_data": "UnSuccessfulResponse Error: ErrorResponse { id: MessageId(446186146665731), jsonrpc: \"2.0\", error: ErrorData { code: 5000, message: \"{\\\"code\\\":-32004,\\\"message\\\":\\\"Method not supported.\\\"}\", data: None } }",
    "id": null
}

and in console logs:

25 14:57:15, kdf_walletconnect:422] INFO [e178803f58e0a73c04956712c155ade28351274cd766425d3a9c9f038455fa65] Publishing message=Request(Request { id: MessageId(446186146665731), jsonrpc: "2.0", params: SessionRequest(SessionRequestRequest { request: Request { method: "eth_signTransaction", params: Array [Object {"chainId": String("137"), "nonce": String("0x2"), "from": String("0x23f1828f7b994c082ff8e977e4ebe1390415f39c"), "gasLimit": String("0xb17f"), "value": String("0x0"), "data": String("0xa9059cbb000000000000000000000000ab95d01bc8214e4d993043e8ca1b68db2c94649800000000000000000000000000000000000000000000000000000000000186a0"), "gasPrice": String("0x63946c9e8"), "to": String("0xab95d01bc8214e4d993043e8ca1b68db2c946498")}], expiry: None }, chain_id: "eip155:137" }) })
25 14:57:15, kdf_walletconnect:444] INFO [e178803f58e0a73c04956712c155ade28351274cd766425d3a9c9f038455fa65] Message published successfully
25 14:57:18, kdf_walletconnect:294] INFO [e178803f58e0a73c04956712c155ade28351274cd766425d3a9c9f038455fa65] Inbound message payload={"id":446186146665731,"jsonrpc":"2.0","error":{"code":5000,"message":"{\"code\":-32004,\"message\":\"Method not supported.\"}"}}
25 14:57:18, mm2_main::rpc::dispatcher:128] ERROR RPC error response: eth_withdraw:336] wallet_connect:109] inbound_message:86] Signing error UnSuccessfulResponse Error: ErrorResponse { id: MessageId(446186146665731), jsonrpc: "2.0", error: ErrorData { code: 5000, message: "{\"code\":-32004,\"message\":\"Method not supported.\"}", data: None } }

A subsequent attempt to withdraw MATIC via metamask also failed with the same message.

Withdrawal attempts for MATIC/USDC-PLG20 using walletconnect (react example) also failed, but with a different error:

{
    "mmrpc": "2.0",
    "error": "Signing error UnSuccessfulResponse Error: ErrorResponse { id: MessageId(446186266251779), jsonrpc: \"2.0\", error: ErrorData { code: -32000, message: \"invalid transaction.chainId (argument=\\\"transaction\\\", value={\\\"chainId\\\":\\\"137\\\",\\\"nonce\\\":\\\"0x7\\\",\\\"gasLimit\\\":\\\"0xb0dc\\\",\\\"value\\\":\\\"0x0\\\",\\\"data\\\":\\\"0xa9059cbb000000000000000000000000ab95d01bc8214e4d993043e8ca1b68db2c94649800000000000000000000000000000000000000000000000000000000000186a0\\\",\\\"gasPrice\\\":\\\"0x63941e81d\\\",\\\"to\\\":\\\"0xab95d01bc8214e4d993043e8ca1b68db2c946498\\\"}, code=INVALID_ARGUMENT, version=transactions/5.7.0)\", data: None } }",
    "error_path": "eth_withdraw.wallet_connect.inbound_message",
    "error_trace": "eth_withdraw:336] wallet_connect:109] inbound_message:86]",
    "error_type": "SigningError",
    "error_data": "UnSuccessfulResponse Error: ErrorResponse { id: MessageId(446186266251779), jsonrpc: \"2.0\", error: ErrorData { code: -32000, message: \"invalid transaction.chainId (argument=\\\"transaction\\\", value={\\\"chainId\\\":\\\"137\\\",\\\"nonce\\\":\\\"0x7\\\",\\\"gasLimit\\\":\\\"0xb0dc\\\",\\\"value\\\":\\\"0x0\\\",\\\"data\\\":\\\"0xa9059cbb000000000000000000000000ab95d01bc8214e4d993043e8ca1b68db2c94649800000000000000000000000000000000000000000000000000000000000186a0\\\",\\\"gasPrice\\\":\\\"0x63941e81d\\\",\\\"to\\\":\\\"0xab95d01bc8214e4d993043e8ca1b68db2c946498\\\"}, code=INVALID_ARGUMENT, version=transactions/5.7.0)\", data: None } }",
    "id": null
}

With console errors:

25 15:05:02, kdf_walletconnect:422] INFO [0f9216d9204155198c4f0d28fee329de090fc89193d3733eb79d1ddb5aede403] Publishing message=Request(Request { id: MessageId(446186266251779), jsonrpc: "2.0", params: SessionRequest(SessionRequestRequest { request: Request { method: "eth_signTransaction", params: Array [Object {"chainId": String("137"), "nonce": String("0x7"), "from": String("0xa2eb1ea222163eb1c62d3bca74e99b57b3ac4743"), "gasLimit": String("0xb0dc"), "value": String("0x0"), "data": String("0xa9059cbb000000000000000000000000ab95d01bc8214e4d993043e8ca1b68db2c94649800000000000000000000000000000000000000000000000000000000000186a0"), "gasPrice": String("0x63941e81d"), "to": String("0xab95d01bc8214e4d993043e8ca1b68db2c946498")}], expiry: None }, chain_id: "eip155:137" }) })
25 15:05:02, kdf_walletconnect:444] INFO [0f9216d9204155198c4f0d28fee329de090fc89193d3733eb79d1ddb5aede403] Message published successfully
25 15:05:30, kdf_walletconnect:294] INFO [0f9216d9204155198c4f0d28fee329de090fc89193d3733eb79d1ddb5aede403] Inbound message payload={"id":446186266251779,"jsonrpc":"2.0","error":{"code":-32000,"message":"invalid transaction.chainId (argument=\"transaction\", value={\"chainId\":\"137\",\"nonce\":\"0x7\",\"gasLimit\":\"0xb0dc\",\"value\":\"0x0\",\"data\":\"0xa9059cbb000000000000000000000000ab95d01bc8214e4d993043e8ca1b68db2c94649800000000000000000000000000000000000000000000000000000000000186a0\",\"gasPrice\":\"0x63941e81d\",\"to\":\"0xab95d01bc8214e4d993043e8ca1b68db2c946498\"}, code=INVALID_ARGUMENT, version=transactions/5.7.0)"}}
25 15:05:30, mm2_main::rpc::dispatcher:128] ERROR RPC error response: eth_withdraw:336] wallet_connect:109] inbound_message:86] Signing error UnSuccessfulResponse Error: ErrorResponse { id: MessageId(446186266251779), jsonrpc: "2.0", error: ErrorData { code: -32000, message: "invalid transaction.chainId (argument=\"transaction\", value={\"chainId\":\"137\",\"nonce\":\"0x7\",\"gasLimit\":\"0xb0dc\",\"value\":\"0x0\",\"data\":\"0xa9059cbb000000000000000000000000ab95d01bc8214e4d993043e8ca1b68db2c94649800000000000000000000000000000000000000000000000000000000000186a0\",\"gasPrice\":\"0x63941e81d\",\"to\":\"0xab95d01bc8214e4d993043e8ca1b68db2c946498\"}, code=INVALID_ARGUMENT, version=transactions/5.7.0)", data: None } }

Metamask doesn't allow eth_signTransaction for security reasons instead we can only use eth_sendTransaction for initiating txs. The given transaction will be signed and broadcasted by Metamask.

So if you want to withdraw with Metamask connected set the broadcast option like this

{
	"userpass": "password",
	"method": "withdraw",
	"mmrpc": "2.0",
	"params": {
		"to": "0x4A434d26fC9cACd44AaCEe20aedC70023E91ad80",
		"coin": "ETH",
		"amount": "0.001",
		"broadcast": true
	}
}

Withdrawal attempts for MATIC/USDC-PLG20 using walletconnect (react example) also failed, but with a different error:

This was fixed already.

@smk762
Copy link

smk762 commented Mar 26, 2025

I was able to send a tx via metamask with the broadcast: true param, tho for token transfers it does not appear to be functioning as expected.

Req:

{
    "userpass": "{{userpass}}",
    "mmrpc": "2.0",
    "method": "withdraw",
    "params": {
        "coin": "USDC-PLG20",
        "to": "0xaB95D01Bc8214E4D993043E8Ca1B68dB2c946498",
        "amount": 0.1,
        "broadcast": true
    }

}

Resp:

{
    "mmrpc": "2.0",
    "result": {
        "tx_hex": "02f8b281890285067fb0cc4285067fb0cc4282550294ab95d01bc8214e4d993043e8ca1b68db2c94649880b844a9059cbb000000000000000000000000ab95d01bc8214e4d993043e8ca1b68db2c94649800000000000000000000000000000000000000000000000000000000000186a0c001a0e5d3aeaae6dd45af9c12a06b6ed22d9055e22bcd78268d0656faa3d5584d4983a05187bb0df209626cd8c510c39c782d5b3f9dd34c016ad525929924224323399d",
        "tx_hash": "0420c781d60ab514d975688b548e18506e43d9491f5800308e276e34dd575c4f",
        "from": [
            "0x23f1828F7B994C082Ff8e977e4ebE1390415F39c"
        ],
        "to": [
            "0xaB95D01Bc8214E4D993043E8Ca1B68dB2c946498"
        ],
        "total_amount": "0.1",
        "spent_by_me": "0.1",
        "received_by_me": "0",
        "my_balance_change": "-0.1",
        "block_height": 0,
        "timestamp": 1742952340,
        "fee_details": {
            "type": "Eth",
            "coin": "MATIC",
            "gas": 45276,
            "gas_price": "0.000000027912096834",
            "max_fee_per_gas": null,
            "max_priority_fee_per_gas": null,
            "total_fee": "0.001263748096256184"
        },
        "coin": "USDC-PLG20",
        "internal_id": "",
        "transaction_type": "StandardTransfer",
        "memo": null
    },
    "id": null
}

Console logs:

26 01:24:36, kdf_walletconnect:422] INFO [8c1d30dd2ba975329b03b390ff5540681f374a9ac5bea1afa3900242006c28e8] Publishing message=Request(Request { id: MessageId(446195782900485), jsonrpc: "2.0", params: SessionRequest(SessionRequestRequest { request: Request { method: "personal_sign", params: Array [String("0x41757468656e7469636174652077697468204b6f6d6f64656669"), String("0x23f1828f7b994c082ff8e977e4ebe1390415f39c")], expiry: None }, chain_id: "eip155:137" }) })
26 01:24:37, kdf_walletconnect:444] INFO [8c1d30dd2ba975329b03b390ff5540681f374a9ac5bea1afa3900242006c28e8] Message published successfully
26 01:24:46, kdf_walletconnect:294] INFO [8c1d30dd2ba975329b03b390ff5540681f374a9ac5bea1afa3900242006c28e8] Inbound message payload={"id":446195782900485,"jsonrpc":"2.0","result":"0x9ee9cb85ebb0df249a1389c6a87d90286a7732ddd357ec74d97e63ef4bf17625293f4f79276385b3a03906983eeb9f2e5c4e8e78997d6604c72560a72b7281151c"}


26 01:25:11, kdf_walletconnect:422] INFO [8c1d30dd2ba975329b03b390ff5540681f374a9ac5bea1afa3900242006c28e8] Publishing message=Request(Request { id: MessageId(446195791840774), jsonrpc: "2.0", params: SessionRequest(SessionRequestRequest { request: Request { method: "eth_sendTransaction", params: Array [Object {"chainId": Number(137), "nonce": String("0x2"), "from": String("0x23f1828f7b994c082ff8e977e4ebe1390415f39c"), "gasLimit": String("0xb0dc"), "value": String("0x0"), "data": String("0xa9059cbb000000000000000000000000ab95d01bc8214e4d993043e8ca1b68db2c94649800000000000000000000000000000000000000000000000000000000000186a0"), "gasPrice": String("0x67fb0cc42"), "to": String("0xab95d01bc8214e4d993043e8ca1b68db2c946498")}], expiry: None }, chain_id: "eip155:137" }) })
26 01:25:12, kdf_walletconnect:444] INFO [8c1d30dd2ba975329b03b390ff5540681f374a9ac5bea1afa3900242006c28e8] Message published successfully
26 01:25:35, kdf_walletconnect:294] INFO [8c1d30dd2ba975329b03b390ff5540681f374a9ac5bea1afa3900242006c28e8] Inbound message payload={"id":446195791840774,"jsonrpc":"2.0","result":"0x0420c781d60ab514d975688b548e18506e43d9491f5800308e276e34dd575c4f"}

Explorer links:

A tx to pay gas for the token transfer looks like it happened, but there is no token transfer recorded on chain. Incidentally, when confirming tx in metamask app, it showed amount in sats - so token xfer might have been rejected due to lack of funds.

A non-token transfer of MATIC itself completed as expected:

https://polygonscan.com/tx/0x062fc218a48a4df7715024bdc8614e82aed9b889c2768cae5a188ec546da0fa0

26 01:38:30, kdf_walletconnect:422] INFO [8c1d30dd2ba975329b03b390ff5540681f374a9ac5bea1afa3900242006c28e8] Publishing message=Request(Request { id: MessageId(446195996354055), jsonrpc: "2.0", params: SessionRequest(SessionRequestRequest { request: Request { method: "eth_sendTransaction", params: Array [Object {"chainId": Number(137), "nonce": String("0x3"), "from": String("0x23f1828f7b994c082ff8e977e4ebe1390415f39c"), "gasLimit": String("0x5208"), "value": String("0x1aa535d3d0c0000"), "data": String("0x"), "gasPrice": String("0x66a2ae5e0"), "to": String("0xab95d01bc8214e4d993043e8ca1b68db2c946498")}], expiry: None }, chain_id: "eip155:137" }) })
26 01:38:31, kdf_walletconnect:444] INFO [8c1d30dd2ba975329b03b390ff5540681f374a9ac5bea1afa3900242006c28e8] Message published successfully
26 01:38:58, kdf_walletconnect:294] INFO [8c1d30dd2ba975329b03b390ff5540681f374a9ac5bea1afa3900242006c28e8] Inbound message payload={"id":446195996354055,"jsonrpc":"2.0","result":"0x062fc218a48a4df7715024bdc8614e82aed9b889c2768cae5a188ec546da0fa0"}

Retesting withdrawal via WC react wallet, using "broadcast": true:

Console logs:

26 01:45:54, kdf_walletconnect:422] INFO [15b3efcbf3e596fbe154846dd6b8e904d6ec8e25d23ac889057b4505e4eb4c68] Publishing message=Request(Request { id: MessageId(446196109965313), jsonrpc: "2.0", params: SessionRequest(SessionRequestRequest { request: Request { method: "eth_sendTransaction", params: Array [Object {"chainId": Number(137), "nonce": String("0x7"), "from": String("0xa2eb1ea222163eb1c62d3bca74e99b57b3ac4743"), "gasLimit": String("0x5208"), "value": String("0x11c37937e080000"), "data": String("0x"), "gasPrice": String("0x668911722"), "to": String("0xab95d01bc8214e4d993043e8ca1b68db2c946498")}], expiry: None }, chain_id: "eip155:137" }) })
26 01:45:55, kdf_walletconnect:444] INFO [15b3efcbf3e596fbe154846dd6b8e904d6ec8e25d23ac889057b4505e4eb4c68] Message published successfully
26 01:46:19, kdf_walletconnect:294] INFO [15b3efcbf3e596fbe154846dd6b8e904d6ec8e25d23ac889057b4505e4eb4c68] Inbound message payload={"id":446196109965313,"jsonrpc":"2.0","result":"0xa1dd11c9c1240e24e162e22bf8f45f26b94ca6c6c00f4948eb1cf0553a6d5efb"}

26 01:48:15, kdf_walletconnect:422] INFO [15b3efcbf3e596fbe154846dd6b8e904d6ec8e25d23ac889057b4505e4eb4c68] Publishing message=Request(Request { id: MessageId(446196146043906), jsonrpc: "2.0", params: SessionRequest(SessionRequestRequest { request: Request { method: "eth_sendTransaction", params: Array [Object {"chainId": Number(137), "nonce": String("0x8"), "from": String("0xa2eb1ea222163eb1c62d3bca74e99b57b3ac4743"), "gasLimit": String("0xb0dc"), "value": String("0x0"), "data": String("0xa9059cbb000000000000000000000000ab95d01bc8214e4d993043e8ca1b68db2c9464980000000000000000000000000000000000000000000000000000000000013880"), "gasPrice": String("0x66851e002"), "to": String("0xab95d01bc8214e4d993043e8ca1b68db2c946498")}], expiry: None }, chain_id: "eip155:137" }) })
26 01:48:15, kdf_walletconnect:444] INFO [15b3efcbf3e596fbe154846dd6b8e904d6ec8e25d23ac889057b4505e4eb4c68] Message published successfully

26 01:48:35, kdf_walletconnect:294] INFO [15b3efcbf3e596fbe154846dd6b8e904d6ec8e25d23ac889057b4505e4eb4c68] Inbound message payload={"id":446196146043906,"jsonrpc":"2.0","result":"0x9ac76247b0588a95ab24c6dc326b453cb01721e5ef242eb26af2118e7e54f00d"}

@smk762
Copy link

smk762 commented Mar 26, 2025

USDC-PLG20 / KMD swap completed successfully with React walletconnect example.

Swap uuid: c20c7d29-838a-4276-aecb-7a2415ea9e21

Transactions

Event Block Time
Taker dex fee / Taker pays dex fee in USDC-PLG20 69512019 Mar-26-2025 06:11:07 AM UTC
Maker payment / Maker funds swap address with KMD 4367766 Mar-26-2025 06:18:21 AM UTC
Taker approves contract to spend USDC-PLG20 69512241 Mar-26-2025 06:18:59 AM UTC
Taker payment / Taker funds swap contract with USDC-PLG20 69512273 Mar-26-2025 06:20:07 AM UTC
Taker payment spent / Maker receives USDC-PLG20 69512300 Mar-26-2025 06:21:03 AM UTC
Maker payment spent / Taker receives KMD 4367770 Mar-26-2025 06:23:17 AM UTC

@smk762
Copy link

smk762 commented Mar 26, 2025

In metamask, initate a session (params must be for eip155:1 only. Subsequent network switching is handled by app).

This is incorrect: For metamask, only one EIP155 chain ID can be used in wc_new_connection params, and it must be the EIP155 chain ID of the network currently active in app. Subsequent chain switching is handled by the app.

@smk762
Copy link

smk762 commented Mar 26, 2025

Logs for failed Metamask swap (failed due to low battery / screen sleep)

· 2025-03-26 15:53:54 +0800 [] lp_ordermatch:3302] Entering the taker_swap_loop KMD/USDC-PLG20 with uuid: 6ed8dcfb-d60d-4b9b-87ad-e7640fb141bc
· 2025-03-26 15:54:09 +0800 [] taker_swap:831] Taker swap 6ed8dcfb-d60d-4b9b-87ad-e7640fb141bc has successfully started
+--- 26 07:54:10 -------
| (0:00) [swap uuid=6ed8dcfb-d60d-4b9b-87ad-e7640fb141bc] Started...
26 07:54:12, coins::eth::wallet_connect:246] INFO target: WalletConnect: sign-and-send, get_gas_price…
26 07:54:16, coins::eth::wallet_connect:265] INFO target: WalletConnect: sign-and-send, signing and sending tx
26 07:54:16, kdf_walletconnect:422] INFO [87b9cf9dd31f574e160b961937557114cba5e7132b02acbed8e8f9a4a3c6c6c3] Publishing message=Request(Request { id: MessageId(446201768089348), jsonrpc: "2.0", params: SessionRequest(SessionRequestRequest { request: Request { method: "eth_sendTransaction", params: Array [Object {"chainId": Number(137), "nonce": String("0x4"), "from": String("0x23f1828f7b994c082ff8e977e4ebe1390415f39c"), "gasLimit": String("0xd6d8"), "value": String("0x0"), "data": String("0xa9059cbb000000000000000000000000d8997941dd1346e9231118d5685d866294f59e5b0000000000000000000000000000000000000000000000000000000000000073"), "gasPrice": String("0x609447e17"), "to": String("0x3c499c542cef5e3811e1192ce70d8cc03d5c3359")}], expiry: None }, chain_id: "eip155:137" }) })
26 07:54:17, kdf_walletconnect:444] INFO [87b9cf9dd31f574e160b961937557114cba5e7132b02acbed8e8f9a4a3c6c6c3] Message published successfully
+--- 26 07:54:18 -------
| (0:08) [swap uuid=6ed8dcfb-d60d-4b9b-87ad-e7640fb141bc] Negotiated...

APPROVED (approval request shows 0.00012 USDC; correct units and ticker)

26 07:55:08, kdf_walletconnect:294] INFO [87b9cf9dd31f574e160b961937557114cba5e7132b02acbed8e8f9a4a3c6c6c3] Inbound message payload={"id":446201768089348,"jsonrpc":"2.0","result":"0xff27d8f9018588d7c451c52603ca48016606533bbf1323a4a83d355b4af0a3e4"}
26 07:55:16, kdf_walletconnect::connection_handler:81] INFO WalletConnect disconnected with message: Some("Disconnecting for load balancing reasons (4010)"). Attempting to reconnect...
26 07:55:18, kdf_walletconnect::connection_handler:85] INFO Reconnection process complete.
26 07:55:20, mm2_main::lp_swap::taker_swap:1343] INFO Taker fee tx hash ff27d8f9018588d7c451c52603ca48016606533bbf1323a4a83d355b4af0a3e4
+--- 26 07:55:20 -------
| (1:11) [swap uuid=6ed8dcfb-d60d-4b9b-87ad-e7640fb141bc] Taker fee sent...
26 07:55:21, mm2_main::lp_swap::taker_swap:1427] INFO Got maker payment 7bda1b6f78aacfdccf3ca2e62deaa0bfd466f916ec3ddc26f7df6cec1feba2fc
26 07:55:21, mm2_main::lp_swap::taker_swap:1440] INFO Before wait confirm
26 07:55:21, coins::utxo::rpc_clients:130] INFO Waiting for tx 7bda1b6f78aacfdccf3ca2e62deaa0bfd466f916ec3ddc26f7df6cec1feba2fc confirmations, now 0, required 1, requires_notarization false

| (1:43) [swap uuid=6ed8dcfb-d60d-4b9b-87ad-e7640fb141bc] Maker payment wait confirm started...
26 07:56:08, mm2_main::lp_swap::taker_swap:1458] INFO After wait confirm
+--- 26 07:56:09 -------
| (1:59) [swap uuid=6ed8dcfb-d60d-4b9b-87ad-e7640fb141bc] Maker payment validated and confirmed...
26 07:56:20, coins::eth::wallet_connect:246] INFO target: WalletConnect: sign-and-send, get_gas_price…
26 07:56:24, coins::eth::wallet_connect:265] INFO target: WalletConnect: sign-and-send, signing and sending tx
26 07:56:24, kdf_walletconnect:422] INFO [87b9cf9dd31f574e160b961937557114cba5e7132b02acbed8e8f9a4a3c6c6c3] Publishing message=Request(Request { id: MessageId(446201800816133), jsonrpc: "2.0", params: SessionRequest(SessionRequestRequest { request: Request { method: "eth_sendTransaction", params: Array [Object {"chainId": Number(137), "nonce": String("0x5"), "from": String("0x23f1828f7b994c082ff8e977e4ebe1390415f39c"), "gasLimit": String("0xdb67"), "value": String("0x0"), "data": String("0x095ea7b30000000000000000000000009130b257d37a52e52f21054c4da3450c72f595ceffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"), "gasPrice": String("0x609447e2b"), "to": String("0x3c499c542cef5e3811e1192ce70d8cc03d5c3359")}], expiry: None }, chain_id: "eip155:137" }) })
26 07:56:24, kdf_walletconnect:444] INFO [87b9cf9dd31f574e160b961937557114cba5e7132b02acbed8e8f9a4a3c6c6c3] Message published successfully
+--- 26 07:56:33 -------

APPROVED: Spending cap in approval set to very high number (higher than balance or trade value)!

| (1:43) [swap uuid=6ed8dcfb-d60d-4b9b-87ad-e7640fb141bc] Maker payment wait confirm started...
26 07:56:08, mm2_main::lp_swap::taker_swap:1458] INFO After wait confirm
+--- 26 07:56:09 -------
| (1:59) [swap uuid=6ed8dcfb-d60d-4b9b-87ad-e7640fb141bc] Maker payment validated and confirmed...
26 07:56:20, coins::eth::wallet_connect:246] INFO target: WalletConnect: sign-and-send, get_gas_price…
26 07:56:24, coins::eth::wallet_connect:265] INFO target: WalletConnect: sign-and-send, signing and sending tx
26 07:56:24, kdf_walletconnect:422] INFO [87b9cf9dd31f574e160b961937557114cba5e7132b02acbed8e8f9a4a3c6c6c3] Publishing message=Request(Request { id: MessageId(446201800816133), jsonrpc: "2.0", params: SessionRequest(SessionRequestRequest { request: Request { method: "eth_sendTransaction", params: Array [Object {"chainId": Number(137), "nonce": String("0x5"), "from": String("0x23f1828f7b994c082ff8e977e4ebe1390415f39c"), "gasLimit": String("0xdb67"), "value": String("0x0"), "data": String("0x095ea7b30000000000000000000000009130b257d37a52e52f21054c4da3450c72f595ceffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"), "gasPrice": String("0x609447e2b"), "to": String("0x3c499c542cef5e3811e1192ce70d8cc03d5c3359")}], expiry: None }, chain_id: "eip155:137" }) })
26 07:56:24, kdf_walletconnect:444] INFO [87b9cf9dd31f574e160b961937557114cba5e7132b02acbed8e8f9a4a3c6c6c3] Message published successfully
+--- 26 07:56:33 -------

+--- 26 07:58:57 -------
| (4:47) [swap uuid=6ed8dcfb-d60d-4b9b-87ad-e7640fb141bc] Maker payment validated and confirmed...
26 07:58:58, coins::eth::wallet_connect:246] INFO target: WalletConnect: sign-and-send, get_gas_price…
26 07:59:02, coins::eth::wallet_connect:265] INFO target: WalletConnect: sign-and-send, signing and sending tx
26 07:59:02, kdf_walletconnect:422] INFO [87b9cf9dd31f574e160b961937557114cba5e7132b02acbed8e8f9a4a3c6c6c3] Publishing message=Request(Request { id: MessageId(446201841352710), jsonrpc: "2.0", params: SessionRequest(SessionRequestRequest { request: Request { method: "eth_sendTransaction", params: Array [Object {"chainId": Number(137), "nonce": String("0x6"), "from": String("0x23f1828f7b994c082ff8e977e4ebe1390415f39c"), "gasLimit": String("0x1adb0"), "value": String("0x0"), "data": String("0x9b415b2a3db0f7ad196da079bf850c150090add6baa16a597872bc6e6683b4e58dfba28d00000000000000000000000000000000000000000000000000000000000186a00000000000000000000000003c499c542cef5e3811e1192ce70d8cc03d5c3359000000000000000000000000229e3418c6477073a7cb3cc8b0faf4c4a8843bcb4e2bbc465de822e3763dca8c8e20b47c54a136ca0000000000000000000000000000000000000000000000000000000000000000000000000000000067e3d118"), "gasPrice": String("0x609447e42"), "to": String("0x9130b257d37a52e52f21054c4da3450c72f595ce")}], expiry: None }, chain_id: "eip155:137" }) })
26 07:59:03, kdf_walletconnect:444] INFO [87b9cf9dd31f574e160b961937557114cba5e7132b02acbed8e8f9a4a3c6c6c3] Message published successfully
+--- 26 07:59:21 -------
| (5:12) [swap uuid=6ed8dcfb-d60d-4b9b-87ad-e7640fb141bc] Maker payment validated and confirmed...

NOT APPROVED: phone screen went dark, and approval pop up disappeared when re-activated. Dont do this on 5% battery kids.

| (4:47) [swap uuid=6ed8dcfb-d60d-4b9b-87ad-e7640fb141bc] Maker payment validated and confirmed...
26 07:58:58, coins::eth::wallet_connect:246] INFO target: WalletConnect: sign-and-send, get_gas_price…
26 07:59:02, coins::eth::wallet_connect:265] INFO target: WalletConnect: sign-and-send, signing and sending tx
26 07:59:02, kdf_walletconnect:422] INFO [87b9cf9dd31f574e160b961937557114cba5e7132b02acbed8e8f9a4a3c6c6c3] Publishing message=Request(Request { id: MessageId(446201841352710), jsonrpc: "2.0", params: SessionRequest(SessionRequestRequest { request: Request { method: "eth_sendTransaction", params: Array [Object {"chainId": Number(137), "nonce": String("0x6"), "from": String("0x23f1828f7b994c082ff8e977e4ebe1390415f39c"), "gasLimit": String("0x1adb0"), "value": String("0x0"), "data": String("0x9b415b2a3db0f7ad196da079bf850c150090add6baa16a597872bc6e6683b4e58dfba28d00000000000000000000000000000000000000000000000000000000000186a00000000000000000000000003c499c542cef5e3811e1192ce70d8cc03d5c3359000000000000000000000000229e3418c6477073a7cb3cc8b0faf4c4a8843bcb4e2bbc465de822e3763dca8c8e20b47c54a136ca0000000000000000000000000000000000000000000000000000000000000000000000000000000067e3d118"), "gasPrice": String("0x609447e42"), "to": String("0x9130b257d37a52e52f21054c4da3450c72f595ce")}], expiry: None }, chain_id: "eip155:137" }) })
26 07:59:03, kdf_walletconnect:444] INFO [87b9cf9dd31f574e160b961937557114cba5e7132b02acbed8e8f9a4a3c6c6c3] Message published successfully
+--- 26 07:59:21 -------
| (5:12) [swap uuid=6ed8dcfb-d60d-4b9b-87ad-e7640fb141bc] Maker payment validated and confirmed...
26 07:59:42, kdf_walletconnect:294] INFO [87b9cf9dd31f574e160b961937557114cba5e7132b02acbed8e8f9a4a3c6c6c3] Inbound message payload={"id":446201841352710,"jsonrpc":"2.0","error":{"code":5000,"message":"MetaMask Tx Signature: User denied transaction signature."}}
26 07:59:42, mm2_main::lp_swap::taker_swap:506] ERROR [swap uuid=6ed8dcfb-d60d-4b9b-87ad-e7640fb141bc] TakerPaymentTransactionFailed(SwapError { error: "taker_swap:1717] mm2src/coins/eth/wallet_connect.rs:266] wallet_connect:138] inbound_message:86] WalletConnectError(UnSuccessfulResponse(\"ErrorResponse { id: MessageId(446201841352710), jsonrpc: \\\"2.0\\\", error: ErrorData { code: 5000, message: \\\"MetaMask Tx Signature: User denied transaction signature.\\\", data: None } }\"))" })
+--- 26 07:59:42 -------
| (5:33) [swap uuid=6ed8dcfb-d60d-4b9b-87ad-e7640fb141bc] Finished
· 2025-03-26 15:59:43 +0800 [swap uuid=6ed8dcfb-d60d-4b9b-87ad-e7640fb141bc] Finished

Worth noting here that unlike the USDC-PLG20 withdraw request approval confirmation pop up, in this case the units and coin ticker are correct.

In terms of UX, the approval which concerns a "spending cap" of a huge number may be met with suspicion.

A second metamask swap attempt (with phone plugged into charger) was successful (uuid: 045c1e43-4082-4bdd-bf2d-bb9027adcd5a)

@smk762
Copy link

smk762 commented Mar 26, 2025

USDC-PLG20 withdraw still fails. When using params:

{
    "userpass": "{{userpass}}",
    "mmrpc": "2.0",
    "method": "withdraw",
    "params": {
        "coin": "USDC-PLG20",
        "to": "0xaB95D01Bc8214E4D993043E8Ca1B68dB2c946498",
        "amount": 0.762,
        "broadcast": true
    }
}

Metamask app approval pop up requests confirmation for 762000 ERC20 (wrong units, wrong ticker).

App implies successful transfer, and logs show no errors:

26 08:10:13, kdf_walletconnect:422] INFO [87b9cf9dd31f574e160b961937557114cba5e7132b02acbed8e8f9a4a3c6c6c3] Publishing message=Request(Request { id: MessageId(446202013025801), jsonrpc: "2.0", params: SessionRequest(SessionRequestRequest { request: Request { method: "eth_sendTransaction", params: Array [Object {"chainId": Number(137), "nonce": String("0x8"), "from": String("0x23f1828f7b994c082ff8e977e4ebe1390415f39c"), "gasLimit": String("0xb0dc"), "value": String("0x0"), "data": String("0xa9059cbb000000000000000000000000ab95d01bc8214e4d993043e8ca1b68db2c94649800000000000000000000000000000000000000000000000000000000000ba090"), "gasPrice": String("0x609447e21"), "to": String("0xab95d01bc8214e4d993043e8ca1b68db2c946498")}], expiry: None }, chain_id: "eip155:137" }) })
26 08:10:13, kdf_walletconnect:444] INFO [87b9cf9dd31f574e160b961937557114cba5e7132b02acbed8e8f9a4a3c6c6c3] Message published successfully
26 08:12:04, kdf_walletconnect:294] INFO [87b9cf9dd31f574e160b961937557114cba5e7132b02acbed8e8f9a4a3c6c6c3] Inbound message payload={"id":446202013025801,"jsonrpc":"2.0","result":"0x53ab39f4c7146a9bd72753cdcd32df4e91a40c73dfd74dcb6ec48d3dedcac6fe"}

Reviewing transaction on block explorer shows no movement of USDC-PLG20: https://polygonscan.com/tx/0x53ab39f4c7146a9bd72753cdcd32df4e91a40c73dfd74dcb6ec48d3dedcac6fe


A withdrawal through metamask for MATIC (POL) showed the correct unit and ticker. and completed successfully.

26 08:16:09, kdf_walletconnect:422] INFO [87b9cf9dd31f574e160b961937557114cba5e7132b02acbed8e8f9a4a3c6c6c3] Publishing message=Request(Request { id: MessageId(446202104113418), jsonrpc: "2.0", params: SessionRequest(SessionRequestRequest { request: Request { method: "eth_sendTransaction", params: Array [Object {"chainId": Number(137), "nonce": String("0x9"), "from": String("0x23f1828f7b994c082ff8e977e4ebe1390415f39c"), "gasLimit": String("0x5208"), "value": String("0x16345785d8a0000"), "data": String("0x"), "gasPrice": String("0x6076c8f7b"), "to": String("0xab95d01bc8214e4d993043e8ca1b68db2c946498")}], expiry: None }, chain_id: "eip155:137" }) })
26 08:16:09, kdf_walletconnect:444] INFO [87b9cf9dd31f574e160b961937557114cba5e7132b02acbed8e8f9a4a3c6c6c3] Message published successfully
26 08:16:46, kdf_walletconnect:294] INFO [87b9cf9dd31f574e160b961937557114cba5e7132b02acbed8e8f9a4a3c6c6c3] Inbound message payload={"id":446202104113418,"jsonrpc":"2.0","result":"0xf8a2c8152ae9be8b860df859a69dd1506729b19e78f93bba48c62c9f1d0a504c"}

https://polygonscan.com/tx/0xf8a2c8152ae9be8b860df859a69dd1506729b19e78f93bba48c62c9f1d0a504c

@smk762
Copy link

smk762 commented Mar 26, 2025

Confirmed token withdrawals now functional on WC and metamask.
Only tendermint testing remains

@smk762
Copy link

smk762 commented Mar 27, 2025

Testing tendermint via Keplr mobile wallet:

  • app accepted connection, and was approved:
{
	"method": "wc_new_connection",
	"userpass": "{{userpass}}",
	"mmrpc": "2.0",
	"params": {
		"required_namespaces": {
			"cosmos": {
				"chains": [
					"cosmos:cosmoshub-4"
				],
				"methods": [
					"cosmos_signDirect",
					"cosmos_signAmino",
					"cosmos_getAccounts"
				],
				"events": []
			}
		}
	}
}

Get Sessions shows an unexpected null value under chains


            {
                "topic": "5845bd43bcd151214a9fdc114d09bd8db495dec59994b16dc493faa922c87f14",
                "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": "31f60345f4f008a1e183639c17809c4ef32e1b6205fa0b57bb5897717eeb0537",
                "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": 1743675982
            }

Attempting to activate ATOM in KDF fails.
Req:

{
    "userpass": "{{userpass}}",
    "method": "enable_tendermint_with_assets",
    "mmrpc": "2.0",
    "params": {
        "ticker": "ATOM",
        "tx_history": true,
        "get_balances": true,
        "activation_params": {
            "wallet_connect": {
                "session_topic": "{{session_topic}}"
            }
        },
        "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/"
            }
        ],
        "tokens_params": []
    }
}

Resp:

{
    "mmrpc": "2.0",
    "error": "Error on platform coin ATOM creation: Unable to fetch chain account from WalletConnect. Please try again or reconnect your session - ChainId not supported: cosmos:cosmoshub-4",
    "error_path": "platform_coin_with_tokens.tendermint_with_assets_activation.lib",
    "error_trace": "platform_coin_with_tokens:454] tendermint_with_assets_activation:242] lib:510]",
    "error_type": "PlatformCoinCreationError",
    "error_data": {
        "ticker": "ATOM",
        "error": "Unable to fetch chain account from WalletConnect. Please try again or reconnect your session - ChainId not supported: cosmos:cosmoshub-4"
    },
    "id": null
}

Related console logs for this session:

27 10:25:46, kdf_walletconnect:250] INFO [31f60345f4f008a1e183639c17809c4ef32e1b6205fa0b57bb5897717eeb0537] Subscribing to topic
27 10:25:46, kdf_walletconnect:261] INFO [31f60345f4f008a1e183639c17809c4ef32e1b6205fa0b57bb5897717eeb0537] Subscribed to topic
27 10:25:46, kdf_walletconnect:422] INFO [31f60345f4f008a1e183639c17809c4ef32e1b6205fa0b57bb5897717eeb0537] Publishing message=Request(Request { id: MessageId(446226213533697), jsonrpc: "2.0", params: SessionPropose(SessionProposeRequest { relays: [Relay { protocol: "irn", data: None }], proposer: Proposer { public_key: "525ca7aff07ec802109045150807dc741defc03539d11df628be23974cafa17c", metadata: Metadata { description: "WallectConnect Komodefi Framework Playground", url: "http://127.0.0.1:3000", icons: ["https://avatars.githubusercontent.com/u/21276113?s=200&v=4"], name: "Komodefi Framework" } }, required_namespaces: ProposeNamespaces({"cosmos": ProposeNamespace { chains: {"cosmos:cosmoshub-4"}, methods: {"cosmos_getAccounts", "cosmos_signAmino", "cosmos_signDirect"}, events: {} }}), optional_namespaces: Some(ProposeNamespaces({})) }) })
27 10:25:47, kdf_walletconnect:444] INFO [31f60345f4f008a1e183639c17809c4ef32e1b6205fa0b57bb5897717eeb0537] Message published successfully
27 10:26:23, kdf_walletconnect:294] INFO [31f60345f4f008a1e183639c17809c4ef32e1b6205fa0b57bb5897717eeb0537] Inbound message payload={"id":446226213533697,"jsonrpc":"2.0","result":{"relay":{"protocol":"irn"},"responderPublicKey":"3b4ebb3bc6881fb650c6529082a98ffb5b0188ccbc81067f1ab9e8b3ba630635"}}
27 10:26:24, kdf_walletconnect:294] INFO [5845bd43bcd151214a9fdc114d09bd8db495dec59994b16dc493faa922c87f14] Inbound message payload={"id":1743071182918619,"jsonrpc":"2.0","method":"wc_sessionSettle","params":{"relay":{"protocol":"irn"},"namespaces":{"cosmos":{"accounts":["cosmos:cosmoshub-4:cosmos1nf4dhvs93paezh5gj3k7zz3tcs5wldx3sqz4cw"],"methods":["cosmos_getAccounts","cosmos_signDirect","cosmos_signAmino","keplr_getKey","keplr_signAmino","keplr_signDirect","keplr_signArbitrary","keplr_enable","keplr_signEthereum","keplr_experimentalSuggestChain","keplr_suggestToken"],"events":["accountsChanged","chainChanged","keplr_accountsChanged"]}},"requiredNamespaces":{"cosmos":{"chains":["cosmos:cosmoshub-4"],"methods":["cosmos_getAccounts","cosmos_signAmino","cosmos_signDirect"],"events":[]}},"optionalNamespaces":{},"pairingTopic":"31f60345f4f008a1e183639c17809c4ef32e1b6205fa0b57bb5897717eeb0537","controller":{"publicKey":"3b4ebb3bc6881fb650c6529082a98ffb5b0188ccbc81067f1ab9e8b3ba630635","metadata":{"name":"Keplr","description":"Your Wallet for the Interchain","url":"https://www.keplr.app","icons":["https://asset-icons.s3.us-west-2.amazonaws.com/keplr_512.png"]}},"expiry":1743675982,"sessionProperties":{"keys":"[{\"chainId\":\"cosmoshub-4\",\"name\":\"smk\",\"algo\":\"secp256k1\",\"pubKey\":\"Ayp3NdOwVdLeALPNq8H/tH0yMFsw30v30kBrTtM/rUXY\",\"address\":\"mmrbsgWIe5FeiJRt4QorxCjvtNE=\",\"bech32Address\":\"cosmos1nf4dhvs93paezh5gj3k7zz3tcs5wldx3sqz4cw\",\"ethereumHexAddress\":\"0x9A6AdBb205887b915E88946dE10a2bC428efb4d1\",\"isNanoLedger\":false,\"isKeystone\":false}]"}}}
27 10:26:25, kdf_walletconnect::session::rpc::settle:77] INFO [5845bd43bcd151214a9fdc114d09bd8db495dec59994b16dc493faa922c87f14] Session successfully settled for topic
27 10:26:46, mm2_main::rpc::dispatcher:128] ERROR RPC error response: platform_coin_with_tokens:454] tendermint_with_assets_activation:242] lib:510] Error on platform coin ATOM creation: Unable to fetch chain account from WalletConnect. Please try again or reconnect your session - ChainId not supported: cosmos:cosmoshub-4

Unable to proceed with further cosmos testing until activation succeeds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.5.0-beta priority: high Important tasks that need attention soon. status: pending review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants