Skip to content

Commit 033384b

Browse files
guanbinruiguanbinruiswkatmask
authored
[Release] Hotfix 2.32.0 => 2.32.1 (patch) (#12168)
* chore: update version to 2.32.1 * chore: update solana default rpc endpoint (#12169) * chore: mf-6664 hide swap buttons (#12170) * chore: mf-6664 hide swap buttons * fixup! chore: mf-6664 hide swap buttons --------- Co-authored-by: guanbinrui <[email protected]> Co-authored-by: Wukong Sun <[email protected]>
1 parent 61b4f7a commit 033384b

File tree

7 files changed

+55
-46
lines changed

7 files changed

+55
-46
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"yarn": ">=999.0.0",
88
"npm": ">=999.0.0"
99
},
10-
"version": "2.32.0",
10+
"version": "2.32.1",
1111
"private": true,
1212
"license": "AGPL-3.0-or-later",
1313
"scripts": {

packages/mask/.webpack/config.ts

+2
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,8 @@ export async function createConfiguration(
236236
MASK_SENTRY: process.env.MASK_SENTRY || JSON.stringify('disabled'),
237237
MASK_MIXPANEL: process.env.MASK_MIXPANEL || JSON.stringify('disabled'),
238238
NEXT_PUBLIC_FIREFLY_API_URL: process.env.NEXT_PUBLIC_FIREFLY_API_URL || '',
239+
SOLANA_DEFAULT_RPC_URL: process.env.SOLANA_DEFAULT_RPC_URL || '',
240+
MASK_ENABLE_EXCHANGE: process.env.MASK_ENABLE_EXCHANGE || '',
239241
}),
240242
new (rspack?.DefinePlugin || webpack.default.DefinePlugin)({
241243
'process.browser': 'true',

packages/mask/popups/pages/Wallet/components/ActionGroup/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export const ActionGroup = memo(function ActionGroup({ className, chainId, addre
102102
<Trans>Receive</Trans>
103103
</Typography>
104104
</button>
105-
{supported || isLoading ?
105+
{supported ?
106106
<button
107107
type="button"
108108
className={classes.button}

packages/plugins/RedPacket/src/SiteAdaptor/helpers/getSolanaProvider.ts

+3-4
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@ import { NetworkPluginID } from '@masknet/shared-base'
66
import { getConnection } from '@masknet/web3-providers'
77
import type { Cluster } from '@solana/web3.js'
88

9+
const SOLANA_ENDPOINT =
10+
process.env.SOLANA_DEFAULT_RPC_URL || 'https://solana-mainnet.g.alchemy.com/v2/7ktku04g0dx9l6ijyba3fy99h0ic0xf3'
911
export async function getSolanaConnection(cluster: Cluster | undefined) {
10-
const url =
11-
!cluster || cluster === 'mainnet-beta' ?
12-
'https://long-intensive-shard.solana-mainnet.quiknode.pro/bc297481b248232bcd0dc95197d5b32a8981539c'
13-
: SolanaWeb3.clusterApiUrl(cluster)
12+
const url = !cluster || cluster === 'mainnet-beta' ? SOLANA_ENDPOINT : SolanaWeb3.clusterApiUrl(cluster)
1413
return new SolanaWeb3.Connection(url, 'confirmed')
1514
}
1615

packages/plugins/Trader/src/SiteAdaptor/index.tsx

+44-38
Original file line numberDiff line numberDiff line change
@@ -71,44 +71,50 @@ const site: Plugin.SiteAdaptor.Definition = {
7171
)
7272
},
7373
enhanceTag,
74-
ApplicationEntries: [
75-
(() => {
76-
const icon = <Icons.SwapColorful size={36} />
77-
const name = <Trans>Exchange</Trans>
78-
const iconFilterColor = 'rgba(247, 147, 30, 0.3)'
79-
return {
80-
ApplicationEntryID: base.ID,
81-
RenderEntryComponent(EntryComponentProps) {
82-
return (
83-
<ApplicationEntry
84-
{...EntryComponentProps}
85-
title={name}
86-
icon={icon}
87-
iconFilterColor={iconFilterColor}
88-
onClick={() => {
89-
EntryComponentProps.onClick ? EntryComponentProps.onClick(openDialog) : openDialog()
90-
Telemetry.captureEvent(EventType.Access, EventID.EntryAppSwapOpen)
91-
}}
92-
/>
93-
)
94-
},
95-
appBoardSortingDefaultPriority: 7,
96-
marketListSortingPriority: 7,
97-
icon,
98-
category: 'dapp',
99-
name,
100-
tutorialLink: 'https://realmasknetwork.notion.site/f2e7d081ee38487ca1db958393ac1edc',
101-
description: (
102-
<Trans>
103-
Pop-up trading widget allows you to instantly view prices of the hottest Crypto/Stock and trade,
104-
also invest in the best performing managers.
105-
</Trans>
106-
),
107-
iconFilterColor,
108-
hiddenInList: true,
109-
}
110-
})(),
111-
],
74+
ApplicationEntries:
75+
// temporarily disabled
76+
process.env.MASK_ENABLE_EXCHANGE ?
77+
[
78+
(() => {
79+
const icon = <Icons.SwapColorful size={36} />
80+
const name = <Trans>Exchange</Trans>
81+
const iconFilterColor = 'rgba(247, 147, 30, 0.3)'
82+
return {
83+
ApplicationEntryID: base.ID,
84+
RenderEntryComponent(EntryComponentProps) {
85+
return (
86+
<ApplicationEntry
87+
{...EntryComponentProps}
88+
title={name}
89+
icon={icon}
90+
iconFilterColor={iconFilterColor}
91+
onClick={() => {
92+
EntryComponentProps.onClick ?
93+
EntryComponentProps.onClick(openDialog)
94+
: openDialog()
95+
Telemetry.captureEvent(EventType.Access, EventID.EntryAppSwapOpen)
96+
}}
97+
/>
98+
)
99+
},
100+
appBoardSortingDefaultPriority: 7,
101+
marketListSortingPriority: 7,
102+
icon,
103+
category: 'dapp',
104+
name,
105+
tutorialLink: 'https://realmasknetwork.notion.site/f2e7d081ee38487ca1db958393ac1edc',
106+
description: (
107+
<Trans>
108+
Pop-up trading widget allows you to instantly view prices of the hottest Crypto/Stock
109+
and trade, also invest in the best performing managers.
110+
</Trans>
111+
),
112+
iconFilterColor,
113+
hiddenInList: true,
114+
}
115+
})(),
116+
]
117+
: [],
112118
wrapperProps: {
113119
icon: <Icons.SwapColorful size={24} style={{ filter: 'drop-shadow(0px 6px 12px rgba(254, 156, 0, 0.2))' }} />,
114120
backgroundGradient:

packages/plugins/Trader/src/SiteAdaptor/trader/hooks/useSupportedChains.ts

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { OKX } from '@masknet/web3-providers'
22
import { useQuery } from '@tanstack/react-query'
33

44
export const getSupportedChainsOptions = {
5+
enabled: false, // TODO: Temporarily disabled due to OKX server downtime.
56
queryKey: ['okx-swap', 'supported-chains'],
67
queryFn: async () => {
78
const chains = await OKX.getSupportedChains()

packages/plugins/Trader/src/SiteAdaptor/trending/TrendingView.tsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ export function TrendingView(props: TrendingViewProps) {
194194
const isBRC20 = trending?.coin.tags?.includes('BRC-20')
195195

196196
const isSwappable =
197+
!!process.env.MASK_ENABLE_EXCHANGE &&
197198
!isMinimalMode &&
198199
!isNFT &&
199200
!isBRC20 &&
@@ -206,7 +207,7 @@ export function TrendingView(props: TrendingViewProps) {
206207
const list = [ContentTab.Market, ContentTab.Price, ContentTab.Exchange]
207208
if (isNFT) list.push(ContentTab.NFTItems)
208209
return list
209-
}, [isSwappable, isNFT])
210+
}, [isNFT])
210211
const [currentTab, , , setTab] = useTabs<ContentTab>(tabs[0], ...tabs)
211212
useLayoutEffect(() => {
212213
setTab(tabs[0])
@@ -234,7 +235,7 @@ export function TrendingView(props: TrendingViewProps) {
234235
: undefined,
235236
]
236237
return compact(configs).map((x) => <Tab value={x.key} key={x.key} label={x.label} />)
237-
}, [isSwappable, isNFT])
238+
}, [isNFT])
238239
// #endregion
239240

240241
const { classes } = useStyles({ isTokenTagPopper, isCollectionProjectPopper, currentTab })

0 commit comments

Comments
 (0)