Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"constructor-super": "error",
"dot-notation": "error",
"eqeqeq": "error",
"object-shorthand": "warn",
"no-var": "error",
"no-bitwise": "error",
"no-debugger": "error",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"build-ios": "build --preset iOS",
"lint": "eslint -c packages/.eslintrc.json packages --ext .ts,.tsx,.js --cache --fix",
"lint:ci": "eslint -c packages/.eslintrc.json packages --ext .ts,.tsx,.js --cache",
"lint:ci-report": "pnpm lint:ci -- --format=junit --output-file=reports/junit/eslint-results.xml",
"lint:ci-report": "pnpm lint:ci -- --format=junit --output-file=reports/junit/eslint-results.xml --max-warnings=0",
"postinstall": "patch-package",
"prepare": "husky install",
"test": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js",
Expand Down
4 changes: 2 additions & 2 deletions packages/backup-format/src/version-2/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export function normalizeBackupVersion2(item: BackupJSONFileVersion2): Normalize
foundAt: new Date(post.foundAt),
postBy: postBy.unwrapOr(undefined),
interestedMeta,
encryptBy: encryptBy,
encryptBy,
summary: post.summary ? Some(post.summary) : None,
url: post.url ? Some(post.url) : None,
postCryptoKey: isAESJsonWebKey(post.postCryptoKey) ? Some(post.postCryptoKey) : None,
Expand Down Expand Up @@ -137,7 +137,7 @@ export function normalizeBackupVersion2(item: BackupJSONFileVersion2): Normalize
backup.relations.push({
profile: a.val,
persona: b.val,
favor: favor,
favor,
})
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/dashboard/src/components/MaskAvatar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const MaskAvatar = memo<MaskAvatarProps>(({ size = 36, onClick }) => {
background: MaskColorVar.lightBackground,
borderRadius: '50%',
},
onClick: onClick,
onClick,
className: classes.author,
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@ export const EmailField = memo(({ toStep }: StepCommonProps) => {
variant="rounded"
color="primary"
size="large"
onClick={() =>
toStep(ValidationCodeStep.AccountValidation, { account: account, type: AccountType.email })
}
onClick={() => toStep(ValidationCodeStep.AccountValidation, { account, type: AccountType.email })}
disabled={!account || invalidEmail}>
{t.next()}
</Button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const ValidationAccount = ({ account, toStep, type, onNext }: ValidationA
const [{ error: sendCodeError }, handleSendCodeFn] = useAsyncFn(async () => {
showSnackbar(t.sign_in_account_cloud_backup_send_email_success({ type }), { variant: 'success' })
await sendCode({
account: account,
account,
type,
scenario: Scenario.backup,
locale: language.includes('zh') ? Locale.zh : Locale.en,
Expand All @@ -38,7 +38,7 @@ export const ValidationAccount = ({ account, toStep, type, onNext }: ValidationA

if ((backupInfo as BackupFileInfo).downloadURL) {
setError('')
toStep(ValidationCodeStep.ConfirmBackupInfo, { backupInfo: backupInfo, account: account, type: type })
toStep(ValidationCodeStep.ConfirmBackupInfo, { backupInfo, account, type })
} else {
setError((backupInfo as { message: string }).message)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ interface PlaceholderProps {

export const Placeholder = memo<PlaceholderProps>(({ network }) => {
const t = useDashboardI18N()
const url = urlcat('https://www.:network', { network: network })
const url = urlcat('https://www.:network', { network })

const handleClick = () => openWindow(url)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const RenameDialog = memo<RenameDialogProps>(({ open, nickname, onClose,
} = useForm<FormInputs>({
resolver: zodResolver(schema),
defaultValues: {
nickname: nickname,
nickname,
},
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export function useDeleteBound() {
username,
payload.createdAt,
{
signature: signature,
signature,
},
)
Services.Identity.detachProfile(profile)
Expand Down
4 changes: 2 additions & 2 deletions packages/dashboard/src/pages/Settings/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ export const fetchDownloadLink = ({ account, code, type }: VerifyCodeRequest) =>
}).then<BackupFileInfo>(({ abstract, download_url, size, uploaded_at }) => {
return {
downloadURL: download_url,
size: size,
size,
uploadedAt: uploaded_at,
abstract: abstract,
abstract,
}
})
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ export const CollectibleList = memo<CollectibleListProps>(({ selectedNetwork })
loading: isQuerying,
retry,
} = useAsyncRetry(
async () =>
Asset?.getNonFungibleAssets?.(account, { page: page, size: 20 }, undefined, selectedNetwork || undefined),
async () => Asset?.getNonFungibleAssets?.(account, { page, size: 20 }, undefined, selectedNetwork || undefined),
[account, Asset?.getNonFungibleAssets, network, selectedNetwork],
)
useEffect(() => {
Expand Down
2 changes: 1 addition & 1 deletion packages/encryption/src/encryption/Decryption.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ async function* v38To40StaticECDH(
report: ((message: TypedMessage) => void) | undefined,
): AsyncIterableIterator<DecryptProgress> {
const postKey = {
'-40': async function* (iv: Uint8Array) {
async *'-40'(iv: Uint8Array) {
const val = await io.queryPostKey_version40(iv)
if (val) yield val
},
Expand Down
2 changes: 1 addition & 1 deletion packages/injected-script/sdk/bridgedSolana.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export const bridgedSolanaProvider: BridgedSolanaProvider = {
getProperty(key) {
return createPromise((id) => sendEvent('solanaBridgePrimitiveAccess', id, key))
},
isConnected: isConnected,
isConnected,
untilAvailable() {
return createPromise((id) => sendEvent('untilSolanaBridgeOnline', id))
},
Expand Down
2 changes: 1 addition & 1 deletion packages/mask/background/database/persona/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export async function createPersonaByJsonWebKey(options: {
const record: PersonaRecord = {
createdAt: new Date(),
updatedAt: new Date(),
identifier: identifier,
identifier,
linkedProfiles: new Map(),
publicKey: options.publicKey,
privateKey: options.privateKey,
Expand Down
8 changes: 4 additions & 4 deletions packages/mask/background/database/post/web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ import { CryptoKeyToJsonWebKey } from '../../../utils-pure'
import type { PersonaIdentifierStoredInDB, ProfileIdentifierStoredInDB } from '../persona/type'
import { createDBAccessWithAsyncUpgrade, createTransaction } from '../utils/openDB'
import type {
RecipientReason,
PostRecord,
PostDB,
PostDBRecord,
PostReadOnlyTransaction,
PostReadWriteTransaction,
PostRecord,
RecipientReason,
} from './type'

type UpgradeKnowledge = { version: 4; data: Map<string, AESJsonWebKey> } | undefined
Expand Down Expand Up @@ -327,8 +327,8 @@ function postOutDB(db: PostDBRecord): PostRecord {
identifier: PostIVIdentifier.from(identifier).unwrap(),
postBy: ProfileIdentifier.of(postBy?.network, postBy?.userId).unwrapOr(undefined),
recipients: recipients === true ? 'everyone' : convertRawMapToIdentifierMap(recipients, ProfileIdentifier),
foundAt: foundAt,
postCryptoKey: postCryptoKey,
foundAt,
postCryptoKey,
encryptBy: ECKeyIdentifier.from(encryptBy).unwrapOr(undefined),
interestedMeta,
summary,
Expand Down
4 changes: 2 additions & 2 deletions packages/mask/background/services/crypto/decryption.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ async function* decryption(payload: string | Uint8Array, context: DecryptionCont
url: postURL,
})
},
hasLocalKeyOf: hasLocalKeyOf,
decryptByLocalKey: decryptByLocalKey,
hasLocalKeyOf,
decryptByLocalKey,
async deriveAESKey(pub) {
return Array.from((await deriveAESByECDH(pub)).values())
},
Expand Down
4 changes: 2 additions & 2 deletions packages/mask/background/services/identity/persona/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export async function generate_ECDH_256k1_KeyPair_ByMnemonicWord(
key,
password,
mnemonicRecord: {
parameter: { path: path, withPassword: password.length > 0 },
parameter: { path, withPassword: password.length > 0 },
words: mnemonicWord,
},
}
Expand All @@ -81,7 +81,7 @@ export async function recover_ECDH_256k1_KeyPair_ByMnemonicWord(
key,
password,
mnemonicRecord: {
parameter: { path: path, withPassword: password.length > 0 },
parameter: { path, withPassword: password.length > 0 },
words: mnemonicWord,
},
}
Expand Down
2 changes: 1 addition & 1 deletion packages/mask/src/components/shared/AbstractTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export default function AbstractTab(props: AbstractTabProps) {
role="tabpanel"
{...tabs.find((_, index) => index === value)}
sx={{
height: height,
height,
minHeight: height,
}}
/>
Expand Down
2 changes: 1 addition & 1 deletion packages/mask/src/extension/debug-page/DatabaseOps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ async function backupAll() {
records,
})
}
instances.push({ name: name, version: version, stores })
instances.push({ name, version, stores })
}
const payload: BackupFormat = {
buildInfo: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ const VerifyWallet = memo(() => {
payload.createdAt,
{
walletSignature: walletSig,
signature: signature,
signature,
},
)
setSigned(true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export function PurchaseDialog(props: ActionBarProps) {
: 'plugin_artblocks_share_no_official_account',
{
name: project.name,
price: price,
price,
symbol: token.value?.symbol,
},
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export function usePurchaseCallback(projectId: string, amount: string, tokenType
.purchase(projectId)
.estimateGas({
from: account,
value: value,
value,
})
.catch((error) => {
setPurchaseState({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export function CheckoutDialog(props: CheckoutDialogProps) {
amount: asset?.value?.priceInEth,
symbol: token?.value?.symbol,
title: asset?.value?.title,
assetLink: assetLink,
assetLink,
account: isTwitter(activatedSocialNetworkUI) ? t('twitter_account') : t('facebook_account'),
},
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ export function Collectible(props: CollectibleProps) {
<Trans
i18nKey="plugin_cryptoartai_sold_description"
values={{
soldPrice: soldPrice,
soldPrice,
symbol: ' \u039E',
soldNum:
assetSource?.soldNum === assetSource?.totalAvailable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,10 @@ export function MakeOfferDialog(props: MakeOfferDialogProps) {
? 'plugin_cryptoartai_offer_share'
: 'plugin_cryptoartai_offer_share_no_official_account',
{
amount: amount,
amount,
symbol: token?.value?.symbol,
title: assetSource?.title,
assetLink: assetLink,
assetLink,
account: isTwitter(activatedSocialNetworkUI) ? t('twitter_account') : t('facebook_account'),
},
)
Expand Down
2 changes: 1 addition & 1 deletion packages/mask/src/plugins/EVM/UI/Web3State/getAssetsFn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export const getFungibleAssetsFn =

return {
chainId: x,
price: price,
price,
balance,
}
})
Expand Down
4 changes: 2 additions & 2 deletions packages/mask/src/plugins/EVM/UI/Web3State/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ export function fixWeb3State(state?: Web3Plugin.ObjectCapabilities.Capabilities,
formatDomainName,
resolveNonFungibleTokenLink: (chainId: ChainId, address: string, tokenId: string) =>
resolveCollectibleLink(chainId as ChainId, NonFungibleAssetProvider.OPENSEA, {
contractDetailed: { address: address },
tokenId: tokenId,
contractDetailed: { address },
tokenId,
} as unknown as any),
}
return state
Expand Down
4 changes: 2 additions & 2 deletions packages/mask/src/plugins/GoodGhosting/hooks/useGameInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export function useTimeline(info: GoodGhostingInfo) {
} else if (index === numberOfRounds - 1) {
return {
eventOnDate: t('plugin_good_ghosting_deposit_deadline', {
index: index,
index,
}),
ongoingEvent: t('plugin_good_ghosting_waiting_round'),
}
Expand All @@ -144,7 +144,7 @@ export function useTimeline(info: GoodGhostingInfo) {
} else {
return {
eventOnDate: t('plugin_good_ghosting_deposit_deadline', {
index: index,
index,
}),
ongoingEvent: t('plugin_good_ghosting_deposit', {
index: index + 1,
Expand Down
4 changes: 2 additions & 2 deletions packages/mask/src/plugins/MaskBox/hooks/useContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ function useContext(initialState?: { boxId: string; hashRoot: string }) {
creator: maskBoxInfo.creator,
name: maskBoxInfo.name,
sellAll: maskBoxCreationSuccessEvent?.returnValues.sell_all ?? false,
personalLimit: personalLimit,
personalLimit,
personalRemaining,
remaining,
availableAmount: Math.min(personalRemaining, remaining),
Expand All @@ -125,7 +125,7 @@ function useContext(initialState?: { boxId: string; hashRoot: string }) {
tokenIdsPurchased: purchasedTokens,
payments: paymentTokens.map((token, i) => {
return {
token: token,
token,
price: maskBoxStatus.payment[i][1],
receivableAmount: maskBoxStatus.payment[i][2],
}
Expand Down
2 changes: 1 addition & 1 deletion packages/mask/src/plugins/NextID/hooks/usePersonaSign.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export function usePersonaSign(
try {
const result = await Services.Identity.signWithPersona({
method: 'eth',
message: message,
message,
identifier: currentIdentifier.toText(),
})
return result
Expand Down
2 changes: 1 addition & 1 deletion packages/mask/src/plugins/Pets/hooks/useUser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export function useCurrentVisitingUser(flag?: number) {
} finally {
setUser({
userId: identity.identifier?.userId ?? '',
address: address,
address,
})
}
}, [identity, flag])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ export function DepositDialog() {
: 'plugin_pooltogether_share_no_official_account',
{
amount: rawAmount,
cashTag: cashTag,
cashTag,
symbol: token.symbol,
pool: pool?.name ?? `${pool?.tokens.underlyingToken.symbol} Pool`,
account: isTwitter(activatedSocialNetworkUI) ? t('twitter_account') : t('facebook_account'),
Expand Down
6 changes: 3 additions & 3 deletions packages/mask/src/plugins/PoolTogether/UI/PoolView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@ export function PoolView(props: PoolProps) {
if (!pool || !token) return
openDepositDialog({
open: true,
pool: pool,
token: token,
pool,
token,
})
}, [pool, token, openDepositDialog])
// #endregion
Expand Down Expand Up @@ -245,7 +245,7 @@ export function PoolView(props: PoolProps) {
<Grid container item xs={3} className={classes.metaFooter}>
<Grid item className={classes.metaTextPrize}>
<Typography fontSize={10} variant="subtitle2">
{t('plugin_pooltogether_prize', { period: period })}
{t('plugin_pooltogether_prize', { period })}
</Typography>
</Grid>
<Grid item>
Expand Down
4 changes: 2 additions & 2 deletions packages/mask/src/plugins/PoolTogether/apis/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@ export async function fetchPool(address?: string, subgraphUrl?: string) {
: prizePool.prizeStrategy.multipleWinners

return {
address: address,
address,
config: {
numberOfWinners: prizeStrategy.numberOfWinners ?? '1',
prizePeriodSeconds: prizeStrategy.prizePeriodSeconds,
},
prize: {},
prizePool: {
address: address,
address,
},
tokens: {
ticket: {
Expand Down
Loading