Skip to content

Commit c303caf

Browse files
committed
fix: linter
1 parent 834016e commit c303caf

26 files changed

Lines changed: 593 additions & 735 deletions

File tree

packages/mask/background/services/identity/persona/query.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,7 @@ export async function queryPersonaEOAByPrivateKey(privateKeyString: string) {
8787
}
8888
}
8989

90-
export async function querySocialIdentity(
91-
identity: IdentityResolved | undefined,
92-
): Promise<SocialIdentity | undefined> {
90+
export async function querySocialIdentity(identity: IdentityResolved | undefined): Promise<SocialIdentity | undefined> {
9391
if (!identity?.identifier) return
9492
const persona = await queryPersonaByProfile(identity.identifier)
9593
if (!persona) return identity

packages/mask/background/services/identity/profile/update.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
import {
2-
type PersonaIdentifier,
3-
ProfileIdentifier,
4-
} from '@masknet/shared-base'
1+
import { type PersonaIdentifier, ProfileIdentifier } from '@masknet/shared-base'
52
import { storeAvatar } from '../../../database/avatar-cache/avatar.js'
63
import {
74
attachProfileDB,

packages/mask/content-script/components/InjectedComponents/DecryptedPost/DecryptedPostSuccess.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,7 @@ import { Trans } from '@lingui/react/macro'
33
import { Icons } from '@masknet/icons'
44
import { delay } from '@masknet/kit'
55
import { PostInfoContext, usePostInfoDetails, usePostInfoPostIVIdentifier } from '@masknet/plugin-infra/content-script'
6-
import {
7-
EMPTY_LIST,
8-
MaskMessages,
9-
type ProfileIdentifier,
10-
type ProfileInformation,
11-
} from '@masknet/shared-base'
6+
import { EMPTY_LIST, MaskMessages, type ProfileIdentifier, type ProfileInformation } from '@masknet/shared-base'
127
import { makeStyles } from '@masknet/theme'
138
import type { TypedMessage } from '@masknet/typed-message'
149
import { Typography, useTheme } from '@mui/material'

packages/mask/popups/hooks/useFriendsFromSearch.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@ export type NextIDPersonaBindingsWithIdentifier = {
2020
avatar?: string
2121
}
2222

23-
export function useFriendsFromSearch(
24-
localSearchedResult: Friend[],
25-
): NextIDPersonaBindingsWithIdentifier[] {
23+
export function useFriendsFromSearch(localSearchedResult: Friend[]): NextIDPersonaBindingsWithIdentifier[] {
2624
const currentIdentifier = useCurrentLinkedPersona()
2725
return useMemo(() => {
2826
if (!localSearchedResult?.length) return EMPTY_LIST

packages/mask/popups/pages/Friends/ContactCard/index.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,7 @@ interface ContactCardProps {
5353
refetch?: () => void
5454
}
5555

56-
export const ContactCard = memo<ContactCardProps>(function ContactCard({
57-
friend,
58-
avatar,
59-
refetch,
60-
}) {
56+
export const ContactCard = memo<ContactCardProps>(function ContactCard({ friend, avatar, refetch }) {
6157
const theme = useTheme()
6258
const { classes } = useStyles()
6359
const navigate = useNavigate()

packages/mask/popups/pages/Friends/Contacts/index.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,7 @@ export const Contacts = memo<ContactsProps>(function Contacts({ friendsArray, fe
4848
: <Box className={classes.cardContainer}>
4949
{friendsArray.map(({ friends }) => {
5050
return friends.map((friend) => (
51-
<ContactCard
52-
key={friend.persona.publicKeyAsHex}
53-
friend={friend}
54-
avatar={friend.avatar}
55-
/>
51+
<ContactCard key={friend.persona.publicKeyAsHex} friend={friend} avatar={friend.avatar} />
5652
))
5753
})}
5854
<ElementAnchor callback={() => fetchNextPage()} height={10} />

packages/mask/popups/pages/Friends/Home/index.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
import { useLingui } from '@lingui/react/macro'
22
import { EMPTY_LIST } from '@masknet/shared-base'
33
import { memo, useState } from 'react'
4-
import {
5-
useFriendsPaged,
6-
useTitle,
7-
} from '../../../hooks/index.js'
4+
import { useFriendsPaged, useTitle } from '../../../hooks/index.js'
85
import { FriendsHomeUI } from './UI.js'
96

107
export const Component = memo(function FriendsHome() {

packages/mask/popups/pages/Personas/AccountDetail/UI.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,7 @@ interface AccountDetailUIProps {
3535
account: ProfileAccount
3636
}
3737

38-
export const AccountDetailUI = memo<AccountDetailUIProps>(function AccountDetailUI({
39-
account,
40-
}) {
38+
export const AccountDetailUI = memo<AccountDetailUIProps>(function AccountDetailUI({ account }) {
4139
const { classes } = useStyles()
4240
const navigate = useNavigate()
4341
const handleBack = useCallback(() => navigate(-1), [])
@@ -54,9 +52,7 @@ export const AccountDetailUI = memo<AccountDetailUIProps>(function AccountDetail
5452
<Typography className={classes.identity}>@{account.nickname}</Typography>
5553
</Box>
5654
<Typography className={classes.tips}>
57-
<Trans>
58-
Display the following address on your Web3 profile page and use it to receive tips.
59-
</Trans>
55+
<Trans>Display the following address on your Web3 profile page and use it to receive tips.</Trans>
6056
</Typography>
6157

6258
<WalletList />

packages/mask/popups/pages/Personas/AccountDetail/index.tsx

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,20 +52,13 @@ export const Component = memo(() => {
5252
setExtension(
5353
selectedAccount?.linkedPersona ?
5454
<Icons.Trash size={24} onClick={handleDetachProfile} />
55-
: <Icons.Disconnect
56-
size={24}
57-
onClick={handleDetachProfile}
58-
/>,
55+
: <Icons.Disconnect size={24} onClick={handleDetachProfile} />,
5956
)
6057
return () => setExtension(undefined)
6158
}, [selectedAccount, handleDetachProfile, currentPersona])
6259

6360
if (!selectedAccount) return null
6461

65-
return (
66-
<AccountDetailUI
67-
account={selectedAccount}
68-
/>
69-
)
62+
return <AccountDetailUI account={selectedAccount} />
7063
})
7164
Component.displayName = 'AccountDetail'

packages/mask/popups/pages/Personas/ConnectWallet/index.tsx

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,8 @@
11
import { Icons } from '@masknet/icons'
22
import { FormattedAddress, PopupHomeTabType } from '@masknet/shared'
3-
import {
4-
PopupModalRoutes,
5-
PopupRoutes,
6-
type NetworkPluginID,
7-
} from '@masknet/shared-base'
3+
import { PopupModalRoutes, PopupRoutes, type NetworkPluginID } from '@masknet/shared-base'
84
import { ActionButton, makeStyles } from '@masknet/theme'
9-
import {
10-
useChainContext,
11-
useNetworkContext,
12-
useReverseAddress,
13-
useWallets,
14-
} from '@masknet/web3-hooks-base'
5+
import { useChainContext, useNetworkContext, useReverseAddress, useWallets } from '@masknet/web3-hooks-base'
156
import { EVMExplorerResolver, EVMProviderResolver, EVMWeb3 } from '@masknet/web3-providers'
167
import { isSameAddress } from '@masknet/web3-shared-base'
178
import { formatDomainName, formatEthereumAddress, ProviderType } from '@masknet/web3-shared-evm'
@@ -148,9 +139,8 @@ export const Component = memo(function ConnectWalletPage() {
148139
</Box>
149140
<Typography className={classes.description}>
150141
<Trans>
151-
Adding your wallets will allow you to own, view, and utilize your digital identities.
152-
Note that you will be required to sign and authenticate the transaction to prove ownership of your
153-
wallet.
142+
Adding your wallets will allow you to own, view, and utilize your digital identities. Note that you
143+
will be required to sign and authenticate the transaction to prove ownership of your wallet.
154144
</Trans>
155145
</Typography>
156146
<BottomController>

0 commit comments

Comments
 (0)