From 540a7775c435187b0842b53168dc854f1305fadc Mon Sep 17 00:00:00 2001 From: jinoosss Date: Mon, 11 Dec 2023 12:17:48 +0900 Subject: [PATCH] feat: [GSW-656] Change to JSON RPCProvider --- .../gnoswap-service-provider/GnoswapServiceProvider.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/web/src/providers/gnoswap-service-provider/GnoswapServiceProvider.tsx b/packages/web/src/providers/gnoswap-service-provider/GnoswapServiceProvider.tsx index 11b3690c2..c1b41e264 100644 --- a/packages/web/src/providers/gnoswap-service-provider/GnoswapServiceProvider.tsx +++ b/packages/web/src/providers/gnoswap-service-provider/GnoswapServiceProvider.tsx @@ -11,7 +11,7 @@ import { TokenRepositoryImpl } from "@repositories/token/token-repository-impl"; import { createContext, useEffect, useLayoutEffect, useMemo, useState } from "react"; import { useAtom } from "jotai"; import { CommonState, WalletState } from "@states/index"; -import { GnoJSONRPCProvider, GnoProvider, GnoWSProvider } from "@gnolang/gno-js-client"; +import { GnoJSONRPCProvider, GnoProvider } from "@gnolang/gno-js-client"; import { SwapRepositoryImpl } from "@repositories/swap/swap-repository-impl"; import ChainNetworkInfos from "@resources/chains.json"; import { SwapRouterRepository } from "@repositories/swap/swap-router-repository"; @@ -104,8 +104,7 @@ const GnoswapServiceProvider: React.FC = ({ const currentNetwork = network || ChainNetworkInfos.find(info => info.chainId === defaultChainId); if (currentNetwork) { try { - const provider = new GnoWSProvider(currentNetwork.wsUrl, 5 * 1000); - await provider.waitForOpenConnection(); + const provider = new GnoJSONRPCProvider(currentNetwork.rpcUrl); setRPCProvider(provider); return true; } catch (error) {