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
873 changes: 0 additions & 873 deletions e2e/specs/stateless/verifications.spec.ts

This file was deleted.

10 changes: 2 additions & 8 deletions public/locales/en/transactionFlow.json
Original file line number Diff line number Diff line change
Expand Up @@ -413,14 +413,8 @@
"list": {
"title": "Verify your profile",
"message": " You can verify profile information and add proofs of personhood. Verified records will be marked on your profile with a blue check.",
"added": "Added"
},
"dentity": {
"title": "Dentity verification",
"description": "Proceed to Dentity to verify your profile. You’ll need to provide proof of ownership for the records you want to verify. Dentity does not share any private information with ENS.",
"helper": "Your verification will not be complete until you have returned to ENS and updated your records. This will require a transaction.",
"remove": "Remove Dentity from profile",
"link": "Go to Dentity"
"added": "Added",
"noOptions": "No verification providers are currently available."
}
}
},
Expand Down
10 changes: 2 additions & 8 deletions public/locales/es/transactionFlow.json
Original file line number Diff line number Diff line change
Expand Up @@ -404,14 +404,8 @@
"list": {
"title": "Verificar tu perfil",
"message": " Puedes verificar la información de tu perfil y agregar pruebas de identidad. Los registros verificados aparecerán en tu perfil con un check azul.",
"added": "Agregado"
},
"dentity": {
"title": "Verificación Dentity",
"description": "Ve a Dentity para verificar tu perfil. Deberás demostrar propiedad de los registros que desees verificar. Dentity no comparte ninguna información privada con ENS.",
"helper": "Tu verificación no estará completa hasta que regreses a ENS y actualices tus registros. Esto requerirá una transacción.",
"remove": "Eliminar Dentity de tu perfil",
"link": "Ir a Dentity"
"added": "Agregado",
"noOptions": "No hay proveedores de verificación disponibles actualmente."
}
}
},
Expand Down
10 changes: 2 additions & 8 deletions public/locales/zh/transactionFlow.json
Original file line number Diff line number Diff line change
Expand Up @@ -404,14 +404,8 @@
"list": {
"title": "验证您的个人资料",
"message": "您可以验证个人资料信息并添加身份证明。已验证的记录将在您的个人资料中标有蓝色对勾。",
"added": "已添加"
},
"dentity": {
"title": "Dentity 验证",
"description": "前往 Dentity 验证您的个人资料。您需要提供要验证的记录的所有权证明。Dentity 不会与 ENS 共享任何私人信息。",
"helper": "在您返回 ENS 并更新记录之前,验证不会完成。这需要一次交易。",
"remove": "从个人资料中移除 Dentity",
"link": "前往 Dentity"
"added": "已添加",
"noOptions": "目前没有可用的验证提供商。"
}
}
},
Expand Down
17 changes: 0 additions & 17 deletions src/assets/Dentity.svg

This file was deleted.

17 changes: 0 additions & 17 deletions src/assets/verification/Dentity.svg

This file was deleted.

15 changes: 7 additions & 8 deletions src/assets/verification/DynamicVerificationIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
import dynamic from 'next/dynamic'

import { VerificationProtocol } from '../../transaction-flow/input/VerifyProfile/VerifyProfile-flow'

export const verificationIconTypes: {
[key in VerificationProtocol]: any
} = {
dentity: dynamic(() => import('./Dentity.svg')),
}
// Map of verification protocol icons.
// Currently empty as no verification providers are configured.
// The infrastructure is designed to support multiple identity providers in the future.
export const verificationIconTypes: Record<string, any> = {}

export const DynamicVerificationIcon = ({ name }: { name: VerificationProtocol }) => {
if (name in verificationIconTypes) {
const Icon = verificationIconTypes[name]
return <Icon width={20} height={20} />
if (Icon) {
return <Icon width={20} height={20} />
}
}
return null
}
Original file line number Diff line number Diff line change
@@ -1,60 +1,12 @@
import { useTranslation } from 'react-i18next'
import styled, { css } from 'styled-components'
import { match } from 'ts-pattern'

import { Colors, OutlinkSVG, Typography } from '@ensdomains/thorin'

import DentitySVG from '@app/assets/verification/Dentity.svg'
import { VerificationProtocol } from '@app/transaction-flow/input/VerifyProfile/VerifyProfile-flow'

type Props = { verifiers?: VerificationProtocol[] }

const Container = styled.div<{ $color: Colors }>(
({ theme, $color }) => css`
display: flex;
align-items: center;
width: 100%;
gap: ${theme.space['1']};

svg {
width: ${theme.space['5']};
height: ${theme.space['5']};
display: block;
}

${$color && `color: ${theme.colors[$color]};`}
`,
)

const Content = styled.div(
({ theme }) => css`
display: flex;
align-items: center;
gap: ${theme.space['1']};
white-space: nowrap;

svg {
width: ${theme.space['3']};
height: ${theme.space['3']};
display: block;
}
`,
)

// Displays tooltip content for a verification badge showing the issuer.
// Currently returns null as no verification providers are configured.
// The infrastructure is designed to support multiple identity providers in the future.
// eslint-disable-next-line @typescript-eslint/no-unused-vars
export const VerificationBadgeAccountTooltipContent = ({ verifiers }: Props) => {
const { t } = useTranslation('common')
const verifier = verifiers?.[0]
return match(verifier)
.with('dentity', () => (
<Container as="a" href="https://dentity.com" target="_blank" $color="accent">
<DentitySVG />
<Content>
<Typography fontVariant="bodyBold" color="inherit">
{t('verification.verifiedBy', { issuer: 'Dentity' })}
</Typography>
<OutlinkSVG />
</Content>
</Container>
))
.otherwise(() => null)
// No verification providers are currently configured
return null
}
45 changes: 0 additions & 45 deletions src/components/pages/VerificationErrorDialog.tsx

This file was deleted.

63 changes: 3 additions & 60 deletions src/constants/verification.ts
Original file line number Diff line number Diff line change
@@ -1,68 +1,11 @@
import { match } from 'ts-pattern'

import { getNetworkFromUrl } from '@app/constants/chains'
import type { VerificationProtocol } from '@app/transaction-flow/input/VerifyProfile/VerifyProfile-flow'

/**
* General Verification Constants
*/

const VERIFICATION_ENV_CONFIGS = {
staging: {
authWorkerBaseUrl: 'https://auth-worker-staging.ens-cf.workers.dev/v1',
},
production: {
authWorkerBaseUrl: 'https://auth-worker.ens-cf.workers.dev/v1',
},
} as const

type VerificationEnv = keyof typeof VERIFICATION_ENV_CONFIGS

const VERIFICATION_ENV: VerificationEnv = 'production'

export const VERIFICATION_RECORD_KEY = 'verifications'

export const VERIFICATION_PROTOCOLS: VerificationProtocol[] = ['dentity']

export const VERIFICATION_OAUTH_BASE_URL =
VERIFICATION_ENV_CONFIGS[VERIFICATION_ENV].authWorkerBaseUrl

/**
* Dentity Constants
*/

const DENTITY_ENV_CONFIGS = {
dev: {
iss: 'https://oidc.dev.dentity.com',
clientId: 'afl0TofdrB4B1YrEcDwNA',
endpoint: 'https://oidc.dev.dentity.com',
redirectUri: 'http://localhost:3000',
},
staging: {
iss: 'https://oidc.staging.dentity.com',
clientId: '-IG5wkHyetFAeDziNUkdu',
endpoint: 'https://oidc.staging.dentity.com',
redirectUri: 'https://dentity-integration.ens-app-v3.pages.dev',
},
production: {
iss: 'https://oidc.dentity.com',
clientId: 'TWUfWhM_hs5osk9cR4adK',
endpoint: 'https://oidc.dentity.com',
redirectUri: 'https://app.ens.domains',
},
} as const

type DentityEnvironment = keyof typeof DENTITY_ENV_CONFIGS

const DENTITY_ENV: DentityEnvironment = match(getNetworkFromUrl())
.with('mainnet', () => 'production' as const)
.with('sepolia', () => 'staging' as const)
.otherwise(() => 'dev' as const)

export const DENTITY_BASE_ENDPOINT = DENTITY_ENV_CONFIGS[DENTITY_ENV].endpoint

export const DENTITY_CLIENT_ID = DENTITY_ENV_CONFIGS[DENTITY_ENV].clientId

export const DENTITY_ISS = DENTITY_ENV_CONFIGS[DENTITY_ENV].iss

export const DENTITY_REDIRECT_URI = DENTITY_ENV_CONFIGS[DENTITY_ENV].redirectUri
// Available verification protocols - currently empty, but the infrastructure
// is designed to support multiple identity providers in the future
export const VERIFICATION_PROTOCOLS: VerificationProtocol[] = []
Loading