diff --git a/apps/deploy-web/src/context/CustomChainProvider/CustomChainProvider.tsx b/apps/deploy-web/src/context/CustomChainProvider/CustomChainProvider.tsx index 2276f50cd..aab7d8d1e 100644 --- a/apps/deploy-web/src/context/CustomChainProvider/CustomChainProvider.tsx +++ b/apps/deploy-web/src/context/CustomChainProvider/CustomChainProvider.tsx @@ -12,26 +12,13 @@ import { useChain } from "@cosmos-kit/react"; import { akash, akashSandbox, akashTestnet, assetLists } from "@src/chains"; import networkStore from "@src/store/networkStore"; import { customRegistry } from "@src/utils/customRegistry"; -import { useEffect, useState } from "react"; -import { CosmosMetamaskExtensionWallet } from "@cosmos-kit/cosmos-extension-metamask"; +import { wallets as metamask } from "@cosmos-kit/cosmos-extension-metamask"; type Props = { children: React.ReactNode; }; export function CustomChainProvider({ children }: Props) { - const [metamask, setMetamask] = useState([]); - - useEffect(() => { - import("@cosmos-kit/cosmos-extension-metamask").then(module => { - setMetamask(module.wallets); - }); - }, []); - - if (!metamask.length) { - return null; - } - return ( =0.32.3" } }, + "node_modules/@cosmos-kit/leap-metamask-cosmos-snap": { + "version": "0.12.2", + "resolved": "https://registry.npmjs.org/@cosmos-kit/leap-metamask-cosmos-snap/-/leap-metamask-cosmos-snap-0.12.2.tgz", + "integrity": "sha512-77IZ1wW5l7cGYJM6lnW3coGdDwIi5h2KWCvVk5O8ITYUPDnKahBZtkvoxPRFD9V2DZKTvWL1u/fY+1rOFJZ0aQ==", + "license": "SEE LICENSE IN LICENSE", + "dependencies": { + "@chain-registry/keplr": "1.68.2", + "@cosmos-kit/core": "^2.13.1", + "@leapwallet/cosmos-snap-provider": "0.1.26", + "@metamask/providers": "^11.1.1" + }, + "peerDependencies": { + "@cosmjs/amino": ">=0.32.3", + "@cosmjs/proto-signing": ">=0.32.3", + "cosmjs-types": ">=0.9.0" + } + }, + "node_modules/@cosmos-kit/leap-mobile": { + "version": "2.11.2", + "resolved": "https://registry.npmjs.org/@cosmos-kit/leap-mobile/-/leap-mobile-2.11.2.tgz", + "integrity": "sha512-KDMV88UgkS6rwJxp96lggfODKLtssjysFnQqrVfxVkCU6vj2FjqFWX9vCvnGNMWB5G91UU7SyMH5kA/iTWcwBA==", + "license": "SEE LICENSE IN LICENSE", + "dependencies": { + "@chain-registry/keplr": "1.68.2", + "@cosmos-kit/core": "^2.13.1", + "@cosmos-kit/walletconnect": "^2.10.1" + } + }, "node_modules/@cosmos-kit/react": { "version": "2.18.0", "resolved": "https://registry.npmjs.org/@cosmos-kit/react/-/react-2.18.0.tgz", @@ -6681,6 +6709,18 @@ "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" }, + "node_modules/@leapwallet/cosmos-snap-provider": { + "version": "0.1.26", + "resolved": "https://registry.npmjs.org/@leapwallet/cosmos-snap-provider/-/cosmos-snap-provider-0.1.26.tgz", + "integrity": "sha512-KqT4OTECINPZohosLkAzdYotzV5YYJwzg2r/GKKMv3ndIuiqom/9WCaEs9W3KzPaRe69rOZpjbFmcu0gB4PSww==", + "license": "(MIT-0 OR Apache-2.0)", + "dependencies": { + "@cosmjs/amino": "^0.32.0", + "@cosmjs/proto-signing": "^0.32.0", + "bignumber.js": "^9.1.2", + "long": "^5.2.3" + } + }, "node_modules/@ledgerhq/devices": { "version": "5.51.1", "license": "Apache-2.0", @@ -6722,6 +6762,51 @@ "version": "5.50.0", "license": "Apache-2.0" }, + "node_modules/@metamask/object-multiplex": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@metamask/object-multiplex/-/object-multiplex-1.3.0.tgz", + "integrity": "sha512-czcQeVYdSNtabd+NcYQnrM69MciiJyd1qvKH8WM2Id3C0ZiUUX5Xa/MK+/VUk633DBhVOwdNzAKIQ33lGyA+eQ==", + "license": "ISC", + "dependencies": { + "end-of-stream": "^1.4.4", + "once": "^1.4.0", + "readable-stream": "^2.3.3" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/@metamask/providers": { + "version": "11.1.2", + "resolved": "https://registry.npmjs.org/@metamask/providers/-/providers-11.1.2.tgz", + "integrity": "sha512-xjE4cKrGpKZjripkMKMStc0H4LXrWJPijfbaj1kKeDLVhRH2Yu3ZecV3iIhf1EIJePeA+Kx6Pcm7d0IVJ+ea7g==", + "license": "MIT", + "dependencies": { + "@metamask/object-multiplex": "^1.1.0", + "@metamask/safe-event-emitter": "^3.0.0", + "detect-browser": "^5.2.0", + "eth-rpc-errors": "^4.0.2", + "extension-port-stream": "^2.1.1", + "fast-deep-equal": "^3.1.3", + "is-stream": "^2.0.0", + "json-rpc-engine": "^6.1.0", + "json-rpc-middleware-stream": "^4.2.1", + "pump": "^3.0.0", + "webextension-polyfill": "^0.10.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@metamask/safe-event-emitter": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@metamask/safe-event-emitter/-/safe-event-emitter-3.1.1.tgz", + "integrity": "sha512-ihb3B0T/wJm1eUuArYP4lCTSEoZsClHhuWyfo/kMX3m/odpqNcPfsz5O2A3NT7dXCAgWPGDQGPqygCpgeniKMw==", + "license": "ISC", + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/@monaco-editor/loader": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/@monaco-editor/loader/-/loader-1.4.0.tgz", @@ -19998,6 +20083,15 @@ "node": ">= 0.6" } }, + "node_modules/eth-rpc-errors": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/eth-rpc-errors/-/eth-rpc-errors-4.0.3.tgz", + "integrity": "sha512-Z3ymjopaoft7JDoxZcEb3pwdGh7yiYMhOwm2doUt6ASXlMavpNlK6Cre0+IMl2VSGyEU9rkiperQhp5iRxn5Pg==", + "license": "MIT", + "dependencies": { + "fast-safe-stringify": "^2.0.6" + } + }, "node_modules/event-lite": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/event-lite/-/event-lite-0.1.3.tgz", @@ -20219,6 +20313,18 @@ "node": ">=0.10.0" } }, + "node_modules/extension-port-stream": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/extension-port-stream/-/extension-port-stream-2.1.1.tgz", + "integrity": "sha512-qknp5o5rj2J9CRKfVB8KJr+uXQlrojNZzdESUPhKYLXf97TPcGf6qWWKmpsNNtUyOdzFhab1ON0jzouNxHHvow==", + "license": "ISC", + "dependencies": { + "webextension-polyfill": ">=0.10.0 <1.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/external-editor": { "version": "3.1.0", "dev": true, @@ -24817,6 +24923,39 @@ "version": "2.3.1", "license": "MIT" }, + "node_modules/json-rpc-engine": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/json-rpc-engine/-/json-rpc-engine-6.1.0.tgz", + "integrity": "sha512-NEdLrtrq1jUZyfjkr9OCz9EzCNhnRyWtt1PAnvnhwy6e8XETS0Dtc+ZNCO2gvuAoKsIn2+vCSowXTYE4CkgnAQ==", + "license": "ISC", + "dependencies": { + "@metamask/safe-event-emitter": "^2.0.0", + "eth-rpc-errors": "^4.0.2" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/json-rpc-engine/node_modules/@metamask/safe-event-emitter": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@metamask/safe-event-emitter/-/safe-event-emitter-2.0.0.tgz", + "integrity": "sha512-/kSXhY692qiV1MXu6EeOZvg5nECLclxNXcKCxJ3cXQgYuRymRHpdx/t7JXfsK+JLjwA1e1c1/SBrlQYpusC29Q==", + "license": "ISC" + }, + "node_modules/json-rpc-middleware-stream": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/json-rpc-middleware-stream/-/json-rpc-middleware-stream-4.2.3.tgz", + "integrity": "sha512-4iFb0yffm5vo3eFKDbQgke9o17XBcLQ2c3sONrXSbcOLzP8LTojqo8hRGVgtJShhm5q4ZDSNq039fAx9o65E1w==", + "license": "ISC", + "dependencies": { + "@metamask/safe-event-emitter": "^3.0.0", + "json-rpc-engine": "^6.1.0", + "readable-stream": "^2.3.3" + }, + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/json-schema": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", @@ -35260,6 +35399,12 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/webextension-polyfill": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/webextension-polyfill/-/webextension-polyfill-0.10.0.tgz", + "integrity": "sha512-c5s35LgVa5tFaHhrZDnr3FpQpjj1BB+RXhLTYUxGqBVN460HkbM8TBtEqdXWbpTKfzwCcjAZVF7zXCYSKtcp9g==", + "license": "MPL-2.0" + }, "node_modules/webidl-conversions": { "version": "3.0.1", "license": "BSD-2-Clause"