From f247c8b1ac4867f3bdd145b2080b7b1d0c3cfc9c Mon Sep 17 00:00:00 2001 From: Alok Date: Mon, 21 Oct 2024 20:14:44 +0530 Subject: [PATCH] Fix: resolve type error in program initialization example (#577) Signed-off-by: alok8bb --- .../courses/onchain-development/intro-to-anchor-frontend.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/courses/onchain-development/intro-to-anchor-frontend.md b/content/courses/onchain-development/intro-to-anchor-frontend.md index c4ea5331e..f8048a458 100644 --- a/content/courses/onchain-development/intro-to-anchor-frontend.md +++ b/content/courses/onchain-development/intro-to-anchor-frontend.md @@ -414,10 +414,10 @@ const wallet = useAnchorWallet(); const provider = new AnchorProvider(connection, wallet, {}); setProvider(provider); -const program = new Program(idl as Idl) as Program; +const program = new Program(idl as CounterProgram); // we can also explicitly mention the provider -const program = new Program(idl as Idl, provider) as Program; +const program = new Program(idl as CounterProgram, provider); ``` ### Anchor `MethodsBuilder`