Skip to content

Commit c687fad

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into feat/integration-boba-network
2 parents 39b038d + f85db38 commit c687fad

File tree

385 files changed

+4818
-3371
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

385 files changed

+4818
-3371
lines changed

.i18n-codegen.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,18 @@
3838
"sourceMap": "inline"
3939
}
4040
},
41+
{
42+
"input": "./packages/shared-base-ui/src/locales/en-US.json",
43+
"output": "./packages/shared-base-ui/src/locales/i18n_generated",
44+
"parser": "i18next",
45+
"generator": {
46+
"type": "i18next/react-hooks",
47+
"hooks": "useSharedBaseI18N",
48+
"namespace": "shareBase",
49+
"trans": "SharedBaseTrans",
50+
"sourceMap": "inline"
51+
}
52+
},
4153
{
4254
"input": "./packages/dashboard/src/locales/en-US.json",
4355
"output": "./packages/dashboard/src/locales/i18n_generated",

cspell.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@
7878
"elec",
7979
"encryptedmsg",
8080
"endregion",
81+
"enhanceable",
8182
"ethersphere",
8283
"ethersproject",
8384
"eustatius",
@@ -270,6 +271,7 @@
270271
"xlarge",
271272
"xlink",
272273
"zerion",
274+
"zora",
273275
"zubin"
274276
],
275277
"ignoreWords": [

docs/rfc/000-Payload-v37.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,7 @@ enum PublicKeyAlgorithmEnum {
9191

9292
This field represents the format version.
9393

94-
The first and the current binary version is `-37`.
95-
The implementation MUST fail when the version is less than `-37` (e.g. `-38`).
94+
The first and the current binary version is `0`.
9695

9796
#### `authorNetwork` field
9897

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,13 @@
2323
"postinstall": "patch-package",
2424
"prepare": "husky install",
2525
"test": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js",
26+
"test:update": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js -u",
2627
"spellcheck": "cspell lint --no-must-find-files"
2728
},
2829
"dependencies": {
2930
"@dimensiondev/kit": "0.0.0-20220223101101-4e6f3b9",
3031
"@emotion/cache": "^11.7.1",
31-
"@emotion/react": "^11.8.1",
32+
"@emotion/react": "^11.8.2",
3233
"@emotion/serialize": "^1.0.2",
3334
"@emotion/styled": "^11.8.1",
3435
"@emotion/utils": "^1.1.0",
@@ -37,7 +38,7 @@
3738
"@mui/material": "5.5.0",
3839
"@mui/system": "5.5.0",
3940
"@types/masknet__global-types": "workspace:*",
40-
"@types/react": "^17.0.39",
41+
"@types/react": "^17.0.40",
4142
"@types/react-dom": "17.0.13",
4243
"@types/web": "^0.0.55",
4344
"i18next": "^21.6.14",

packages/.eslintrc.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"react/self-closing-comp": ["warn", { "component": true, "html": true }],
5151
"react-hooks/exhaustive-deps": "off",
5252
"react-hooks/rules-of-hooks": "error",
53-
"import/no-deprecated": "error",
53+
"import/no-deprecated": "off",
5454
"import/no-duplicates": "error",
5555
"unicorn/better-regex": "error",
5656
"unicorn/catch-error-name": ["error", { "ignore": ["^err$"] }],
@@ -65,7 +65,6 @@
6565
"unicorn/prefer-number-properties": "error",
6666
"unicorn/relative-url-style": ["error", "always"],
6767
"unicorn/throw-new-error": "error",
68-
"unused-imports/no-unused-imports-ts": "error",
6968
"@dimensiondev/no-jsx-template-literal": "error",
7069
"@dimensiondev/no-locale-case": "error",
7170
"@dimensiondev/no-number-constructor": "off",

packages/dashboard/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"@masknet/public-api": "workspace:*",
2121
"@masknet/shared": "workspace:*",
2222
"@masknet/shared-base": "workspace:*",
23+
"@masknet/shared-base-ui": "workspace:*",
2324
"@masknet/storybook-shared": "workspace:*",
2425
"@masknet/theme": "workspace:*",
2526
"@masknet/web3-providers": "workspace:*",

packages/dashboard/src/components/DashboardFrame/Navigation.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ import {
55
ListItemIcon,
66
Collapse,
77
Theme,
8-
// see https://github.com/import-js/eslint-plugin-import/issues/2288
9-
// eslint-disable-next-line import/no-deprecated
108
useMediaQuery,
119
styled,
1210
listItemClasses,
@@ -122,8 +120,6 @@ export function Navigation({ onClose }: NavigationProps) {
122120
const isWalletTransferPath = useMatch(DashboardRoutes.WalletsTransfer)
123121
const isWalletHistoryPath = useMatch(DashboardRoutes.WalletsHistory)
124122

125-
// see https://github.com/import-js/eslint-plugin-import/issues/2288
126-
// eslint-disable-next-line import/no-deprecated
127123
const isLargeScreen = useMediaQuery<Theme>((theme) => theme.breakpoints.up('lg'))
128124
const t = useDashboardI18N()
129125
const mode = useTheme().palette.mode

packages/dashboard/src/components/DashboardFrame/index.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
import { memo, Suspense, useMemo, useState } from 'react'
2-
// see https://github.com/import-js/eslint-plugin-import/issues/2288
3-
// eslint-disable-next-line import/no-deprecated
42
import { Grid, styled, Theme, useMediaQuery } from '@mui/material'
53
import { MaskColorVar } from '@masknet/theme'
6-
import { ErrorBoundary } from '@masknet/shared'
4+
import { ErrorBoundary } from '@masknet/shared-base-ui'
75
import { DashboardContext } from './context'
86
import { Navigation } from './Navigation'
97
import { NavigationVersionFooter } from '../NavigationVersionFooter'
@@ -27,8 +25,6 @@ const LeftContainer = styled(Grid)(({ theme }) => ({
2725
export interface DashboardFrameProps extends React.PropsWithChildren<{}> {}
2826

2927
export const DashboardFrame = memo((props: DashboardFrameProps) => {
30-
// see https://github.com/import-js/eslint-plugin-import/issues/2288
31-
// eslint-disable-next-line import/no-deprecated
3228
const isLargeScreen = useMediaQuery<Theme>((theme) => theme.breakpoints.up('lg'))
3329
const [navigationExpanded, setNavigationExpanded] = useState(true)
3430
const [drawerOpen, setDrawerOpen] = useState(false)

packages/dashboard/src/components/PageFrame/FeaturePromotions/index.tsx

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { memo, useCallback, useMemo } from 'react'
22
import { useNavigate } from 'react-router-dom'
33
import { makeStyles } from '@masknet/theme'
4-
import { useRemoteControlledDialog } from '@masknet/shared'
4+
import { useRemoteControlledDialog } from '@masknet/shared-base-ui'
55
import { useAccount } from '@masknet/web3-shared-evm'
66
import { PluginMessages, Services } from '../../../API'
77
import { PersonaContext } from '../../../pages/Personas/hooks/usePersonaContext'
8-
import { DashboardRoutes } from '@masknet/shared-base'
8+
import { DashboardRoutes, EnhanceableSite } from '@masknet/shared-base'
99
import { PluginId } from '@masknet/plugin-infra'
1010

1111
const useStyles = makeStyles()((theme) => ({
@@ -28,9 +28,6 @@ const useStyles = makeStyles()((theme) => ({
2828
},
2929
}))
3030

31-
const TWITTER_NETWORK = 'twitter.com'
32-
const TWITTER_ADDRESS = 'https://www.twitter.com'
33-
3431
export const FeaturePromotions = memo(() => {
3532
const { classes } = useStyles()
3633
const navigate = useNavigate()
@@ -45,7 +42,7 @@ export const FeaturePromotions = memo(() => {
4542
const { linkedProfiles } = currentPersona
4643
if (linkedProfiles.length === 0) return false
4744

48-
return !!linkedProfiles.find((profile) => profile.identifier.network === TWITTER_NETWORK)
45+
return !!linkedProfiles.find((profile) => profile.identifier.network === EnhanceableSite.Twitter)
4946
}, [currentPersona])
5047

5148
const openTransakDialog = useCallback(() => {
@@ -61,13 +58,13 @@ export const FeaturePromotions = memo(() => {
6158
return
6259
}
6360
if (isConnectedTwitter) {
64-
await Services.SocialNetwork.openSNSAndActivatePlugin(`${TWITTER_ADDRESS}/home`, pluginId)
61+
await Services.SocialNetwork.openSNSAndActivatePlugin('https://twitter.com/home', pluginId)
6562
return
6663
}
67-
connectPersona(currentPersona.identifier, TWITTER_NETWORK)
64+
connectPersona(currentPersona.identifier, EnhanceableSite.Twitter)
6865
}
6966

70-
const openMaskNetwork = () => window.open(`${TWITTER_ADDRESS}/realMaskNetwork`)
67+
const openMaskNetwork = () => window.open('https://twitter.com/realMaskNetwork')
7168

7269
return (
7370
<div className={classes.container}>

packages/dashboard/src/components/PageFrame/index.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,18 @@ import {
1111
Theme,
1212
Toolbar,
1313
Typography,
14-
// see https://github.com/import-js/eslint-plugin-import/issues/2288
15-
// eslint-disable-next-line import/no-deprecated
1614
useMediaQuery,
1715
useTheme,
1816
} from '@mui/material'
1917
import { makeStyles, MaskColorVar } from '@masknet/theme'
2018
import { Close as CloseIcon, Menu as MenuIcon } from '@mui/icons-material'
2119
import Color from 'color'
22-
import { ErrorBoundary } from '@masknet/shared'
2320
import { DashboardContext } from '../DashboardFrame/context'
2421
import { Navigation } from '../DashboardFrame/Navigation'
2522
import { MaskBannerIcon, MaskNotSquareIcon } from '@masknet/icons'
2623
import { FeaturePromotions } from './FeaturePromotions'
2724
import { DashboardRoutes } from '@masknet/shared-base'
25+
import { ErrorBoundary } from '@masknet/shared-base-ui'
2826
import { NavigationVersionFooter } from '../NavigationVersionFooter'
2927

3028
const featurePromotionsEnabled = [
@@ -132,8 +130,6 @@ export const PageFrame = memo((props: PageFrameProps) => {
132130
const location = useLocation()
133131
const left = typeof props.title === 'string' ? <Typography variant="h6">{props.title}</Typography> : props.title
134132
const right = props.primaryAction
135-
// see https://github.com/import-js/eslint-plugin-import/issues/2288
136-
// eslint-disable-next-line import/no-deprecated
137133
const isLargeScreen = useMediaQuery<Theme>((theme) => theme.breakpoints.up('lg'))
138134
const { drawerOpen, toggleDrawer } = useContext(DashboardContext)
139135
const showFeaturePromotions = featurePromotionsEnabled.some((path: string) => path === location.pathname)

0 commit comments

Comments
 (0)