diff --git a/src/Components/Consent.tsx b/src/Components/Consent.tsx index 5c96276..8202600 100644 --- a/src/Components/Consent.tsx +++ b/src/Components/Consent.tsx @@ -27,7 +27,7 @@ const ConsentComponent = ({ endpoint }: any) => { const handleAgree = async () => { try { - if (level > 1) { + if (level > 2) { setLoading('connect'); const address = await provider.connect(); setLoading('sign'); diff --git a/src/Components/Terms.tsx b/src/Components/Terms.tsx index 2ab33e6..4a6a131 100644 --- a/src/Components/Terms.tsx +++ b/src/Components/Terms.tsx @@ -21,20 +21,33 @@ const terms = [ logos: [aesirx], }, { - level: 3, + level: 2, tier: 'Tier 2', + name: 'AesirX WEB3 ID', + levelname: 'Medium', + content: + 'Ideal for personalized online experiences & secure consent management across sessions & platforms.', + term: 'You consent to data use across multiple sess`ions.', + upgrade: 'Upgrade to Tier 3 Consent - High ', + upgradetext: + '& add on Wallet-Based Decentralized Consent to give explicit consent for data collection & processing for the most secure, private & personalized experience.', + logos: [aesirx, web3id], + }, + { + level: 3, + tier: 'Tier 3', name: 'Decentralized Wallet', levelname: 'High', content: 'Utilize your Web3 Wallet for greater control over your data.', term: 'You consent for your data to be used, which can be revoked at any time you choose.', - upgrade: 'Upgrade to Tier 3 Consent - Super Advanced (our highest tier!)', + upgrade: 'Upgrade to Tier 4 Consent - Super Advanced (our highest tier!)', upgradetext: ' & add on AesirX WEB3 ID to give explicit consent for data collection & processing for the most secure, private & personalized experience.', logos: [aesirx, web3id], }, { level: 4, - tier: 'Tier 3', + tier: 'Tier 4', name: 'Combined Wallet + AesirX WEB3 ID', levelname: 'Super Advanced', content: diff --git a/src/Hooks/useConsentStatus.ts b/src/Hooks/useConsentStatus.ts index d6f2401..743b136 100644 --- a/src/Hooks/useConsentStatus.ts +++ b/src/Hooks/useConsentStatus.ts @@ -51,7 +51,7 @@ const useConsentStatus = (endpoint?: string) => { useEffect(() => { (async () => { try { - let l = 1; + let l = level; const provider = await detectConcordiumProvider(100); if (provider) { @@ -80,7 +80,7 @@ const useConsentStatus = (endpoint?: string) => { setWeb3ID(web3ID); } } catch (error) { - setLevel(1); + setLevel(level ?? 1); console.error(error); } })(); @@ -88,7 +88,9 @@ const useConsentStatus = (endpoint?: string) => { const handleLevel = useCallback( async (_level: number) => { - if (_level === 3) { + if (_level === 2) { + setLevel(_level); + } else if (_level === 3) { try { await detectConcordiumProvider(100); setLevel(_level);