Skip to content

Commit

Permalink
chore: disable polkagate support
Browse files Browse the repository at this point in the history
  • Loading branch information
Ross Bulat committed Apr 6, 2024
1 parent bd26840 commit d22e743
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 23 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
"@polkadot/util-crypto": "^12.6.2",
"@polkawatch/ddp-client": "^2.0.11",
"@substrate/connect": "0.7.35",
"@w3ux/extension-assets": "^0.2.4",
"@w3ux/extension-assets": "0.2.6",
"@w3ux/hooks": "^0.0.3",
"@w3ux/react-connect-kit": "^0.1.2",
"@w3ux/react-connect-kit": "0.1.6",
"@w3ux/react-odometer": "^0.0.3",
"@w3ux/react-polkicon": "^0.0.2",
"@w3ux/utils": "^0.0.2",
Expand Down
2 changes: 1 addition & 1 deletion src/Providers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const Providers = () => {
[APIProvider, { network }],
VaultAccountsProvider,
LedgerHardwareProvider,
ExtensionsProvider,
[ExtensionsProvider, { options: { chainSafeSnapEnabled: true } }],
[
ExtensionAccountsProvider,
{ dappName: DappName, network, ss58, activeAccount, setActiveAccount },
Expand Down
16 changes: 10 additions & 6 deletions src/modals/Connect/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// SPDX-License-Identifier: GPL-3.0-only

import { faChevronRight } from '@fortawesome/free-solid-svg-icons';
import extensions from '@w3ux/extension-assets';
import { useEffect, useRef, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { Close } from 'library/Modal/Close';
Expand All @@ -26,6 +25,8 @@ import { ModalMotionThreeSection } from 'kits/Overlay/structure/ModalMotionThree
import { ModalPadding } from 'kits/Overlay/structure/ModalPadding';
import { useExtensions } from '@w3ux/react-connect-kit';
import { useEffectIgnoreInitial } from '@w3ux/hooks';
import extensions from '@w3ux/extension-assets';
import type { ExtensionArrayListItem } from '@w3ux/extension-assets/util';

export const Connect = () => {
const { t } = useTranslation('modals');
Expand All @@ -44,12 +45,15 @@ export const Connect = () => {
// Whether the app is running on of mobile wallets.
const inMobileWallet = inNova || inSubWallet;

// If in SubWallet Mobile, keep `subwallet-js` only.
const extensionsAsArray = Object.entries(extensions).map(([key, value]) => ({
id: key,
...value,
}));
// Get supported extensions. NOTE: Snaps are currently disabled.
const extensionsAsArray = Object.entries(extensions)
.filter(([key]) => !['polkagate-snap'].includes(key))
.map(([key, value]) => ({
id: key,
...value,
})) as ExtensionArrayListItem[];

// If in SubWallet Mobile, keep `subwallet-js` only.
const web = inSubWallet
? extensionsAsArray.filter((a) => a.id === 'subwallet-js')
: // If in Nova Wallet, fetch nova wallet metadata and replace its id with `polkadot-js`.
Expand Down
1 change: 1 addition & 0 deletions src/modals/Connect/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export interface ExtensionMetaProps {
url: string;
text: string;
};
otherEcosystems?: string[];
}

export interface ListWithInputProps {
Expand Down
28 changes: 14 additions & 14 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2546,21 +2546,21 @@ __metadata:
languageName: node
linkType: hard

"@w3ux/extension-assets@npm:^0.2.3":
version: 0.2.3
resolution: "@w3ux/extension-assets@npm:0.2.3"
"@w3ux/extension-assets@npm:0.2.6":
version: 0.2.6
resolution: "@w3ux/extension-assets@npm:0.2.6"
peerDependencies:
react: ^18
checksum: 10c0/7cda51bf0653e22df71f46c1bd449df8605433e1b6d1ffc85f1b9d468d2da57377aada90783d21e4b737570098f22a10a46c94cc3e4b278d36962591db80f73e
checksum: 10c0/e789249b579c8786669cbeb13e0835bd790a092b61964f7714ec758b6d8b211287e09b934b02890991ffa660ba8bc18626364f5d7bf111e42ae640bb48258691
languageName: node
linkType: hard

"@w3ux/extension-assets@npm:^0.2.4":
version: 0.2.4
resolution: "@w3ux/extension-assets@npm:0.2.4"
"@w3ux/extension-assets@npm:^0.2.3":
version: 0.2.3
resolution: "@w3ux/extension-assets@npm:0.2.3"
peerDependencies:
react: ^18
checksum: 10c0/a5609003a211b8106218177596d9d67861761e50d540c0af47c884dd9e168cb1371db1b0b0c14e46e986b16ec5883246b86e11ed607eedde866db49b37ba0a88
checksum: 10c0/7cda51bf0653e22df71f46c1bd449df8605433e1b6d1ffc85f1b9d468d2da57377aada90783d21e4b737570098f22a10a46c94cc3e4b278d36962591db80f73e
languageName: node
linkType: hard

Expand All @@ -2573,17 +2573,17 @@ __metadata:
languageName: node
linkType: hard

"@w3ux/react-connect-kit@npm:^0.1.2":
version: 0.1.2
resolution: "@w3ux/react-connect-kit@npm:0.1.2"
"@w3ux/react-connect-kit@npm:0.1.6":
version: 0.1.6
resolution: "@w3ux/react-connect-kit@npm:0.1.6"
dependencies:
"@chainsafe/metamask-polkadot-adapter": "npm:^0.6.0"
"@polkadot/util": "npm:^12.6.2"
"@polkagate/extension-dapp": "npm:^0.46.7-22"
"@w3ux/extension-assets": "npm:^0.2.3"
"@w3ux/hooks": "npm:^0.0.3"
"@w3ux/utils": "npm:^0.0.2"
checksum: 10c0/708cf3f44e7f52f3cb5862fde553252fac8906c1c6c574145fa5b3b90cb8abe98cb2abcfc5533b7bebe48db521b63f08a134fd8502a459740b83f9d586858a8f
checksum: 10c0/77046448b22062770006cae03dd25c33ff8ab69130a8fc46c3643b70d1519e41df52a683193f7a68ade1e015343eaebd5f63083ada3cd7a11611e5da8d7fef4c
languageName: node
linkType: hard

Expand Down Expand Up @@ -6525,9 +6525,9 @@ __metadata:
"@typescript-eslint/eslint-plugin": "npm:^7.5.0"
"@typescript-eslint/parser": "npm:^7.4.0"
"@vitejs/plugin-react-swc": "npm:^3.6.0"
"@w3ux/extension-assets": "npm:^0.2.4"
"@w3ux/extension-assets": "npm:0.2.6"
"@w3ux/hooks": "npm:^0.0.3"
"@w3ux/react-connect-kit": "npm:^0.1.2"
"@w3ux/react-connect-kit": "npm:0.1.6"
"@w3ux/react-odometer": "npm:^0.0.3"
"@w3ux/react-polkicon": "npm:^0.0.2"
"@w3ux/utils": "npm:^0.0.2"
Expand Down

0 comments on commit d22e743

Please sign in to comment.