From d44acb262f04909e61cdd93e23757a31825041cf Mon Sep 17 00:00:00 2001 From: Yakov Litvin Date: Mon, 8 Jul 2024 19:24:14 +0300 Subject: [PATCH] index.md: remove type casting with the current version of @ton/ton (13.11.2 in my case), client.open infers the return type by itself --- 03-client/index.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/03-client/index.md b/03-client/index.md index e6bd16a..9505a9d 100644 --- a/03-client/index.md +++ b/03-client/index.md @@ -165,7 +165,7 @@ network:testnet --- ```ts import { getHttpEndpoint } from '@orbs-network/ton-access'; -import { TonClient } from "@ton/ton"; +import { TonClient } from '@ton/ton'; import { useAsyncInitialize } from './useAsyncInitialize'; export function useTonClient() { @@ -185,7 +185,7 @@ network:mainnet --- ```ts import { getHttpEndpoint } from '@orbs-network/ton-access'; -import { TonClient } from "@ton/ton"; +import { TonClient } from '@ton/ton'; import { useAsyncInitialize } from './useAsyncInitialize'; export function useTonClient() { @@ -220,7 +220,7 @@ export function useCounterContract() { const contract = new Counter( Address.parse('EQBYLTm4nsvoqJRvs_L-IGNKwWs5RKe19HBK_lFadf19FUfb') // replace with your address from tutorial 2 step 8 ); - return client.open(contract) as OpenedContract; + return client.open(contract); }, [client]); useEffect(() => { @@ -341,7 +341,7 @@ export function useCounterContract() { const contract = new Counter( Address.parse('EQBYLTm4nsvoqJRvs_L-IGNKwWs5RKe19HBK_lFadf19FUfb') // replace with your address from tutorial 2 step 8 ); - return client.open(contract) as OpenedContract; + return client.open(contract); }, [client]); useEffect(() => {