From 78a7624954d42312c0e845bd0f00f06ff1ea6025 Mon Sep 17 00:00:00 2001 From: Maxime Beauchamp Date: Thu, 22 Aug 2024 18:11:52 -0400 Subject: [PATCH 1/7] feat(console): add metamask --- apps/deploy-web/package.json | 1 + .../CustomChainProvider.tsx | 16 +- package-lock.json | 389 +++++++++++++----- 3 files changed, 303 insertions(+), 103 deletions(-) diff --git a/apps/deploy-web/package.json b/apps/deploy-web/package.json index c48a2f906..074dddfa8 100644 --- a/apps/deploy-web/package.json +++ b/apps/deploy-web/package.json @@ -26,6 +26,7 @@ "@cosmjs/encoding": "^0.32.4", "@cosmjs/proto-signing": "^0.32.4", "@cosmjs/stargate": "^0.32.4", + "@cosmos-kit/cosmos-extension-metamask": "^0.10.0", "@cosmos-kit/cosmostation-extension": "^2.12.2", "@cosmos-kit/keplr": "^2.12.2", "@cosmos-kit/leap": "^2.12.2", diff --git a/apps/deploy-web/src/context/CustomChainProvider/CustomChainProvider.tsx b/apps/deploy-web/src/context/CustomChainProvider/CustomChainProvider.tsx index 4586935aa..2276f50cd 100644 --- a/apps/deploy-web/src/context/CustomChainProvider/CustomChainProvider.tsx +++ b/apps/deploy-web/src/context/CustomChainProvider/CustomChainProvider.tsx @@ -12,17 +12,31 @@ 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"; 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 ( { diff --git a/package-lock.json b/package-lock.json index 7bf578f30..4838a4d2e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -277,6 +277,7 @@ "@cosmjs/encoding": "^0.32.4", "@cosmjs/proto-signing": "^0.32.4", "@cosmjs/stargate": "^0.32.4", + "@cosmos-kit/cosmos-extension-metamask": "^0.10.0", "@cosmos-kit/cosmostation-extension": "^2.12.2", "@cosmos-kit/keplr": "^2.12.2", "@cosmos-kit/leap": "^2.12.2", @@ -604,6 +605,87 @@ "typescript": "^5" } }, + "apps/provider-console/node_modules/@cosmjs/crypto": { + "version": "0.32.4", + "resolved": "https://registry.npmjs.org/@cosmjs/crypto/-/crypto-0.32.4.tgz", + "integrity": "sha512-zicjGU051LF1V9v7bp8p7ovq+VyC91xlaHdsFOTo2oVry3KQikp8L/81RkXmUIT8FxMwdx1T7DmFwVQikcSDIw==", + "peer": true, + "dependencies": { + "@cosmjs/encoding": "^0.32.4", + "@cosmjs/math": "^0.32.4", + "@cosmjs/utils": "^0.32.4", + "@noble/hashes": "^1", + "bn.js": "^5.2.0", + "elliptic": "^6.5.4", + "libsodium-wrappers-sumo": "^0.7.11" + } + }, + "apps/provider-console/node_modules/@cosmjs/encoding": { + "version": "0.32.4", + "resolved": "https://registry.npmjs.org/@cosmjs/encoding/-/encoding-0.32.4.tgz", + "integrity": "sha512-tjvaEy6ZGxJchiizzTn7HVRiyTg1i4CObRRaTRPknm5EalE13SV+TCHq38gIDfyUeden4fCuaBVEdBR5+ti7Hw==", + "peer": true, + "dependencies": { + "base64-js": "^1.3.0", + "bech32": "^1.1.4", + "readonly-date": "^1.0.0" + } + }, + "apps/provider-console/node_modules/@cosmjs/math": { + "version": "0.32.4", + "resolved": "https://registry.npmjs.org/@cosmjs/math/-/math-0.32.4.tgz", + "integrity": "sha512-++dqq2TJkoB8zsPVYCvrt88oJWsy1vMOuSOKcdlnXuOA/ASheTJuYy4+oZlTQ3Fr8eALDLGGPhJI02W2HyAQaw==", + "peer": true, + "dependencies": { + "bn.js": "^5.2.0" + } + }, + "apps/provider-console/node_modules/@cosmjs/proto-signing": { + "version": "0.32.4", + "resolved": "https://registry.npmjs.org/@cosmjs/proto-signing/-/proto-signing-0.32.4.tgz", + "integrity": "sha512-QdyQDbezvdRI4xxSlyM1rSVBO2st5sqtbEIl3IX03uJ7YiZIQHyv6vaHVf1V4mapusCqguiHJzm4N4gsFdLBbQ==", + "peer": true, + "dependencies": { + "@cosmjs/amino": "^0.32.4", + "@cosmjs/crypto": "^0.32.4", + "@cosmjs/encoding": "^0.32.4", + "@cosmjs/math": "^0.32.4", + "@cosmjs/utils": "^0.32.4", + "cosmjs-types": "^0.9.0" + } + }, + "apps/provider-console/node_modules/@cosmos-kit/cosmostation-extension": { + "version": "2.12.2", + "resolved": "https://registry.npmjs.org/@cosmos-kit/cosmostation-extension/-/cosmostation-extension-2.12.2.tgz", + "integrity": "sha512-8+DTbm8t3PkHPoQ2c+vssrCR5rIqt6mPedyxGxsd1d4/H8RiZhkxtGIen+oDaGlLe62V6CD7AkLQ+I9HkSNzQA==", + "dependencies": { + "@chain-registry/cosmostation": "^1.66.2", + "@cosmos-kit/core": "^2.13.1", + "cosmjs-types": "^0.9.0" + }, + "peerDependencies": { + "@cosmjs/amino": ">=0.32.3", + "@cosmjs/proto-signing": ">=0.32.3" + } + }, + "apps/provider-console/node_modules/@cosmos-kit/leap-extension": { + "version": "2.12.2", + "resolved": "https://registry.npmjs.org/@cosmos-kit/leap-extension/-/leap-extension-2.12.2.tgz", + "integrity": "sha512-IB6+kEUgSxp2FeQwtCN6JlZu8RVn3/EeOxn7TNfbarMi2nP9sAWkclI8Pv4RI7i4Mp5iRFoCokpx4mCBYrQGVQ==", + "dependencies": { + "@chain-registry/keplr": "1.68.2", + "@cosmos-kit/core": "^2.13.1" + }, + "peerDependencies": { + "@cosmjs/amino": ">=0.32.3", + "@cosmjs/proto-signing": ">=0.32.3" + } + }, + "apps/provider-console/node_modules/cosmjs-types": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/cosmjs-types/-/cosmjs-types-0.9.0.tgz", + "integrity": "sha512-MN/yUe6mkJwHnCFfsNPeCfXVhyxHYW6c/xDUzrSbBycYzw++XvWDMJArXp2pLdgD6FQ8DW79vkPjeNKVrXaHeQ==" + }, "apps/provider-console/node_modules/lucide-react": { "version": "0.395.0", "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.395.0.tgz", @@ -2842,6 +2924,24 @@ "resolved": "https://registry.npmjs.org/@chain-registry/types/-/types-0.45.57.tgz", "integrity": "sha512-HPyeRCroJo04xJVHPvT05eskXn4EbII7LyJBsP2ol5jr0wseBBj94ISheB/Xr/moLY5PjZWW4G0foSD+4RiWsA==" }, + "node_modules/@chain-registry/keplr": { + "version": "1.68.2", + "resolved": "https://registry.npmjs.org/@chain-registry/keplr/-/keplr-1.68.2.tgz", + "integrity": "sha512-H3rdf/cLx7bNyyKo+1nI9HpLTlLzyeqi0Rmt+ggwtFRC63ZmDaMg/3vPY4rHvu38OdcaOid4Nyfc+7h3EEPW8Q==", + "license": "SEE LICENSE IN LICENSE", + "dependencies": { + "@chain-registry/types": "^0.45.1", + "@keplr-wallet/cosmos": "0.12.28", + "@keplr-wallet/crypto": "0.12.28", + "semver": "^7.5.0" + } + }, + "node_modules/@chain-registry/keplr/node_modules/@chain-registry/types": { + "version": "0.45.55", + "resolved": "https://registry.npmjs.org/@chain-registry/types/-/types-0.45.55.tgz", + "integrity": "sha512-uy7DQzLgxLOoVL5EyNUUUvftcoJznij06sXVUavdO/4w8HPFTpuAibY9aB7u/ILpIvirQsa6czMRIuWkRQdHEw==", + "license": "SEE LICENSE IN LICENSE" + }, "node_modules/@chain-registry/types": { "version": "0.41.4", "resolved": "https://registry.npmjs.org/@chain-registry/types/-/types-0.41.4.tgz", @@ -4130,6 +4230,116 @@ "xstream": "^11.14.0" } }, + "node_modules/@cosmos-kit/cosmos-extension-metamask": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/@cosmos-kit/cosmos-extension-metamask/-/cosmos-extension-metamask-0.10.0.tgz", + "integrity": "sha512-Ii+1MnVDXECjlLH3djer0GORa/R23dgv6fyKPiXhoE0tynzLTlWcwC4OGHZUxgQIpRdTATshivuZEGVvdV+ctA==", + "license": "SEE LICENSE IN LICENSE", + "dependencies": { + "@chain-registry/keplr": "1.68.2", + "@cosmos-kit/core": "^2.13.1", + "@cosmsnap/snapper": "^0.2.5", + "cosmjs-types": ">=0.9.0" + }, + "peerDependencies": { + "@cosmjs/amino": ">=0.32.3", + "@cosmjs/proto-signing": ">=0.32.3" + } + }, + "node_modules/@cosmos-kit/cosmos-extension-metamask/node_modules/@cosmjs/crypto": { + "version": "0.31.3", + "resolved": "https://registry.npmjs.org/@cosmjs/crypto/-/crypto-0.31.3.tgz", + "integrity": "sha512-vRbvM9ZKR2017TO73dtJ50KxoGcFzKtKI7C8iO302BQ5p+DuB+AirUg1952UpSoLfv5ki9O416MFANNg8UN/EQ==", + "license": "Apache-2.0", + "dependencies": { + "@cosmjs/encoding": "^0.31.3", + "@cosmjs/math": "^0.31.3", + "@cosmjs/utils": "^0.31.3", + "@noble/hashes": "^1", + "bn.js": "^5.2.0", + "elliptic": "^6.5.4", + "libsodium-wrappers-sumo": "^0.7.11" + } + }, + "node_modules/@cosmos-kit/cosmos-extension-metamask/node_modules/@cosmjs/encoding": { + "version": "0.31.3", + "resolved": "https://registry.npmjs.org/@cosmjs/encoding/-/encoding-0.31.3.tgz", + "integrity": "sha512-6IRtG0fiVYwyP7n+8e54uTx2pLYijO48V3t9TLiROERm5aUAIzIlz6Wp0NYaI5he9nh1lcEGJ1lkquVKFw3sUg==", + "license": "Apache-2.0", + "dependencies": { + "base64-js": "^1.3.0", + "bech32": "^1.1.4", + "readonly-date": "^1.0.0" + } + }, + "node_modules/@cosmos-kit/cosmos-extension-metamask/node_modules/@cosmjs/math": { + "version": "0.31.3", + "resolved": "https://registry.npmjs.org/@cosmjs/math/-/math-0.31.3.tgz", + "integrity": "sha512-kZ2C6glA5HDb9hLz1WrftAjqdTBb3fWQsRR+Us2HsjAYdeE6M3VdXMsYCP5M3yiihal1WDwAY2U7HmfJw7Uh4A==", + "license": "Apache-2.0", + "dependencies": { + "bn.js": "^5.2.0" + } + }, + "node_modules/@cosmos-kit/cosmos-extension-metamask/node_modules/@cosmjs/utils": { + "version": "0.31.3", + "resolved": "https://registry.npmjs.org/@cosmjs/utils/-/utils-0.31.3.tgz", + "integrity": "sha512-VBhAgzrrYdIe0O5IbKRqwszbQa7ZyQLx9nEQuHQ3HUplQW7P44COG/ye2n6AzCudtqxmwdX7nyX8ta1J07GoqA==", + "license": "Apache-2.0" + }, + "node_modules/@cosmos-kit/cosmos-extension-metamask/node_modules/@cosmsnap/snapper": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/@cosmsnap/snapper/-/snapper-0.2.6.tgz", + "integrity": "sha512-6tuFgCOlfT/5kX2rNHeeTE3Ltx7I23q4EegMiLLsrm3FRDzr0xj7Q8w5PVlW9wPicpGz9FmbE8bK6yIAjmIlkg==", + "license": "MIT", + "dependencies": { + "@cosmjs/amino": "^0.31.3", + "@keplr-wallet/proto-types": "0.12.12", + "@keplr-wallet/types": "0.12.12", + "appwrite": "^14.0.0", + "ses": "^0.18.4" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@cosmos-kit/cosmos-extension-metamask/node_modules/@cosmsnap/snapper/node_modules/@cosmjs/amino": { + "version": "0.31.3", + "resolved": "https://registry.npmjs.org/@cosmjs/amino/-/amino-0.31.3.tgz", + "integrity": "sha512-36emtUq895sPRX8PTSOnG+lhJDCVyIcE0Tr5ct59sUbgQiI14y43vj/4WAlJ/utSOxy+Zhj9wxcs4AZfu0BHsw==", + "license": "Apache-2.0", + "dependencies": { + "@cosmjs/crypto": "^0.31.3", + "@cosmjs/encoding": "^0.31.3", + "@cosmjs/math": "^0.31.3", + "@cosmjs/utils": "^0.31.3" + } + }, + "node_modules/@cosmos-kit/cosmos-extension-metamask/node_modules/@keplr-wallet/proto-types": { + "version": "0.12.12", + "resolved": "https://registry.npmjs.org/@keplr-wallet/proto-types/-/proto-types-0.12.12.tgz", + "integrity": "sha512-iAqqNlJpxu/8j+SwOXEH2ymM4W0anfxn+eNeWuqz2c/0JxGTWeLURioxQmCtewtllfHdDHHcoQ7/S+NmXiaEgQ==", + "license": "Apache-2.0", + "dependencies": { + "long": "^4.0.0", + "protobufjs": "^6.11.2" + } + }, + "node_modules/@cosmos-kit/cosmos-extension-metamask/node_modules/@keplr-wallet/types": { + "version": "0.12.12", + "resolved": "https://registry.npmjs.org/@keplr-wallet/types/-/types-0.12.12.tgz", + "integrity": "sha512-fo6b8j9EXnJukGvZorifJWEm1BPIrvaTLuu5PqaU5k1ANDasm/FL1NaUuaTBVvhRjINtvVXqYpW/rVUinA9MBA==", + "license": "Apache-2.0", + "dependencies": { + "long": "^4.0.0" + } + }, + "node_modules/@cosmos-kit/cosmos-extension-metamask/node_modules/long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==", + "license": "Apache-2.0" + }, "node_modules/@cosmos-kit/cosmostation-extension": { "version": "2.13.0", "resolved": "https://registry.npmjs.org/@cosmos-kit/cosmostation-extension/-/cosmostation-extension-2.13.0.tgz", @@ -4238,108 +4448,6 @@ "@cosmjs/proto-signing": ">=0.32.3" } }, - "node_modules/@cosmos-kit/leap-extension/node_modules/@chain-registry/keplr": { - "version": "1.68.2", - "resolved": "https://registry.npmjs.org/@chain-registry/keplr/-/keplr-1.68.2.tgz", - "integrity": "sha512-H3rdf/cLx7bNyyKo+1nI9HpLTlLzyeqi0Rmt+ggwtFRC63ZmDaMg/3vPY4rHvu38OdcaOid4Nyfc+7h3EEPW8Q==", - "dependencies": { - "@chain-registry/types": "^0.45.1", - "@keplr-wallet/cosmos": "0.12.28", - "@keplr-wallet/crypto": "0.12.28", - "semver": "^7.5.0" - } - }, - "node_modules/@cosmos-kit/leap-extension/node_modules/@chain-registry/types": { - "version": "0.45.57", - "resolved": "https://registry.npmjs.org/@chain-registry/types/-/types-0.45.57.tgz", - "integrity": "sha512-HPyeRCroJo04xJVHPvT05eskXn4EbII7LyJBsP2ol5jr0wseBBj94ISheB/Xr/moLY5PjZWW4G0foSD+4RiWsA==" - }, - "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-metamask-cosmos-snap/node_modules/@chain-registry/keplr": { - "version": "1.68.2", - "resolved": "https://registry.npmjs.org/@chain-registry/keplr/-/keplr-1.68.2.tgz", - "integrity": "sha512-H3rdf/cLx7bNyyKo+1nI9HpLTlLzyeqi0Rmt+ggwtFRC63ZmDaMg/3vPY4rHvu38OdcaOid4Nyfc+7h3EEPW8Q==", - "license": "SEE LICENSE IN LICENSE", - "dependencies": { - "@chain-registry/types": "^0.45.1", - "@keplr-wallet/cosmos": "0.12.28", - "@keplr-wallet/crypto": "0.12.28", - "semver": "^7.5.0" - } - }, - "node_modules/@cosmos-kit/leap-metamask-cosmos-snap/node_modules/@chain-registry/types": { - "version": "0.45.61", - "resolved": "https://registry.npmjs.org/@chain-registry/types/-/types-0.45.61.tgz", - "integrity": "sha512-ScSUGG+0FJ+hI19c344ixDRdxdYr5YtU6zCY5Jhb/CJiPxjuoIv2US7a9qBysKGdIYK7iNrp8K5IoSGTRusKfg==", - "license": "SEE LICENSE IN LICENSE" - }, - "node_modules/@cosmos-kit/leap-metamask-cosmos-snap/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/@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/leap-mobile/node_modules/@chain-registry/keplr": { - "version": "1.68.2", - "resolved": "https://registry.npmjs.org/@chain-registry/keplr/-/keplr-1.68.2.tgz", - "integrity": "sha512-H3rdf/cLx7bNyyKo+1nI9HpLTlLzyeqi0Rmt+ggwtFRC63ZmDaMg/3vPY4rHvu38OdcaOid4Nyfc+7h3EEPW8Q==", - "license": "SEE LICENSE IN LICENSE", - "dependencies": { - "@chain-registry/types": "^0.45.1", - "@keplr-wallet/cosmos": "0.12.28", - "@keplr-wallet/crypto": "0.12.28", - "semver": "^7.5.0" - } - }, - "node_modules/@cosmos-kit/leap-mobile/node_modules/@chain-registry/types": { - "version": "0.45.61", - "resolved": "https://registry.npmjs.org/@chain-registry/types/-/types-0.45.61.tgz", - "integrity": "sha512-ScSUGG+0FJ+hI19c344ixDRdxdYr5YtU6zCY5Jhb/CJiPxjuoIv2US7a9qBysKGdIYK7iNrp8K5IoSGTRusKfg==", - "license": "SEE LICENSE IN LICENSE" - }, "node_modules/@cosmos-kit/react": { "version": "2.18.0", "resolved": "https://registry.npmjs.org/@cosmos-kit/react/-/react-2.18.0.tgz", @@ -15331,6 +15439,51 @@ "node": ">= 8" } }, + "node_modules/appdirsjs": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/appdirsjs/-/appdirsjs-1.2.7.tgz", + "integrity": "sha512-Quji6+8kLBC3NnBeo14nPDq0+2jUs5s3/xEye+udFHumHhRk4M7aAMXp/PBJqkKYGuuyR9M/6Dq7d2AViiGmhw==", + "peer": true + }, + "node_modules/appwrite": { + "version": "14.0.1", + "resolved": "https://registry.npmjs.org/appwrite/-/appwrite-14.0.1.tgz", + "integrity": "sha512-ORlvfqVif/2K3qKGgGiGfMP33Zwm+xxB1fIC4Lm3sojOkDd8u8YvgKQO0Meq5UXb8Dc0Rl66Z7qlGBAfRQ04bA==", + "license": "BSD-3-Clause", + "dependencies": { + "cross-fetch": "3.1.5", + "isomorphic-form-data": "2.0.0" + } + }, + "node_modules/appwrite/node_modules/cross-fetch": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz", + "integrity": "sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==", + "license": "MIT", + "dependencies": { + "node-fetch": "2.6.7" + } + }, + "node_modules/appwrite/node_modules/node-fetch": { + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "license": "MIT", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, "node_modules/arg": { "version": "5.0.2", "license": "MIT" @@ -22705,6 +22858,38 @@ "node": ">=0.10.0" } }, + "node_modules/isomorphic-form-data": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isomorphic-form-data/-/isomorphic-form-data-2.0.0.tgz", + "integrity": "sha512-TYgVnXWeESVmQSg4GLVbalmQ+B4NPi/H4eWxqALKj63KsUrcu301YDjBqaOw3h+cbak7Na4Xyps3BiptHtxTfg==", + "license": "MIT", + "dependencies": { + "form-data": "^2.3.2" + } + }, + "node_modules/isomorphic-form-data/node_modules/form-data": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", + "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 0.12" + } + }, + "node_modules/isomorphic-unfetch": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/isomorphic-unfetch/-/isomorphic-unfetch-3.1.0.tgz", + "integrity": "sha512-geDJjpoZ8N0kWexiwkX8F9NkTsXhetLPVbZFQ+JTW239QNOwvB0gniuR1Wc6f0AMTn7/mFGyXvHTifrCp/GH8Q==", + "dependencies": { + "node-fetch": "^2.6.1", + "unfetch": "^4.2.0" + } + }, "node_modules/isomorphic-ws": { "version": "4.0.1", "license": "MIT", From 41e2b3a5ef002041a218c3caabb11ebc3ab419d0 Mon Sep 17 00:00:00 2001 From: Maxime Beauchamp Date: Thu, 22 Aug 2024 18:14:16 -0400 Subject: [PATCH 2/7] fix: fixed metamask version --- apps/deploy-web/package.json | 2 +- package-lock.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/deploy-web/package.json b/apps/deploy-web/package.json index 074dddfa8..28465d876 100644 --- a/apps/deploy-web/package.json +++ b/apps/deploy-web/package.json @@ -26,7 +26,7 @@ "@cosmjs/encoding": "^0.32.4", "@cosmjs/proto-signing": "^0.32.4", "@cosmjs/stargate": "^0.32.4", - "@cosmos-kit/cosmos-extension-metamask": "^0.10.0", + "@cosmos-kit/cosmos-extension-metamask": "0.10.0", "@cosmos-kit/cosmostation-extension": "^2.12.2", "@cosmos-kit/keplr": "^2.12.2", "@cosmos-kit/leap": "^2.12.2", diff --git a/package-lock.json b/package-lock.json index 4838a4d2e..c2570ee85 100644 --- a/package-lock.json +++ b/package-lock.json @@ -277,7 +277,7 @@ "@cosmjs/encoding": "^0.32.4", "@cosmjs/proto-signing": "^0.32.4", "@cosmjs/stargate": "^0.32.4", - "@cosmos-kit/cosmos-extension-metamask": "^0.10.0", + "@cosmos-kit/cosmos-extension-metamask": "0.10.0", "@cosmos-kit/cosmostation-extension": "^2.12.2", "@cosmos-kit/keplr": "^2.12.2", "@cosmos-kit/leap": "^2.12.2", From 19ebf6adcdd49f98921a9ac031ab90d0d2487877 Mon Sep 17 00:00:00 2001 From: Maxime Beauchamp <15185355+baktun14@users.noreply.github.com> Date: Mon, 7 Oct 2024 10:40:08 -0400 Subject: [PATCH 3/7] chore: update npm i --- package-lock.json | 118 ---------------------------------------------- 1 file changed, 118 deletions(-) diff --git a/package-lock.json b/package-lock.json index c2570ee85..798f7e394 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2908,22 +2908,6 @@ "resolved": "https://registry.npmjs.org/@chain-registry/types/-/types-0.45.57.tgz", "integrity": "sha512-HPyeRCroJo04xJVHPvT05eskXn4EbII7LyJBsP2ol5jr0wseBBj94ISheB/Xr/moLY5PjZWW4G0foSD+4RiWsA==" }, - "node_modules/@chain-registry/keplr": { - "version": "1.68.71", - "resolved": "https://registry.npmjs.org/@chain-registry/keplr/-/keplr-1.68.71.tgz", - "integrity": "sha512-QLRDj3thHh0FNCI42gZa2v1EAn/d7TqdhCc2TcoFQinz/Ziwym7tC++vzsQr+zAruEwMXru6vSGM7owgJIDBmg==", - "dependencies": { - "@chain-registry/types": "^0.45.57", - "@keplr-wallet/cosmos": "0.12.28", - "@keplr-wallet/crypto": "0.12.28", - "semver": "^7.5.0" - } - }, - "node_modules/@chain-registry/keplr/node_modules/@chain-registry/types": { - "version": "0.45.57", - "resolved": "https://registry.npmjs.org/@chain-registry/types/-/types-0.45.57.tgz", - "integrity": "sha512-HPyeRCroJo04xJVHPvT05eskXn4EbII7LyJBsP2ol5jr0wseBBj94ISheB/Xr/moLY5PjZWW4G0foSD+4RiWsA==" - }, "node_modules/@chain-registry/keplr": { "version": "1.68.2", "resolved": "https://registry.npmjs.org/@chain-registry/keplr/-/keplr-1.68.2.tgz", @@ -6697,18 +6681,6 @@ "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", @@ -6750,27 +6722,6 @@ "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==", - "dependencies": { - "end-of-stream": "^1.4.4", - "once": "^1.4.0", - "readable-stream": "^2.3.3" - }, - "engines": { - "node": ">=12.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==", - "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", @@ -15439,12 +15390,6 @@ "node": ">= 8" } }, - "node_modules/appdirsjs": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/appdirsjs/-/appdirsjs-1.2.7.tgz", - "integrity": "sha512-Quji6+8kLBC3NnBeo14nPDq0+2jUs5s3/xEye+udFHumHhRk4M7aAMXp/PBJqkKYGuuyR9M/6Dq7d2AViiGmhw==", - "peer": true - }, "node_modules/appwrite": { "version": "14.0.1", "resolved": "https://registry.npmjs.org/appwrite/-/appwrite-14.0.1.tgz", @@ -20053,14 +19998,6 @@ "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==", - "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", @@ -20282,17 +20219,6 @@ "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==", - "dependencies": { - "webextension-polyfill": ">=0.10.0 <1.0" - }, - "engines": { - "node": ">=12.0.0" - } - }, "node_modules/external-editor": { "version": "3.1.0", "dev": true, @@ -22881,15 +22807,6 @@ "node": ">= 0.12" } }, - "node_modules/isomorphic-unfetch": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/isomorphic-unfetch/-/isomorphic-unfetch-3.1.0.tgz", - "integrity": "sha512-geDJjpoZ8N0kWexiwkX8F9NkTsXhetLPVbZFQ+JTW239QNOwvB0gniuR1Wc6f0AMTn7/mFGyXvHTifrCp/GH8Q==", - "dependencies": { - "node-fetch": "^2.6.1", - "unfetch": "^4.2.0" - } - }, "node_modules/isomorphic-ws": { "version": "4.0.1", "license": "MIT", @@ -24900,36 +24817,6 @@ "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==", - "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==" - }, - "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==", - "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", @@ -35373,11 +35260,6 @@ "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==" - }, "node_modules/webidl-conversions": { "version": "3.0.1", "license": "BSD-2-Clause" From f8cea7f7473d1c3df8140e1bae5aaec885316e57 Mon Sep 17 00:00:00 2001 From: Maxime Beauchamp <15185355+baktun14@users.noreply.github.com> Date: Mon, 7 Oct 2024 12:46:23 -0400 Subject: [PATCH 4/7] chore: fix package-lock --- .../CustomChainProvider.tsx | 15 +- package-lock.json | 145 ++++++++++++++++++ 2 files changed, 146 insertions(+), 14 deletions(-) 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" From 5e68fe58d1b4387562c712908c798ef53b4649bf Mon Sep 17 00:00:00 2001 From: Maxime Beauchamp <15185355+baktun14@users.noreply.github.com> Date: Mon, 7 Oct 2024 13:31:20 -0400 Subject: [PATCH 5/7] chore(wallet): update cosmosnaper package version --- package-lock.json | 313 ++++++++++++++++++---------------------------- 1 file changed, 122 insertions(+), 191 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4b2a45b02..e5ab20bb3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -605,87 +605,6 @@ "typescript": "^5" } }, - "apps/provider-console/node_modules/@cosmjs/crypto": { - "version": "0.32.4", - "resolved": "https://registry.npmjs.org/@cosmjs/crypto/-/crypto-0.32.4.tgz", - "integrity": "sha512-zicjGU051LF1V9v7bp8p7ovq+VyC91xlaHdsFOTo2oVry3KQikp8L/81RkXmUIT8FxMwdx1T7DmFwVQikcSDIw==", - "peer": true, - "dependencies": { - "@cosmjs/encoding": "^0.32.4", - "@cosmjs/math": "^0.32.4", - "@cosmjs/utils": "^0.32.4", - "@noble/hashes": "^1", - "bn.js": "^5.2.0", - "elliptic": "^6.5.4", - "libsodium-wrappers-sumo": "^0.7.11" - } - }, - "apps/provider-console/node_modules/@cosmjs/encoding": { - "version": "0.32.4", - "resolved": "https://registry.npmjs.org/@cosmjs/encoding/-/encoding-0.32.4.tgz", - "integrity": "sha512-tjvaEy6ZGxJchiizzTn7HVRiyTg1i4CObRRaTRPknm5EalE13SV+TCHq38gIDfyUeden4fCuaBVEdBR5+ti7Hw==", - "peer": true, - "dependencies": { - "base64-js": "^1.3.0", - "bech32": "^1.1.4", - "readonly-date": "^1.0.0" - } - }, - "apps/provider-console/node_modules/@cosmjs/math": { - "version": "0.32.4", - "resolved": "https://registry.npmjs.org/@cosmjs/math/-/math-0.32.4.tgz", - "integrity": "sha512-++dqq2TJkoB8zsPVYCvrt88oJWsy1vMOuSOKcdlnXuOA/ASheTJuYy4+oZlTQ3Fr8eALDLGGPhJI02W2HyAQaw==", - "peer": true, - "dependencies": { - "bn.js": "^5.2.0" - } - }, - "apps/provider-console/node_modules/@cosmjs/proto-signing": { - "version": "0.32.4", - "resolved": "https://registry.npmjs.org/@cosmjs/proto-signing/-/proto-signing-0.32.4.tgz", - "integrity": "sha512-QdyQDbezvdRI4xxSlyM1rSVBO2st5sqtbEIl3IX03uJ7YiZIQHyv6vaHVf1V4mapusCqguiHJzm4N4gsFdLBbQ==", - "peer": true, - "dependencies": { - "@cosmjs/amino": "^0.32.4", - "@cosmjs/crypto": "^0.32.4", - "@cosmjs/encoding": "^0.32.4", - "@cosmjs/math": "^0.32.4", - "@cosmjs/utils": "^0.32.4", - "cosmjs-types": "^0.9.0" - } - }, - "apps/provider-console/node_modules/@cosmos-kit/cosmostation-extension": { - "version": "2.12.2", - "resolved": "https://registry.npmjs.org/@cosmos-kit/cosmostation-extension/-/cosmostation-extension-2.12.2.tgz", - "integrity": "sha512-8+DTbm8t3PkHPoQ2c+vssrCR5rIqt6mPedyxGxsd1d4/H8RiZhkxtGIen+oDaGlLe62V6CD7AkLQ+I9HkSNzQA==", - "dependencies": { - "@chain-registry/cosmostation": "^1.66.2", - "@cosmos-kit/core": "^2.13.1", - "cosmjs-types": "^0.9.0" - }, - "peerDependencies": { - "@cosmjs/amino": ">=0.32.3", - "@cosmjs/proto-signing": ">=0.32.3" - } - }, - "apps/provider-console/node_modules/@cosmos-kit/leap-extension": { - "version": "2.12.2", - "resolved": "https://registry.npmjs.org/@cosmos-kit/leap-extension/-/leap-extension-2.12.2.tgz", - "integrity": "sha512-IB6+kEUgSxp2FeQwtCN6JlZu8RVn3/EeOxn7TNfbarMi2nP9sAWkclI8Pv4RI7i4Mp5iRFoCokpx4mCBYrQGVQ==", - "dependencies": { - "@chain-registry/keplr": "1.68.2", - "@cosmos-kit/core": "^2.13.1" - }, - "peerDependencies": { - "@cosmjs/amino": ">=0.32.3", - "@cosmjs/proto-signing": ">=0.32.3" - } - }, - "apps/provider-console/node_modules/cosmjs-types": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/cosmjs-types/-/cosmjs-types-0.9.0.tgz", - "integrity": "sha512-MN/yUe6mkJwHnCFfsNPeCfXVhyxHYW6c/xDUzrSbBycYzw++XvWDMJArXp2pLdgD6FQ8DW79vkPjeNKVrXaHeQ==" - }, "apps/provider-console/node_modules/lucide-react": { "version": "0.395.0", "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.395.0.tgz", @@ -4230,100 +4149,6 @@ "@cosmjs/proto-signing": ">=0.32.3" } }, - "node_modules/@cosmos-kit/cosmos-extension-metamask/node_modules/@cosmjs/crypto": { - "version": "0.31.3", - "resolved": "https://registry.npmjs.org/@cosmjs/crypto/-/crypto-0.31.3.tgz", - "integrity": "sha512-vRbvM9ZKR2017TO73dtJ50KxoGcFzKtKI7C8iO302BQ5p+DuB+AirUg1952UpSoLfv5ki9O416MFANNg8UN/EQ==", - "license": "Apache-2.0", - "dependencies": { - "@cosmjs/encoding": "^0.31.3", - "@cosmjs/math": "^0.31.3", - "@cosmjs/utils": "^0.31.3", - "@noble/hashes": "^1", - "bn.js": "^5.2.0", - "elliptic": "^6.5.4", - "libsodium-wrappers-sumo": "^0.7.11" - } - }, - "node_modules/@cosmos-kit/cosmos-extension-metamask/node_modules/@cosmjs/encoding": { - "version": "0.31.3", - "resolved": "https://registry.npmjs.org/@cosmjs/encoding/-/encoding-0.31.3.tgz", - "integrity": "sha512-6IRtG0fiVYwyP7n+8e54uTx2pLYijO48V3t9TLiROERm5aUAIzIlz6Wp0NYaI5he9nh1lcEGJ1lkquVKFw3sUg==", - "license": "Apache-2.0", - "dependencies": { - "base64-js": "^1.3.0", - "bech32": "^1.1.4", - "readonly-date": "^1.0.0" - } - }, - "node_modules/@cosmos-kit/cosmos-extension-metamask/node_modules/@cosmjs/math": { - "version": "0.31.3", - "resolved": "https://registry.npmjs.org/@cosmjs/math/-/math-0.31.3.tgz", - "integrity": "sha512-kZ2C6glA5HDb9hLz1WrftAjqdTBb3fWQsRR+Us2HsjAYdeE6M3VdXMsYCP5M3yiihal1WDwAY2U7HmfJw7Uh4A==", - "license": "Apache-2.0", - "dependencies": { - "bn.js": "^5.2.0" - } - }, - "node_modules/@cosmos-kit/cosmos-extension-metamask/node_modules/@cosmjs/utils": { - "version": "0.31.3", - "resolved": "https://registry.npmjs.org/@cosmjs/utils/-/utils-0.31.3.tgz", - "integrity": "sha512-VBhAgzrrYdIe0O5IbKRqwszbQa7ZyQLx9nEQuHQ3HUplQW7P44COG/ye2n6AzCudtqxmwdX7nyX8ta1J07GoqA==", - "license": "Apache-2.0" - }, - "node_modules/@cosmos-kit/cosmos-extension-metamask/node_modules/@cosmsnap/snapper": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/@cosmsnap/snapper/-/snapper-0.2.6.tgz", - "integrity": "sha512-6tuFgCOlfT/5kX2rNHeeTE3Ltx7I23q4EegMiLLsrm3FRDzr0xj7Q8w5PVlW9wPicpGz9FmbE8bK6yIAjmIlkg==", - "license": "MIT", - "dependencies": { - "@cosmjs/amino": "^0.31.3", - "@keplr-wallet/proto-types": "0.12.12", - "@keplr-wallet/types": "0.12.12", - "appwrite": "^14.0.0", - "ses": "^0.18.4" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@cosmos-kit/cosmos-extension-metamask/node_modules/@cosmsnap/snapper/node_modules/@cosmjs/amino": { - "version": "0.31.3", - "resolved": "https://registry.npmjs.org/@cosmjs/amino/-/amino-0.31.3.tgz", - "integrity": "sha512-36emtUq895sPRX8PTSOnG+lhJDCVyIcE0Tr5ct59sUbgQiI14y43vj/4WAlJ/utSOxy+Zhj9wxcs4AZfu0BHsw==", - "license": "Apache-2.0", - "dependencies": { - "@cosmjs/crypto": "^0.31.3", - "@cosmjs/encoding": "^0.31.3", - "@cosmjs/math": "^0.31.3", - "@cosmjs/utils": "^0.31.3" - } - }, - "node_modules/@cosmos-kit/cosmos-extension-metamask/node_modules/@keplr-wallet/proto-types": { - "version": "0.12.12", - "resolved": "https://registry.npmjs.org/@keplr-wallet/proto-types/-/proto-types-0.12.12.tgz", - "integrity": "sha512-iAqqNlJpxu/8j+SwOXEH2ymM4W0anfxn+eNeWuqz2c/0JxGTWeLURioxQmCtewtllfHdDHHcoQ7/S+NmXiaEgQ==", - "license": "Apache-2.0", - "dependencies": { - "long": "^4.0.0", - "protobufjs": "^6.11.2" - } - }, - "node_modules/@cosmos-kit/cosmos-extension-metamask/node_modules/@keplr-wallet/types": { - "version": "0.12.12", - "resolved": "https://registry.npmjs.org/@keplr-wallet/types/-/types-0.12.12.tgz", - "integrity": "sha512-fo6b8j9EXnJukGvZorifJWEm1BPIrvaTLuu5PqaU5k1ANDasm/FL1NaUuaTBVvhRjINtvVXqYpW/rVUinA9MBA==", - "license": "Apache-2.0", - "dependencies": { - "long": "^4.0.0" - } - }, - "node_modules/@cosmos-kit/cosmos-extension-metamask/node_modules/long": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", - "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==", - "license": "Apache-2.0" - }, "node_modules/@cosmos-kit/cosmostation-extension": { "version": "2.13.0", "resolved": "https://registry.npmjs.org/@cosmos-kit/cosmostation-extension/-/cosmostation-extension-2.13.0.tgz", @@ -4392,22 +4217,6 @@ "@cosmjs/proto-signing": ">=0.32.3" } }, - "node_modules/@cosmos-kit/keplr-mobile/node_modules/@chain-registry/keplr": { - "version": "1.68.2", - "resolved": "https://registry.npmjs.org/@chain-registry/keplr/-/keplr-1.68.2.tgz", - "integrity": "sha512-H3rdf/cLx7bNyyKo+1nI9HpLTlLzyeqi0Rmt+ggwtFRC63ZmDaMg/3vPY4rHvu38OdcaOid4Nyfc+7h3EEPW8Q==", - "dependencies": { - "@chain-registry/types": "^0.45.1", - "@keplr-wallet/cosmos": "0.12.28", - "@keplr-wallet/crypto": "0.12.28", - "semver": "^7.5.0" - } - }, - "node_modules/@cosmos-kit/keplr-mobile/node_modules/@chain-registry/types": { - "version": "0.45.57", - "resolved": "https://registry.npmjs.org/@chain-registry/types/-/types-0.45.57.tgz", - "integrity": "sha512-HPyeRCroJo04xJVHPvT05eskXn4EbII7LyJBsP2ol5jr0wseBBj94ISheB/Xr/moLY5PjZWW4G0foSD+4RiWsA==" - }, "node_modules/@cosmos-kit/leap": { "version": "2.12.2", "resolved": "https://registry.npmjs.org/@cosmos-kit/leap/-/leap-2.12.2.tgz", @@ -4525,6 +4334,92 @@ "resolved": "https://registry.npmjs.org/@cosmostation/extension-client/-/extension-client-0.1.15.tgz", "integrity": "sha512-HlXYJjFrNpjiV/GUKhri1UL8/bhlOIFFLpRF78YDSqq16x0+plIqx5CAvEusFcKTDpVfpeD5sfUHiKvP7euNFg==" }, + "node_modules/@cosmsnap/snapper": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/@cosmsnap/snapper/-/snapper-0.2.7.tgz", + "integrity": "sha512-APdNxu6b761pNL9LTk4uxQr+cE88TdW6abtkVKxOgJcOtRsheI5mj7d5/hcIsm1dSiHv6WXefYdcTG9sOU/K9A==", + "license": "MIT", + "dependencies": { + "@cosmjs/amino": "^0.31.3", + "@keplr-wallet/proto-types": "0.12.12", + "@keplr-wallet/types": "0.12.12", + "appwrite": "^14.0.0", + "node-appwrite": "^14.0.0", + "ses": "^0.18.4" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@cosmsnap/snapper/node_modules/@cosmjs/amino": { + "version": "0.31.3", + "resolved": "https://registry.npmjs.org/@cosmjs/amino/-/amino-0.31.3.tgz", + "integrity": "sha512-36emtUq895sPRX8PTSOnG+lhJDCVyIcE0Tr5ct59sUbgQiI14y43vj/4WAlJ/utSOxy+Zhj9wxcs4AZfu0BHsw==", + "license": "Apache-2.0", + "dependencies": { + "@cosmjs/crypto": "^0.31.3", + "@cosmjs/encoding": "^0.31.3", + "@cosmjs/math": "^0.31.3", + "@cosmjs/utils": "^0.31.3" + } + }, + "node_modules/@cosmsnap/snapper/node_modules/@cosmjs/crypto": { + "version": "0.31.3", + "resolved": "https://registry.npmjs.org/@cosmjs/crypto/-/crypto-0.31.3.tgz", + "integrity": "sha512-vRbvM9ZKR2017TO73dtJ50KxoGcFzKtKI7C8iO302BQ5p+DuB+AirUg1952UpSoLfv5ki9O416MFANNg8UN/EQ==", + "license": "Apache-2.0", + "dependencies": { + "@cosmjs/encoding": "^0.31.3", + "@cosmjs/math": "^0.31.3", + "@cosmjs/utils": "^0.31.3", + "@noble/hashes": "^1", + "bn.js": "^5.2.0", + "elliptic": "^6.5.4", + "libsodium-wrappers-sumo": "^0.7.11" + } + }, + "node_modules/@cosmsnap/snapper/node_modules/@cosmjs/encoding": { + "version": "0.31.3", + "resolved": "https://registry.npmjs.org/@cosmjs/encoding/-/encoding-0.31.3.tgz", + "integrity": "sha512-6IRtG0fiVYwyP7n+8e54uTx2pLYijO48V3t9TLiROERm5aUAIzIlz6Wp0NYaI5he9nh1lcEGJ1lkquVKFw3sUg==", + "license": "Apache-2.0", + "dependencies": { + "base64-js": "^1.3.0", + "bech32": "^1.1.4", + "readonly-date": "^1.0.0" + } + }, + "node_modules/@cosmsnap/snapper/node_modules/@cosmjs/math": { + "version": "0.31.3", + "resolved": "https://registry.npmjs.org/@cosmjs/math/-/math-0.31.3.tgz", + "integrity": "sha512-kZ2C6glA5HDb9hLz1WrftAjqdTBb3fWQsRR+Us2HsjAYdeE6M3VdXMsYCP5M3yiihal1WDwAY2U7HmfJw7Uh4A==", + "license": "Apache-2.0", + "dependencies": { + "bn.js": "^5.2.0" + } + }, + "node_modules/@cosmsnap/snapper/node_modules/@cosmjs/utils": { + "version": "0.31.3", + "resolved": "https://registry.npmjs.org/@cosmjs/utils/-/utils-0.31.3.tgz", + "integrity": "sha512-VBhAgzrrYdIe0O5IbKRqwszbQa7ZyQLx9nEQuHQ3HUplQW7P44COG/ye2n6AzCudtqxmwdX7nyX8ta1J07GoqA==", + "license": "Apache-2.0" + }, + "node_modules/@cosmsnap/snapper/node_modules/@keplr-wallet/proto-types": { + "version": "0.12.12", + "resolved": "https://registry.npmjs.org/@keplr-wallet/proto-types/-/proto-types-0.12.12.tgz", + "integrity": "sha512-iAqqNlJpxu/8j+SwOXEH2ymM4W0anfxn+eNeWuqz2c/0JxGTWeLURioxQmCtewtllfHdDHHcoQ7/S+NmXiaEgQ==", + "license": "Apache-2.0", + "dependencies": { + "long": "^4.0.0", + "protobufjs": "^6.11.2" + } + }, + "node_modules/@cosmsnap/snapper/node_modules/long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==", + "license": "Apache-2.0" + }, "node_modules/@cspotcode/source-map-support": { "version": "0.8.1", "license": "MIT", @@ -6657,6 +6552,21 @@ "resolved": "https://registry.npmjs.org/@keplr-wallet/simple-fetch/-/simple-fetch-0.12.28.tgz", "integrity": "sha512-T2CiKS2B5n0ZA7CWw0CA6qIAH0XYI1siE50MP+i+V0ZniCGBeL+BMcDw64vFJUcEH+1L5X4sDAzV37fQxGwllA==" }, + "node_modules/@keplr-wallet/types": { + "version": "0.12.12", + "resolved": "https://registry.npmjs.org/@keplr-wallet/types/-/types-0.12.12.tgz", + "integrity": "sha512-fo6b8j9EXnJukGvZorifJWEm1BPIrvaTLuu5PqaU5k1ANDasm/FL1NaUuaTBVvhRjINtvVXqYpW/rVUinA9MBA==", + "license": "Apache-2.0", + "dependencies": { + "long": "^4.0.0" + } + }, + "node_modules/@keplr-wallet/types/node_modules/long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==", + "license": "Apache-2.0" + }, "node_modules/@keplr-wallet/unit": { "version": "0.12.28", "resolved": "https://registry.npmjs.org/@keplr-wallet/unit/-/unit-0.12.28.tgz", @@ -28439,6 +28349,15 @@ "version": "4.3.0", "license": "MIT" }, + "node_modules/node-appwrite": { + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/node-appwrite/-/node-appwrite-14.1.0.tgz", + "integrity": "sha512-kuKAZrdaAcGYOMUXtxNb1j+uIy+FIMiiU1dFkgwTXLsMLeLvC6HJ8/FH/kN9JyrWR2a2zcGN7gWfyQgWYoLMTA==", + "license": "BSD-3-Clause", + "dependencies": { + "node-fetch-native-with-agent": "1.7.2" + } + }, "node_modules/node-dependency-injection": { "version": "3.1.2", "license": "MIT", @@ -28630,6 +28549,12 @@ "resolved": "https://registry.npmjs.org/node-fetch-native/-/node-fetch-native-1.6.4.tgz", "integrity": "sha512-IhOigYzAKHd244OC0JIMIUrjzctirCmPkaIfhDeGcEETWof5zKYUW7e7MYvChGWh/4CJeXEgsRyGzuF334rOOQ==" }, + "node_modules/node-fetch-native-with-agent": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/node-fetch-native-with-agent/-/node-fetch-native-with-agent-1.7.2.tgz", + "integrity": "sha512-5MaOOCuJEvcckoz7/tjdx1M6OusOY6Xc5f459IaruGStWnKzlI1qpNgaAwmn4LmFYcsSlj+jBMk84wmmRxfk5g==", + "license": "MIT" + }, "node_modules/node-forge": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz", @@ -32264,6 +32189,12 @@ "node": ">= 0.8.0" } }, + "node_modules/ses": { + "version": "0.18.4", + "resolved": "https://registry.npmjs.org/ses/-/ses-0.18.4.tgz", + "integrity": "sha512-Ph0PC38Q7uutHmMM9XPqA7rp/2taiRwW6pIZJwTr4gz90DtrBvy/x7AmNPH2uqNPhKriZpYKvPi1xKWjM9xJuQ==", + "license": "Apache-2.0" + }, "node_modules/set-blocking": { "version": "2.0.0", "license": "ISC" From a17f460fed6e8111618a6d3fe248a7a502b13de8 Mon Sep 17 00:00:00 2001 From: Maxime Beauchamp <15185355+baktun14@users.noreply.github.com> Date: Mon, 7 Oct 2024 15:18:58 -0400 Subject: [PATCH 6/7] fix(wallet): truncate long wallet name (address from mm) --- apps/deploy-web/src/components/layout/WalletStatus.tsx | 10 ++++++++-- packages/ui/components/custom/address.tsx | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/apps/deploy-web/src/components/layout/WalletStatus.tsx b/apps/deploy-web/src/components/layout/WalletStatus.tsx index f25c0b2f1..5b49d397d 100644 --- a/apps/deploy-web/src/components/layout/WalletStatus.tsx +++ b/apps/deploy-web/src/components/layout/WalletStatus.tsx @@ -30,6 +30,7 @@ import { UrlService } from "@src/utils/urlUtils"; import { FormattedDecimal } from "../shared/FormattedDecimal"; import { LinkTo } from "../shared/LinkTo"; import { ConnectWalletButton } from "../wallet/ConnectWalletButton"; +import { getSplitText } from "@src/hooks/useShortText"; const goToCheckout = () => { window.location.href = "/api/proxy/v1/checkout"; @@ -104,10 +105,15 @@ export function WalletStatus() { - {walletName} + {walletName?.length > 20 ? ( + {getSplitText(walletName, 4, 4)} + ) : ( + {walletName} + )} -
+
{walletName}
+
diff --git a/packages/ui/components/custom/address.tsx b/packages/ui/components/custom/address.tsx index add9479f2..ae70ac7b5 100644 --- a/packages/ui/components/custom/address.tsx +++ b/packages/ui/components/custom/address.tsx @@ -43,7 +43,7 @@ export const Address: React.FunctionComponent = ({ address, isCopyable, d {...rest} > {formattedAddress} - {isCopyable && } + {isCopyable && } ); From c2e7a7dd1409b64b3b14813947cdad0d1d8cd8c7 Mon Sep 17 00:00:00 2001 From: Maxime Beauchamp <15185355+baktun14@users.noreply.github.com> Date: Mon, 7 Oct 2024 15:30:19 -0400 Subject: [PATCH 7/7] chore: lint fixes + ignore leap test folder for linting --- apps/deploy-web/src/components/layout/WalletStatus.tsx | 2 +- apps/deploy-web/src/components/settings/CertificateList.tsx | 4 ++-- .../CertificateProvider/CertificateProviderContext.tsx | 2 +- .../src/context/CustomChainProvider/CustomChainProvider.tsx | 2 +- packages/dev-config/.eslintrc.base.js | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/deploy-web/src/components/layout/WalletStatus.tsx b/apps/deploy-web/src/components/layout/WalletStatus.tsx index 5b49d397d..d62748973 100644 --- a/apps/deploy-web/src/components/layout/WalletStatus.tsx +++ b/apps/deploy-web/src/components/layout/WalletStatus.tsx @@ -23,6 +23,7 @@ import { browserEnvConfig } from "@src/config/browser-env.config"; import { useWallet } from "@src/context/WalletProvider"; import { useLoginRequiredEventHandler } from "@src/hooks/useLoginRequiredEventHandler"; import { useManagedEscrowFaqModal } from "@src/hooks/useManagedEscrowFaqModal"; +import { getSplitText } from "@src/hooks/useShortText"; import { useWalletBalance } from "@src/hooks/useWalletBalance"; import { udenomToDenom } from "@src/utils/mathHelpers"; import { uaktToAKT } from "@src/utils/priceUtils"; @@ -30,7 +31,6 @@ import { UrlService } from "@src/utils/urlUtils"; import { FormattedDecimal } from "../shared/FormattedDecimal"; import { LinkTo } from "../shared/LinkTo"; import { ConnectWalletButton } from "../wallet/ConnectWalletButton"; -import { getSplitText } from "@src/hooks/useShortText"; const goToCheckout = () => { window.location.href = "/api/proxy/v1/checkout"; diff --git a/apps/deploy-web/src/components/settings/CertificateList.tsx b/apps/deploy-web/src/components/settings/CertificateList.tsx index 10cd555b2..cb4259960 100644 --- a/apps/deploy-web/src/components/settings/CertificateList.tsx +++ b/apps/deploy-web/src/components/settings/CertificateList.tsx @@ -1,7 +1,7 @@ "use client"; -import { useState, useEffect } from "react"; +import { useEffect,useState } from "react"; import { FormattedDate } from "react-intl"; -import { Button, Table, TableBody, TableCell, TableHead, TableHeader, TableRow, CustomPagination } from "@akashnetwork/ui/components"; +import { Button, CustomPagination,Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@akashnetwork/ui/components"; import { Check } from "iconoir-react"; import { ConnectWallet } from "@src/components/shared/ConnectWallet"; diff --git a/apps/deploy-web/src/context/CertificateProvider/CertificateProviderContext.tsx b/apps/deploy-web/src/context/CertificateProvider/CertificateProviderContext.tsx index deddee560..1bdc6a47e 100644 --- a/apps/deploy-web/src/context/CertificateProvider/CertificateProviderContext.tsx +++ b/apps/deploy-web/src/context/CertificateProvider/CertificateProviderContext.tsx @@ -7,11 +7,11 @@ import { useSnackbar } from "notistack"; import { RestApiCertificate } from "@src/types/certificate"; import { AnalyticsEvents } from "@src/utils/analytics"; +import { ApiUrlService, loadWithPagination } from "@src/utils/apiUtils"; import { TransactionMessageData } from "@src/utils/TransactionMessageData"; import { getStorageWallets, updateWallet } from "@src/utils/walletUtils"; import { useSettings } from "../SettingsProvider"; import { useWallet } from "../WalletProvider"; -import { ApiUrlService, loadWithPagination } from "@src/utils/apiUtils"; export type LocalCert = { certPem: string; diff --git a/apps/deploy-web/src/context/CustomChainProvider/CustomChainProvider.tsx b/apps/deploy-web/src/context/CustomChainProvider/CustomChainProvider.tsx index aab7d8d1e..35e3f207d 100644 --- a/apps/deploy-web/src/context/CustomChainProvider/CustomChainProvider.tsx +++ b/apps/deploy-web/src/context/CustomChainProvider/CustomChainProvider.tsx @@ -3,6 +3,7 @@ import "@interchain-ui/react/styles"; import "@interchain-ui/react/globalStyles"; import { GasPrice } from "@cosmjs/stargate"; +import { wallets as metamask } from "@cosmos-kit/cosmos-extension-metamask"; import { wallets as cosmostation } from "@cosmos-kit/cosmostation-extension"; import { wallets as keplr } from "@cosmos-kit/keplr"; import { wallets as leap } from "@cosmos-kit/leap"; @@ -12,7 +13,6 @@ 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 { wallets as metamask } from "@cosmos-kit/cosmos-extension-metamask"; type Props = { children: React.ReactNode; diff --git a/packages/dev-config/.eslintrc.base.js b/packages/dev-config/.eslintrc.base.js index a8d461aa5..0b6ca3f6f 100644 --- a/packages/dev-config/.eslintrc.base.js +++ b/packages/dev-config/.eslintrc.base.js @@ -5,7 +5,7 @@ module.exports = { }, extends: ["eslint:recommended"], plugins: ["simple-import-sort"], - ignorePatterns: ["node_modules", "dist", "build", "public"], + ignorePatterns: ["node_modules", "dist", "build", "public", "Leap"], rules: { "@typescript-eslint/no-unused-vars": ["error", { ignoreRestSiblings: true }], "simple-import-sort/imports": [