Skip to content

Commit

Permalink
[Release] Hotfix 2.27.0 => 2.27.1 (patch) (#11861)
Browse files Browse the repository at this point in the history
* chore: bump version to 2.27.1

* feat: mf-6319 refine wallet activities ui (#11862)

* feat: mf-6335 refine nft detail dialog (#11863)

* feat: mf-6335 refine nft detail dialog

* fix(Lens): mf-6417 handle overflow

* fix: mf-6525 redundant requests in check security dialog (#11864)

* fix: mf-6525 redundant requests in check security dialog

fix: mf-6524 adjust loading position

* Update packages/web3-providers/src/CoinGecko/apis/TrendingAPI.ts

---------

Co-authored-by: guanbinrui <[email protected]>

* chore: mf-6451 update firefly profile link (#11867)

* fix: mf-6332 handle unsend redpacket (#11866)

* fix: mf-6332 handle unsend redpacket

* fix: mf-6418 nft picker ui

* fixup! fix: mf-6332 handle unsend redpacket

* fix: mf-6453 render shared redpacket (#11868)

* fix: mf-6454 nft list empty status (#11869)

* feat: mf-6313 swap/bridge in popup (#11874)

* feat: mf-6313 swap/bridge in popup

* refactor: token picker

* refactor: adjust path

* feat: disable pending indicator in popup

* feat: tooltip in popup

* feat: read history

* fix: add snackbar in runtime

* fix: virtualize token list in token picker

* fix: run codegen

* fix: fixup

* fix: follow up reviews

---------

Co-authored-by: swkatmask <[email protected]>

* fixup! feat: mf-6313 swap/bridge in popup (#11874) (#11876)

* feat: mf-6358 farcaster/lens social feeds (#11877)

* feat: mf-6358 farcaster/lens social feeds

* fixup! feat: mf-6358 farcaster/lens social feeds

* fix: prettier

---------

Co-authored-by: swkatmask <[email protected]>

* fix: get rid of coinmarketcap (#11881)

* fix(CMC): update api version

* fix: get rid of coinmarketcap

* fix: update domain tests (#11883)

* fix: update domain tests

* fix: chrome execute content script

* fix: web_accessible_resources on chrome 130+

* fix: mf-6457 i18n in social feeds (#11886)

* feat: mf-6358 migrate finance feed source to zerion (#11880)

* feat: mf-6358 migrate finance feed source to zerion

* refactor: migrate to zerion api

* fix: mf-6460 user doesn't have lens handle

* fix: remove profile tab actions

* fix: follow up reviews

* fix: prettier

---------

Co-authored-by: swkatmask <[email protected]>

* fix: mf-6461 user avatar in tx details (#11889)

* fix: mf-6461 user avatar in tx details

* fix: run codegen

---------

Co-authored-by: swkatmask <[email protected]>

* fix: finance feed (#11890)

* fix: finance feed

* fix: run codegen

---------

Co-authored-by: swkatmask <[email protected]>

* fix: mf-6459 two mask buttons get injected into post editor (#11892)

Co-authored-by: guanbinrui <[email protected]>

* fix: mf-6458 profileId is required to generate claim signature (#11893)

Co-authored-by: guanbinrui <[email protected]>

---------

Co-authored-by: Wukong Sun <[email protected]>
Co-authored-by: swkatmask <[email protected]>
  • Loading branch information
3 people authored Nov 1, 2024
1 parent 8d038b7 commit 450c307
Show file tree
Hide file tree
Showing 174 changed files with 9,327 additions and 1,938 deletions.
7 changes: 7 additions & 0 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"avalanche",
"avax",
"avvy",
"basepath",
"bgcolor",
"bignumber",
"binancecoin",
Expand Down Expand Up @@ -136,6 +137,7 @@
"idbp",
"ifclaimed",
"imagebitmap",
"IMAGEKIT",
"immer",
"imtokenv",
"innerhtml",
Expand Down Expand Up @@ -214,6 +216,7 @@
"nftscan",
"nomics",
"nums",
"oembed",
"oeth",
"onekey",
"opengraph",
Expand Down Expand Up @@ -262,6 +265,7 @@
"realise",
"realmasknetwork",
"rebalance",
"recasted",
"redpacket",
"regedit",
"repayer",
Expand Down Expand Up @@ -307,6 +311,7 @@
"sushiswap",
"swappable",
"sysvar",
"taiko",
"tanstack",
"telos",
"testid",
Expand Down Expand Up @@ -337,6 +342,8 @@
"unstake",
"unstoppabledomains",
"unstyled",
"upvoted",
"upvotes",
"urlcat",
"userinfo",
"usermenu",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"yarn": ">=999.0.0",
"npm": ">=999.0.0"
},
"version": "2.27.0",
"version": "2.27.1",
"private": true,
"license": "AGPL-3.0-or-later",
"scripts": {
Expand Down
3 changes: 3 additions & 0 deletions packages/mask/.webpack/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,9 @@ export async function createConfiguration(_inputFlags: BuildFlags): Promise<webp
pure_getters: false,
sequences: false,
},
output: {
ascii_only: true,
},
mangle: false,
},
}),
Expand Down
2 changes: 1 addition & 1 deletion packages/mask/.webpack/manifest/manifest-mv3.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
{
"resources": ["js/*", "bundled/*", "entry/*", "*.svg", "*.png", "*.css", "build-info.json"],
"matches": ["<all_urls>"],
"use_dynamic_url": true
"use_dynamic_url": false
},
{
"resources": ["hot/*"],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useEffect, useMemo, useState, memo } from 'react'
import { useUpdateEffect } from 'react-use'
import { compact, first } from 'lodash-es'
import { first } from 'lodash-es'
import { TabContext } from '@mui/lab'
import { Tab, Typography } from '@mui/material'
import { Icons } from '@masknet/icons'
Expand Down Expand Up @@ -103,12 +103,6 @@ const useStyles = makeStyles()((theme) => {
color: theme.palette.text.secondary,
fontWeight: 700,
},
actions: {
marginLeft: 'auto',
display: 'inline-flex',
alignItems: 'center',
color: theme.palette.maskColor.main,
},
}
})

Expand Down Expand Up @@ -174,9 +168,6 @@ export const ProfileCard = memo(({ identity, currentAddress, ...rest }: Props) =
label: typeof x.label === 'string' ? x.label : translate(x.pluginID, x.label),
}))
}, [activatedPlugins, translate])
const tabActions = getAvailablePlugins(activatedPlugins, (plugins) => {
return compact(plugins.map((x) => x.ProfileTabActions))
})

const [currentTab, onChange] = useTabs(first(tabs)?.id ?? PluginID.Collectible, ...tabs.map((tab) => tab.id))

Expand Down Expand Up @@ -232,13 +223,6 @@ export const ProfileCard = memo(({ identity, currentAddress, ...rest }: Props) =
classes={{ root: classes.tabRoot, textColorPrimary: classes.tabRoot }}
/>
))}
{tabActions.length ?
<span className={classes.actions}>
{tabActions.map((Action, i) => (
<Action key={i} slot="profile-card" />
))}
</span>
: null}
</MaskTabList>
</TabContext>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
import { useUpdateEffect } from 'react-use'
import { compact, first } from 'lodash-es'
import { first } from 'lodash-es'
import { TabContext } from '@mui/lab'
import { Button, Stack, Tab, ThemeProvider, Typography } from '@mui/material'
import { Icons } from '@masknet/icons'
Expand Down Expand Up @@ -116,12 +116,6 @@ const useStyles = makeStyles()((theme) => ({
borderRadius: 20,
minWidth: 254,
},
actions: {
marginLeft: 'auto',
display: 'inline-flex',
alignItems: 'center',
color: theme.palette.maskColor.publicMain,
},
}))

interface ProfileTabContentProps extends withClasses<'text' | 'button' | 'root'> {}
Expand Down Expand Up @@ -208,10 +202,6 @@ function Content(props: ProfileTabContentProps) {
}))
}, [activatedPlugins, translate])

const tabActions = getAvailablePlugins(activatedPlugins, (plugins) => {
return compact(plugins.map((x) => x.ProfileTabActions))
})

const [currentTab, onChange] = useTabs(first(tabs)?.id ?? PluginID.Collectible, ...tabs.map((tab) => tab.id))

const isWeb3ProfileDisabled = useIsMinimalMode(PluginID.Web3Profile)
Expand Down Expand Up @@ -513,13 +503,6 @@ function Content(props: ProfileTabContentProps) {
{tabs.map((tab) => (
<Tab key={tab.id} label={tab.label} value={tab.id} />
))}
{tabActions.length ?
<span className={classes.actions}>
{tabActions.map((Action, i) => (
<Action key={i} slot="profile-page" />
))}
</span>
: null}
</MaskTabList>
</TabContext>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useEffect, useLayoutEffect, useMemo } from 'react'
import { useAsyncRetry } from 'react-use'
import { compact, first } from 'lodash-es'
import { first } from 'lodash-es'
import { TabContext } from '@mui/lab'
import { Stack, Tab } from '@mui/material'
import {
Expand All @@ -11,7 +11,6 @@ import {
useActivatedPluginsSiteAdaptor,
usePluginTransField,
useIsMinimalMode,
getAvailablePlugins,
} from '@masknet/plugin-infra/content-script'
import { EMPTY_LIST, PluginID, type SocialIdentity, type ProfileTabs } from '@masknet/shared-base'
import { makeStyles, MaskTabList, useTabs } from '@masknet/theme'
Expand Down Expand Up @@ -40,12 +39,6 @@ const useStyles = makeStyles<{ isProfilePage?: boolean; searchType?: SearchResul
display: 'none',
},
},
actions: {
marginLeft: 'auto',
display: 'inline-flex',
alignItems: 'center',
color: theme.palette.maskColor.publicMain,
},
}),
)

Expand Down Expand Up @@ -92,7 +85,7 @@ export function SearchResultInspector(props: SearchResultInspectorProps) {
timer1 && clearTimeout(timer1)
timer2 && clearTimeout(timer2)
}
}, [resultList, profileTabType])
}, [resultList.value, profileTabType])

const currentResult = props.currentSearchResult ?? resultList.value?.[0]

Expand All @@ -117,9 +110,6 @@ export function SearchResultInspector(props: SearchResultInspectorProps) {
if (!currentResult) return EMPTY_LIST
return getSearchResultTabs(activatedPlugins, currentResult, translate)
}, [activatedPlugins, resultList.value, translate])
const tabActions = getAvailablePlugins(activatedPlugins, (plugins) => {
return compact(plugins.map((x) => x.ProfileTabActions))
})

const defaultTab = first(tabs)?.id ?? PluginID.Collectible
const [currentTab, onChange, , setTab] = useTabs(defaultTab, ...tabs.map((tab) => tab.id))
Expand Down Expand Up @@ -149,13 +139,6 @@ export function SearchResultInspector(props: SearchResultInspectorProps) {
{tabs.map((tab) => (
<Tab key={tab.id} label={tab.label} value={tab.id} />
))}
{tabActions.length ?
<span className={classes.actions}>
{tabActions.map((Action, i) => (
<Action key={i} slot="search" />
))}
</span>
: null}
</MaskTabList>
</TabContext>
</Stack>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,14 @@ function resolveLastRecognizedIdentityInner(
searchSelfHandleSelector().evaluate()?.dataset.testid?.trim().slice('UserAvatar-Container-'.length) ||
selfInfo.handle
const nickname = getNickname(selfInfo.nickname) ?? ''
const userInfo = handle ? await FireflyTwitter.getUserInfo(handle) : null

if (handle) {
ref.value = {
avatar,
nickname,
identifier: ProfileIdentifier.of(twitterBase.networkIdentifier, handle).unwrapOr(undefined),
profileId: userInfo?.rest_id,
isOwner: true,
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,9 @@ export function postEditorContentInPopupSelector() {
)
}
export function postEditorInPopupSelector() {
return querySelector<E>('div[data-testid="toolBar"] [role="presentation"]:has(> button[data-testid="geoButton"])')
return querySelector<E>(
'[role="dialog"] div[data-testid="toolBar"] [role="presentation"]:has(> button[data-testid="geoButton"])',
)
}
export function sideBarProfileSelector() {
return querySelector<E>('[role="banner"] [role="navigation"] [data-testid="AppTabBar_Profile_Link"] > div')
Expand Down
2 changes: 2 additions & 0 deletions packages/mask/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@
"react-qrcode-logo": "^3.0.0",
"react-router-dom": "^6.24.0",
"react-use": "^17.5.0",
"react-window": "^1.8.10",
"stream-browserify": "^3.0.0",
"stream-http": "^2.8.3",
"url": "^0.11.3",
Expand All @@ -150,6 +151,7 @@
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.15",
"@types/color": "^3.0.6",
"@types/react-devtools-inline": "^4.24.8",
"@types/react-window": "^1.8.8",
"babel-plugin-react-compiler": "0.0.0-experimental-938cd9a-20240601",
"copy-webpack-plugin": "^12.0.2",
"devtools-ignore-webpack-plugin": "^0.1.2",
Expand Down
2 changes: 2 additions & 0 deletions packages/mask/popups/Popup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import { PersonaFrame, personaRoute } from './pages/Personas/index.js'
import { WalletFrame, walletRoutes } from './pages/Wallet/index.js'
import { ContactsFrame, contactsRoutes } from './pages/Friends/index.js'
import { ErrorBoundaryUIOfError } from '../../shared-base-ui/src/components/ErrorBoundary/ErrorBoundary.js'
import { TraderFrame, traderRoutes } from './pages/Trader/index.js'

const personaInitialState = {
queryOwnedPersonaInformation: Services.Identity.queryOwnedPersonaInformation,
Expand Down Expand Up @@ -84,6 +85,7 @@ const router = createHashRouter([
{ path: PopupRoutes.Wallet, element: <WalletFrame />, children: walletRoutes },
{ path: PopupRoutes.Friends, element: <ContactsFrame />, children: contactsRoutes },
{ path: PopupRoutes.Settings, lazy: () => import('./pages/Settings/index.js') },
{ path: PopupRoutes.Trader, element: <TraderFrame />, children: traderRoutes },
],
},
{ path: PopupRoutes.RequestPermission, lazy: () => import('./pages/RequestPermission/index.js') },
Expand Down
16 changes: 13 additions & 3 deletions packages/mask/popups/components/NormalHeader/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ const useStyles = makeStyles()((theme) => ({
}))

interface NormalHeaderProps {
/** Override header title in context */
title?: string
tabList?: ReactNode
/** Override header extension in context */
extension?: ReactNode
onClose?: () => void
}

Expand All @@ -54,11 +58,17 @@ function canNavBack() {
} catch {}
return false
}
export const NormalHeader = memo<NormalHeaderProps>(function NormalHeader(props) {
const { onClose, tabList } = props
export const NormalHeader = memo<NormalHeaderProps>(function NormalHeader({
onClose,
title: propTitle,
extension: propExtension,
tabList,
}) {
const { classes } = useStyles()
const navigate = useNavigate()
const { title, extension, customBackHandler } = useContext(PageTitleContext)
const { title: contextTitle, extension: contextExtension, customBackHandler } = useContext(PageTitleContext)
const title = propTitle || contextTitle
const extension = propExtension || contextExtension

const canBack = canNavBack()
const showTitle = title !== undefined
Expand Down
16 changes: 9 additions & 7 deletions packages/mask/popups/components/TokenPicker/TokenItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ const useStyles = makeStyles()((theme) => {
})

export interface TokenItemProps extends Omit<ListItemProps, 'onSelect'> {
asset: Web3Helper.FungibleAssetAll
network: ReasonableNetwork<Web3Helper.ChainIdAll, Web3Helper.SchemaTypeAll, Web3Helper.NetworkTypeAll>
asset: Web3Helper.FungibleAssetAll | Web3Helper.FungibleTokenAll
network?: ReasonableNetwork<Web3Helper.ChainIdAll, Web3Helper.SchemaTypeAll, Web3Helper.NetworkTypeAll>
selected?: boolean

onSelect?(asset: Web3Helper.FungibleAssetAll): void
onSelect?(asset: Web3Helper.FungibleAssetAll | Web3Helper.FungibleTokenAll): void
}

export const TokenItem = memo(function TokenItem({
Expand Down Expand Up @@ -110,13 +110,14 @@ export const TokenItem = memo(function TokenItem({
const [seen, ref] = useEverSeen<HTMLLIElement>()
// Debank might not provide asset from current custom network
const supportedByDebank = CHAIN_ID_TO_DEBANK_CHAIN_MAP[asset.chainId]
const tryRpc = !supportedByDebank && seen
const tryRpc = (!supportedByDebank || !('balance' in asset)) && seen
const { data: rpcBalance, isPending } = useFungibleTokenBalance(
NetworkPluginID.PLUGIN_EVM,
asset.address,
{ chainId: asset.chainId as ChainId, providerURL },
tryRpc,
)
const assetBalance = 'balance' in asset ? asset.balance : undefined
const balance = useMemo(() => {
if (tryRpc) {
return {
Expand All @@ -126,9 +127,9 @@ export const TokenItem = memo(function TokenItem({
}
return {
pending: false,
value: formatTokenBalance(asset.balance, asset.decimals),
value: formatTokenBalance(assetBalance, asset.decimals),
}
}, [tryRpc, rpcBalance, asset.balance, asset.decimals, isPending])
}, [tryRpc, rpcBalance, assetBalance, asset.decimals, isPending])
// #endregion

const forkedRef = useForkRef(liRef, ref)
Expand All @@ -153,12 +154,13 @@ export const TokenItem = memo(function TokenItem({
chainId={asset.chainId}
address={asset.address}
name={asset.name}
logoURL={asset.logoURL}
size={36}
/>
<NetworkIcon
className={classes.badgeIcon}
pluginID={NetworkPluginID.PLUGIN_EVM}
chainId={network.chainId}
chainId={network?.chainId || asset.chainId}
size={16}
network={network}
/>
Expand Down
Loading

0 comments on commit 450c307

Please sign in to comment.