From ccf3a4e2c59410802b384dee59e296fcd8c12b1c Mon Sep 17 00:00:00 2001 From: ZZ Date: Thu, 31 Oct 2024 23:14:23 +0800 Subject: [PATCH] Update subscribing-events.md (#591) wallet.publicKey is not a function --- content/cookbook/development/subscribing-events.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/cookbook/development/subscribing-events.md b/content/cookbook/development/subscribing-events.md index 2fc52b7f2..fc498b188 100644 --- a/content/cookbook/development/subscribing-events.md +++ b/content/cookbook/development/subscribing-events.md @@ -35,7 +35,7 @@ import { clusterApiUrl, Connection, Keypair } from "@solana/web3.js"; // Register a callback to listen to the wallet (ws subscription) connection.onAccountChange( - wallet.publicKey(), + wallet.publicKey, (updatedAccountInfo, context) => console.log("Updated account info: ", updatedAccountInfo), "confirmed",