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
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

66 changes: 66 additions & 0 deletions src/components/simulation/SimulationSubComponents/SunsetNotice.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
import React from 'react';
import styles from '../simulation.module.css';

export interface WalletGuardSunsetNoticeProps {
closeCb: () => void;
}

export function WalletGuardSunsetNoticeModal({ closeCb }: WalletGuardSunsetNoticeProps) {
return (
<div
className="container"
style={{ position: 'fixed', bottom: '100px', zIndex: 10 }}
>
<div
style={{
width: '100%',
borderRadius: '10px',
display: 'flex',
flexDirection: 'row',
alignItems: 'center',
background: '#2B2B2B',
padding: '15px',
}}
>
<div style={{ display: 'flex', flexDirection: 'column', marginLeft: '20px' }}>
<p
style={{ fontSize: '20px', marginBottom: '5px' }}
className={styles['font-archivo-semibold']}
>
Wallet Guard Sunset Notice
</p>

<p
className={styles['softLockedWarningSubtitle']}
style={{ marginBottom: '0px', fontSize: '14px' }}
>
The Wallet Guard extension will be discontinued on <strong>March 31st, 2025</strong>. Please install MetaMask to continue using Wallet Guard's security features.
Please read our{' '}
<a
className={styles.links}
href="https://www.walletguard.app/blog/wallet-guard-sunset-notice"
target="_blank"
rel="noopener noreferrer"
>
Sunset Notice
</a>{' '}
for more information.
</p>

<button
className={styles.buttonOutline}
style={{
marginTop: '10px',
textAlign: 'left',
width: 'fit-content',
padding: '5px 10px',
}}
onClick={closeCb}
>
Acknowledge
</button>
</div>
</div>
</div>
);
}
1 change: 1 addition & 0 deletions src/lib/helpers/chrome/localStorageKeys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ export enum WgKeys {
SimulationSettings = 'simulationSettings',
SimulationSkipModal = 'simulationSkipModal', // This key is only accessible via the popup page context
ViewedAcquisitionNotice = 'viewedAcquisitionNotice',
ViewedWalletGuardSunsetNotice = 'viewedWalletGuardSunsetNotice',
}
18 changes: 9 additions & 9 deletions src/pages/popup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { TrySkipTransactions } from '../components/simulation/SimulationSubCompo
import { getDomainNameFromURL } from '../lib/helpers/phishing/parseDomainHelper';
import { PopupManagerType, getAdditionalDataPopup } from '../lib/simulation/popupManager';
import { WgKeys } from '../lib/helpers/chrome/localStorageKeys';
import { AcquisitionNoticeModal } from '../components/simulation/SimulationSubComponents/AcquisitionNotice';
import { WalletGuardSunsetNoticeModal } from '../components/simulation/SimulationSubComponents/SunsetNotice';

export interface SimulationBaseProps {
currentSimulation: CompletedSuccessfulSimulation;
Expand All @@ -32,7 +32,7 @@ export interface SimulationBaseProps {
const Popup = () => {
const [showChatWeb3, setShowChatWeb3] = useState<boolean>(false);
const { currentSimulation, loading } = useSimulation();
const [viewedAcquisitionNotice, setViewedAcquisitionNotice] = useState(true);
const [viewedWalletGuardSunsetNotice, setViewedWalletGuardSunsetNotice] = useState(true);

posthog.init('phc_rb7Dd9nqkBMJYCCh7MQWpXtkNqIGUFdCZbUThgipNQD', {
api_host: 'https://app.posthog.com',
Expand All @@ -43,16 +43,16 @@ const Popup = () => {
});

useEffect(() => {
const viewedAcquisitionNotice = localStorage.getItem(WgKeys.ViewedAcquisitionNotice);
const viewedWalletGuardSunsetNotice = localStorage.getItem(WgKeys.ViewedWalletGuardSunsetNotice);

if (!viewedAcquisitionNotice) {
setViewedAcquisitionNotice(false);
if (!viewedWalletGuardSunsetNotice) {
setViewedWalletGuardSunsetNotice(false);
}
}, []);

function closeAcquisitionPopup() {
localStorage.setItem(WgKeys.ViewedAcquisitionNotice, 'true');
setViewedAcquisitionNotice(true);
function closeWalletGuardSunsetPopup() {
localStorage.setItem(WgKeys.ViewedWalletGuardSunsetNotice, 'true');
setViewedWalletGuardSunsetNotice(true);
}

Sentry.init({
Expand Down Expand Up @@ -126,7 +126,7 @@ const Popup = () => {
<TransactionContent currentSimulation={successfulSimulation} />
<div style={{ height: popup !== PopupManagerType.None ? '200px' : '140px' }} />

{!viewedAcquisitionNotice && <AcquisitionNoticeModal closeCb={closeAcquisitionPopup} />}
{!viewedWalletGuardSunsetNotice && <WalletGuardSunsetNoticeModal closeCb={closeWalletGuardSunsetPopup} />}

{popup === PopupManagerType.ShowUnresolvableSignature ? (
<UnresolvableSignatureModal message={currentSimulation.simulation.extraInfo!.message} />
Expand Down