diff --git a/examples/with-next/pages/index.tsx b/examples/with-next/pages/index.tsx index 51e0cb00..9a56cca6 100644 --- a/examples/with-next/pages/index.tsx +++ b/examples/with-next/pages/index.tsx @@ -19,7 +19,7 @@ const Home = ({ app_id }: InferGetServerSidePropsType onError={error => console.log(error)} onSuccess={response => console.log(response)} app_id={app_id} - verification_level={VerificationLevel.Lite} + verification_level={VerificationLevel.Device} > {({ open }) => } diff --git a/packages/core/src/lib/utils.ts b/packages/core/src/lib/utils.ts index 42f9163c..8a2d14ed 100644 --- a/packages/core/src/lib/utils.ts +++ b/packages/core/src/lib/utils.ts @@ -18,7 +18,7 @@ export const buffer_decode = (encoded: string): ArrayBuffer => { */ export const verification_level_to_credential_types = (verification_level: VerificationLevel): string[] => { switch (verification_level) { - case VerificationLevel.Lite: + case VerificationLevel.Device: return [CredentialType.Orb, CredentialType.Device] case VerificationLevel.Orb: return [CredentialType.Orb] @@ -37,7 +37,7 @@ export const credential_type_to_verification_level = (credential_type: Credentia case CredentialType.Orb: return VerificationLevel.Orb case CredentialType.Device: - return VerificationLevel.Lite + return VerificationLevel.Device default: throw new Error(`Unknown credential_type: ${credential_type}`) } diff --git a/packages/core/src/types/config.ts b/packages/core/src/types/config.ts index a8e2aacc..669a1108 100644 --- a/packages/core/src/types/config.ts +++ b/packages/core/src/types/config.ts @@ -12,8 +12,8 @@ export enum CredentialType { } export enum VerificationLevel { - Lite = 'lite', Orb = 'orb', + Device = 'device', } export type IDKitConfig = { diff --git a/packages/react/src/components/IDKitWidget/States/WorldIDState.tsx b/packages/react/src/components/IDKitWidget/States/WorldIDState.tsx index 33c660d6..5dc9a453 100644 --- a/packages/react/src/components/IDKitWidget/States/WorldIDState.tsx +++ b/packages/react/src/components/IDKitWidget/States/WorldIDState.tsx @@ -1,12 +1,10 @@ import { __ } from '@/lang' import { IDKITStage } from '@/types' -import useMedia from '@/hooks/useMedia' import QRState from './WorldID/QRState' import useIDKitStore from '@/store/idkit' import { shallow } from 'zustand/shallow' import { useEffect, useState } from 'react' import type { IDKitStore } from '@/store/idkit' -import AboutWorldID from '@/components/AboutWorldID' import { useWorldBridge } from '@/services/wld-bridge' import LoadingIcon from '@/components/Icons/LoadingIcon' import WorldcoinIcon from '@/components/Icons/WorldcoinIcon' @@ -25,7 +23,6 @@ const getOptions = (store: IDKitStore) => ({ }) const WorldIDState = () => { - const media = useMedia() const [showQR, setShowQR] = useState(false) const { app_id, @@ -57,7 +54,7 @@ const WorldIDState = () => { } if (result) { - if (verification_level == VerificationLevel.Orb && result.verification_level == VerificationLevel.Lite) { + if (verification_level == VerificationLevel.Orb && result.verification_level == VerificationLevel.Device) { console.error( 'Credential type received from wallet does not match configured credential_types. This should only happen when manually selecting disallowed credentials in the Worldcoin Simulator.' )