diff --git a/examples/dapp/package.json b/examples/dapp/package.json index 252225d..d3aa215 100644 --- a/examples/dapp/package.json +++ b/examples/dapp/package.json @@ -36,7 +36,6 @@ "@walletconnect/utils": "2.10.3", "axios": "^0.21.1", "blockies-ts": "^1.0.0", - "caip-api": "^2.0.0-beta.1", "cosmos-wallet": "^1.1.0", "eth-sig-util": "^2.5.3", "ethereumjs-util": "^7.0.6", diff --git a/examples/dapp/src/contexts/ClientContext.tsx b/examples/dapp/src/contexts/ClientContext.tsx index eb67b88..1e02303 100644 --- a/examples/dapp/src/contexts/ClientContext.tsx +++ b/examples/dapp/src/contexts/ClientContext.tsx @@ -8,7 +8,6 @@ import { useState, } from "react"; -import { apiGetChainNamespace, ChainsMap } from "caip-api"; import { PairingTypes, SessionTypes } from "@walletconnect/types"; import { EthereumProvider } from "@walletconnect/ethereum-provider"; import type IEthereumProvider from "@walletconnect/ethereum-provider"; @@ -79,20 +78,10 @@ export function ClientContextProvider({ children }: { children: ReactNode | Reac const loadChainData = async () => { const namespaces = getAllChainNamespaces(); - const chainData: ChainNamespaces = {}; - await Promise.all( - namespaces.map(async (namespace) => { - let chains: ChainsMap | undefined; - try { - chains = await apiGetChainNamespace(namespace); - } catch (e) { - // ignore error - } - if (typeof chains !== "undefined") { - chainData[namespace] = chains; - } - }), - ); + const namespace = namespaces[0]; + const chainData = { + [namespace]: EIP155Metadata, + }; setChainData(chainData); }; diff --git a/examples/dapp/yarn.lock b/examples/dapp/yarn.lock index 36e0c20..064d59e 100644 --- a/examples/dapp/yarn.lock +++ b/examples/dapp/yarn.lock @@ -1880,13 +1880,6 @@ "@jridgewell/resolve-uri" "3.1.0" "@jridgewell/sourcemap-codec" "1.4.14" -"@json-rpc-tools/types@^2.0.0-beta.0": - version "2.0.0-beta.12" - resolved "https://registry.yarnpkg.com/@json-rpc-tools/types/-/types-2.0.0-beta.12.tgz#358f77c48a844a3f55169c2db3b35c6af1cf4e8b" - integrity sha512-UM8w0RnD4DjYql/HlThe051ivW2Q8ulWarr7ux5Aas1UsOmcGQEg4slQo46p+BXgh1Nth7SHWS2tVnW/UUnCwQ== - dependencies: - keyvaluestorage-interface "^1.0.0" - "@lit-labs/ssr-dom-shim@^1.0.0", "@lit-labs/ssr-dom-shim@^1.1.0": version "1.1.1" resolved "https://registry.yarnpkg.com/@lit-labs/ssr-dom-shim/-/ssr-dom-shim-1.1.1.tgz#64df34e2f12e68e78ac57e571d25ec07fa460ca9" @@ -4482,20 +4475,6 @@ cache-base@^1.0.1: union-value "^1.0.0" unset-value "^1.0.0" -caip-api@^2.0.0-beta.1: - version "2.0.0-beta.1" - resolved "https://registry.yarnpkg.com/caip-api/-/caip-api-2.0.0-beta.1.tgz#23877b880396f855fc2cd7892d02c597f2d62ba7" - integrity sha512-pwVXYfAIV3V0QhsKfvamIvsnn7lSmrotukmbXndOE2EsA0dos5W8MLadlpG2U+VSDghCVWI6cY9oJbBuXWj2gg== - dependencies: - "@json-rpc-tools/types" "^2.0.0-beta.0" - axios "^0.21.1" - caip "^0.9.2" - -caip@^0.9.2: - version "0.9.2" - resolved "https://registry.yarnpkg.com/caip/-/caip-0.9.2.tgz#6aec668e459dc3a1830530f7bb8d06f0044a5391" - integrity sha512-o4aIUSR9lkn7B9lIw8Xgkj+hDh+S1PtsBphoSqP2Dt95gRWPniaqEpnPwiUEhaPQr84JzWIEm4Cck3lMZtIkTA== - call-bind@^1.0.0, call-bind@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c"