Skip to content

Commit e536275

Browse files
authored
add updated privacy notice (#164)
* add updated privacy notice * add press release link
1 parent 72709aa commit e536275

File tree

4 files changed

+67
-1
lines changed

4 files changed

+67
-1
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import React, { useEffect } from 'react';
2+
import styles from '../simulation.module.css'
3+
4+
export interface AcquiredNoticeProps {
5+
closeCb: () => void;
6+
}
7+
8+
export function AcquisitionNoticeModal({ closeCb }: AcquiredNoticeProps) {
9+
return (
10+
<div className='container' style={{ position: 'fixed', bottom: '100px', zIndex: 10 }}>
11+
<div style={{ width: '100%', borderRadius: '10px', display: 'flex', flexDirection: 'row', alignItems: 'center', background: '#2B2B2B', padding: '15px' }}>
12+
<div style={{ display: 'flex', flexDirection: 'column', marginLeft: '20px' }}>
13+
<p style={{ fontSize: '20px', marginBottom: '5px' }} className={styles['font-archivo-semibold']}>Terms & Privacy Update</p>
14+
<p className={styles['softLockedWarningSubtitle']} style={{ marginBottom: '0px', fontSize: '14px' }}>
15+
Our <a className={styles.links} href='https://consensys.io/terms-of-use' target='_blank'>Terms of Service</a> and <a className={styles.links} href='https://consensys.io/privacy-notice' target='_blank'>Privacy Policy</a> have recently changed, please read and acknowledge <a className={styles.links} href='https://www.walletguard.app/blog/weve-been-acquired-what-this-means-for-your-data' target='_blank'>the full privacy notice.</a>
16+
</p>
17+
18+
<p className={styles['softLockedWarningSubtitle']} style={{ marginBottom: '0px', marginTop: '10px', fontSize: '14px' }}>
19+
<a className={styles.links} style={{ marginBottom: '0px', fontSize: '14px' }} target='_blank' href='https://consensys.io/blog/consensys-acquires-wallet-guard-to-enhance-metamask-security'>
20+
Read the Full Press Release
21+
</a>
22+
{' '}
23+
to learn more about our recent acquisition.
24+
</p>
25+
26+
<button className={styles.buttonOutline} style={{ marginTop: '10px', textAlign: 'left', width: 'fit-content', paddingTop: '5px', paddingBottom: '5px', paddingLeft: '10px', paddingRight: '10px' }} onClick={closeCb}>Acknowledge</button>
27+
</div>
28+
</div>
29+
</div>
30+
)
31+
}

src/components/simulation/simulation.module.css

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,12 @@
142142
font-family: "ArchivoBold";
143143
}
144144

145+
.links {
146+
color: #e6e6e6;
147+
}
148+
145149
.links:hover {
150+
color: #ffffff;
146151
text-decoration: underline solid #ffffff;
147152
}
148153

@@ -216,6 +221,17 @@
216221
margin-bottom: 0;
217222
}
218223

224+
.buttonOutline {
225+
color: white;
226+
font-family: 'ArchivoSemiBold';
227+
border-radius: 100px;
228+
cursor: pointer;
229+
}
230+
231+
.buttonOutline:hover {
232+
background: rgb(20, 20, 20);
233+
}
234+
219235
.transactionDetailsCard {
220236
background: linear-gradient(to right, #141414, #0d0d0d00);
221237
border-top: 1px solid #303030;

src/lib/helpers/chrome/localStorageKeys.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ export enum WgKeys {
1111
RequestsBlocklist = 'requestsBlocklist',
1212
SimulationSettings = 'simulationSettings',
1313
SimulationSkipModal = 'simulationSkipModal', // This key is only accessible via the popup page context
14+
ViewedAcquisitionNotice = 'viewedAcquisitionNotice',
1415
}

src/pages/popup.tsx

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import posthog from 'posthog-js';
2-
import React, { useState } from 'react';
2+
import React, { useEffect, useState } from 'react';
33
import { createRoot } from 'react-dom/client';
44
import { ConfirmSimulationButton } from '../components/simulation/SimulationButton';
55
import { NoSimulation } from '../components/simulation/NoSimulation';
@@ -22,6 +22,8 @@ import { UnresolvableSignatureModal } from '../components/simulation/SimulationS
2222
import { TrySkipTransactions } from '../components/simulation/SimulationSubComponents/TrySkipTransactions';
2323
import { getDomainNameFromURL } from '../lib/helpers/phishing/parseDomainHelper';
2424
import { PopupManagerType, getAdditionalDataPopup } from '../lib/simulation/popupManager';
25+
import { WgKeys } from '../lib/helpers/chrome/localStorageKeys';
26+
import { AcquisitionNoticeModal } from '../components/simulation/SimulationSubComponents/AcquisitionNotice';
2527

2628
export interface SimulationBaseProps {
2729
currentSimulation: CompletedSuccessfulSimulation;
@@ -30,6 +32,7 @@ export interface SimulationBaseProps {
3032
const Popup = () => {
3133
const [showChatWeb3, setShowChatWeb3] = useState<boolean>(false);
3234
const { currentSimulation, loading } = useSimulation();
35+
const [viewedAcquisitionNotice, setViewedAcquisitionNotice] = useState(true);
3336

3437
posthog.init('phc_rb7Dd9nqkBMJYCCh7MQWpXtkNqIGUFdCZbUThgipNQD', {
3538
api_host: 'https://app.posthog.com',
@@ -39,6 +42,19 @@ const Popup = () => {
3942
disable_session_recording: true,
4043
});
4144

45+
useEffect(() => {
46+
const viewedAcquisitionNotice = localStorage.getItem(WgKeys.ViewedAcquisitionNotice);
47+
48+
if (!viewedAcquisitionNotice) {
49+
setViewedAcquisitionNotice(false);
50+
}
51+
}, []);
52+
53+
function closeAcquisitionPopup() {
54+
localStorage.setItem(WgKeys.ViewedAcquisitionNotice, 'true');
55+
setViewedAcquisitionNotice(true);
56+
}
57+
4258
Sentry.init({
4359
dsn: 'https://d6ac9c557b4c4eee8b1d4224528f52b3@o4504402373640192.ingest.sentry.io/4504402378293248',
4460
integrations: [new Sentry.BrowserTracing()],
@@ -110,6 +126,8 @@ const Popup = () => {
110126
<TransactionContent currentSimulation={successfulSimulation} />
111127
<div style={{ height: popup !== PopupManagerType.None ? '200px' : '140px' }} />
112128

129+
{!viewedAcquisitionNotice && <AcquisitionNoticeModal closeCb={closeAcquisitionPopup} />}
130+
113131
{popup === PopupManagerType.ShowUnresolvableSignature ? (
114132
<UnresolvableSignatureModal message={currentSimulation.simulation.extraInfo!.message} />
115133
) : popup === PopupManagerType.ShowLockedAsset ? (

0 commit comments

Comments
 (0)