Skip to content

Commit

Permalink
fix: removed reliance on caip-api dependency as it uses the now dep…
Browse files Browse the repository at this point in the history
…recated blockchain-api
  • Loading branch information
Gancho Radkov committed Jan 3, 2024
1 parent 54d4027 commit 844c782
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 37 deletions.
1 change: 0 additions & 1 deletion examples/dapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
19 changes: 4 additions & 15 deletions examples/dapp/src/contexts/ClientContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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);
};

Expand Down
21 changes: 0 additions & 21 deletions examples/dapp/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 844c782

Please sign in to comment.