From bbc66512c6920b3e1ab2ff28cffe632b09f6858d Mon Sep 17 00:00:00 2001 From: zhouhanseng Date: Mon, 21 Feb 2022 18:39:27 +0800 Subject: [PATCH 1/2] fix: artblock switch chain --- packages/mask/src/plugins/ArtBlocks/SNSAdaptor/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mask/src/plugins/ArtBlocks/SNSAdaptor/index.tsx b/packages/mask/src/plugins/ArtBlocks/SNSAdaptor/index.tsx index 36c0f902d2b0..0319226182da 100644 --- a/packages/mask/src/plugins/ArtBlocks/SNSAdaptor/index.tsx +++ b/packages/mask/src/plugins/ArtBlocks/SNSAdaptor/index.tsx @@ -30,7 +30,7 @@ function Renderer(props: React.PropsWithChildren<{ chainId: ChainId; projectId: return ( [ChainId.Mainnet, ChainId.Ropsten].includes(props.chainId)}> + isValidChainId={(chainId) => [ChainId.Mainnet, ChainId.Ropsten].includes(chainId)}> ) From 997cc08fb00e5c5e64ea9f4bd580885bc614f964 Mon Sep 17 00:00:00 2001 From: zhouhanseng Date: Mon, 21 Feb 2022 20:39:39 +0800 Subject: [PATCH 2/2] fix: artblock switch chain --- packages/mask/src/plugins/ArtBlocks/SNSAdaptor/index.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/mask/src/plugins/ArtBlocks/SNSAdaptor/index.tsx b/packages/mask/src/plugins/ArtBlocks/SNSAdaptor/index.tsx index 0319226182da..8b3e0ecef75b 100644 --- a/packages/mask/src/plugins/ArtBlocks/SNSAdaptor/index.tsx +++ b/packages/mask/src/plugins/ArtBlocks/SNSAdaptor/index.tsx @@ -5,7 +5,7 @@ import { checkUrl, getAssetInfoFromURL, getRelevantUrl } from '../utils' import { base } from '../base' import { getTypedMessageContent } from '../../../protocols/typed-message' import { Collectible } from './Collectible' -import { ChainId } from '@masknet/web3-shared-evm' +import type { ChainId } from '@masknet/web3-shared-evm' import { EthereumChainBoundary } from '../../../web3/UI/EthereumChainBoundary' const sns: Plugin.SNSAdaptor.Definition = { @@ -28,9 +28,7 @@ const sns: Plugin.SNSAdaptor.Definition = { function Renderer(props: React.PropsWithChildren<{ chainId: ChainId; projectId: string }>) { usePluginWrapper(true) return ( - [ChainId.Mainnet, ChainId.Ropsten].includes(chainId)}> + )