Skip to content

Commit ce91430

Browse files
committed
refactor: mf-6777 remove all NextID functionality across the entire codebase
1 parent b76445e commit ce91430

138 files changed

Lines changed: 858 additions & 5067 deletions

File tree

Some content is hidden

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

packages/icons/brands/NextID.svg

Lines changed: 0 additions & 12 deletions
This file was deleted.

packages/icons/brands/NextIDMini.dark.svg

Lines changed: 0 additions & 7 deletions
This file was deleted.

packages/icons/brands/NextIDMini.light.svg

Lines changed: 0 additions & 7 deletions
This file was deleted.

packages/icons/general/NextIdAvatar.dark.svg

Lines changed: 0 additions & 7 deletions
This file was deleted.

packages/icons/general/NextIdAvatar.light.svg

Lines changed: 0 additions & 7 deletions
This file was deleted.

packages/icons/general/NextIdPersonaWarning.svg

Lines changed: 0 additions & 6 deletions
This file was deleted.

packages/icons/icon-generated-as-jsx.js

Lines changed: 0 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/icons/icon-generated-as-url.js

Lines changed: 0 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/mask/background/services/crypto/decryption.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ async function* decryption(payload: string | Uint8Array, context: DecryptionCont
165165
return Array.from((await deriveAESByECDH(pub)).values())
166166
},
167167
queryAuthorPublicKey(author, signal) {
168-
// TODO: This should try to fetch publicKey from NextID
168+
// TODO: This should try to fetch publicKey from external sources
169169
// but it is not urgent because all new posts has their publicKey embedded
170170
return queryPublicKey(author || authorHint)
171171
},

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

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,11 @@ import {
44
type EC_Public_JsonWebKey,
55
fromBase64URL,
66
isEC_Private_JsonWebKey,
7-
type NextIDPlatform,
87
type PersonaIdentifier,
98
type PersonaInformation,
109
type ProfileIdentifier,
1110
type SocialIdentity,
1211
} from '@masknet/shared-base'
13-
import type { IdentityResolved } from '@masknet/plugin-infra'
14-
import { NextIDProof } from '@masknet/web3-providers'
1512
import {
1613
createPersonaDBReadonlyAccess,
1714
queryPersonaDB,
@@ -24,6 +21,7 @@ import { recover_ECDH_256k1_KeyPair_ByMnemonicWord } from './utils.js'
2421
import { bytesToHex, privateToPublic, publicToAddress } from '@ethereumjs/util'
2522
import { decode } from '@msgpack/msgpack'
2623
import { decodeArrayBuffer } from '@masknet/kit'
24+
import type { IdentityResolved } from '@masknet/plugin-infra'
2725

2826
export async function queryOwnedPersonaInformation(initializedOnly: boolean): Promise<PersonaInformation[]> {
2927
let result: Promise<PersonaInformation[]>
@@ -89,29 +87,14 @@ export async function queryPersonaEOAByPrivateKey(privateKeyString: string) {
8987
}
9088
}
9189

92-
export async function queryPersonasFromNextID(platform: NextIDPlatform, identityResolved: IdentityResolved) {
93-
if (!identityResolved.identifier) return
94-
return NextIDProof.queryAllExistedBindingsByPlatform(platform, identityResolved.identifier.userId)
95-
}
96-
97-
export async function querySocialIdentity(
98-
platform: NextIDPlatform,
99-
identity: IdentityResolved | undefined,
100-
): Promise<SocialIdentity | undefined> {
90+
export async function querySocialIdentity(identity: IdentityResolved | undefined): Promise<SocialIdentity | undefined> {
10191
if (!identity?.identifier) return
10292
const persona = await queryPersonaByProfile(identity.identifier)
10393
if (!persona) return identity
10494

105-
const bindings = await queryPersonasFromNextID(platform, identity)
106-
if (!bindings) return identity
107-
108-
const personaBindings =
109-
bindings?.filter((x) => x.persona === persona?.identifier.publicKeyAsHex.toLowerCase()) ?? []
11095
return {
11196
...identity,
11297
publicKey: persona?.identifier.publicKeyAsHex,
113-
hasBinding: personaBindings.length > 0,
114-
binding: first(personaBindings),
11598
}
11699
}
117100

0 commit comments

Comments
 (0)