From 087c76b6ca0a3f1cd1d979e01b65f531c89ccb55 Mon Sep 17 00:00:00 2001 From: Maharshi Mishra Date: Fri, 15 Nov 2024 22:13:31 +0700 Subject: [PATCH] Fixed build issue --- .../sfa-web-ton-telegram-example/src/App.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/single-factor-auth-web/sfa-web-ton-telegram-example/src/App.tsx b/single-factor-auth-web/sfa-web-ton-telegram-example/src/App.tsx index f016f54b..60bd5066 100644 --- a/single-factor-auth-web/sfa-web-ton-telegram-example/src/App.tsx +++ b/single-factor-auth-web/sfa-web-ton-telegram-example/src/App.tsx @@ -5,7 +5,7 @@ import { EthereumPrivateKeyProvider } from "@web3auth/ethereum-provider"; import TonRPC from "./RPC/tonRpc"; import EthereumRPC from "./RPC/ethRPC-web3"; import SolanaRPC from "./RPC/solanaRPC"; -import type { IRPC } from "./RPC/IRPC"; +import type { IRPC, RPCResponse } from "./RPC/IRPC"; import { useLaunchParams, User } from "@telegram-apps/sdk-react"; import { useTelegramMock } from "./hooks/useMockTelegramInitData"; import { Sun, Moon, Copy, Check, ChevronDown } from "lucide-react"; @@ -450,7 +450,8 @@ function App() { // Add timeout to RPC calls const timeout = (ms: number) => new Promise((_, reject) => setTimeout(() => reject(new Error("Request timeout")), ms)); - const [addressResponse, messageResponse, balanceResponse] = await Promise.all([ + const [addressResponse, messageResponse, balanceResponse]: [RPCResponse, RPCResponse, RPCResponse] = + await Promise.all([ Promise.race([rpc.getAccounts(), timeout(10000)]), Promise.race([rpc.signMessage(`Hello from ${selectedChain}!`), timeout(10000)]), Promise.race([rpc.getBalance(), timeout(10000)]),