diff --git a/webapps/world-builder-dashboard/src/components/bridge/history/HistoryDesktop.tsx b/webapps/world-builder-dashboard/src/components/bridge/history/HistoryDesktop.tsx index 0ce093c0..b351e22d 100644 --- a/webapps/world-builder-dashboard/src/components/bridge/history/HistoryDesktop.tsx +++ b/webapps/world-builder-dashboard/src/components/bridge/history/HistoryDesktop.tsx @@ -102,7 +102,7 @@ const HistoryDesktop: React.FC = () => { ) localStorage.setItem( - `bridge-${connectedAccount}-transactions-${selectedNetworkType}`, + `bridge-${isSpyMode ? spyAddress : connectedAccount}-transactions-${selectedNetworkType}`, JSON.stringify([...localTransactions, ...newTransactions]) ) } @@ -148,7 +148,7 @@ const HistoryDesktop: React.FC = () => { return (
- +
{visibleTransactions && (
diff --git a/webapps/world-builder-dashboard/src/components/bridge/history/SpyMode.module.css b/webapps/world-builder-dashboard/src/components/bridge/history/SpyMode.module.css index 177652ed..a2720eaf 100644 --- a/webapps/world-builder-dashboard/src/components/bridge/history/SpyMode.module.css +++ b/webapps/world-builder-dashboard/src/components/bridge/history/SpyMode.module.css @@ -39,3 +39,24 @@ outline: none; box-shadow: none; } + +.button { + background: transparent; + border: 1px solid #919191; /* Optional: subtle border */ + border-radius: 4px; + color: #c0bfbf; /* Text color */ + padding: 3px 10px; + font-size: 15px; + cursor: pointer; + transition: background 0.3s ease, color 0.3s ease; +} + +.button:hover { + background: rgba(0, 0, 0, 0.05); /* Slight background on hover */ + color: #ecebeb; +} + +.button:focus { + outline: none; + box-shadow: 0 0 4px rgba(0, 0, 0, 0.3); /* Focus style */ +} diff --git a/webapps/world-builder-dashboard/src/components/bridge/history/SpyMode.tsx b/webapps/world-builder-dashboard/src/components/bridge/history/SpyMode.tsx index 16126bbc..561b13e0 100644 --- a/webapps/world-builder-dashboard/src/components/bridge/history/SpyMode.tsx +++ b/webapps/world-builder-dashboard/src/components/bridge/history/SpyMode.tsx @@ -1,13 +1,15 @@ import React, {ChangeEvent, useEffect, useState} from 'react'; import {ethers} from "ethers"; import styles from "./SpyMode.module.css"; +import {NetworkType} from "@/contexts/BlockchainContext"; interface SpyModeProps { isSpyMode: boolean; setIsSpyMode: (arg0: boolean) => void; onSpyAddress: (address: string) => void; + networkType: NetworkType; } -const SpyMode: React.FC = ({isSpyMode, setIsSpyMode, onSpyAddress}) => { +const SpyMode: React.FC = ({isSpyMode, setIsSpyMode, onSpyAddress, networkType}) => { const [cheatCode, setCheatCode] = useState('') const [address, setAddress] = useState('') const [isValid, setIsValid] = useState(false) @@ -39,6 +41,13 @@ const SpyMode: React.FC = ({isSpyMode, setIsSpyMode, onSpyAddress} } }, [cheatCode]); + const handleClick = () => { + localStorage.setItem( + `bridge-${address}-transactions-${networkType}`, + JSON.stringify([]) + ) + } + if (!isSpyMode) { return <> } @@ -46,8 +55,10 @@ const SpyMode: React.FC = ({isSpyMode, setIsSpyMode, onSpyAddress} return (
- + {!isValid &&
Address is not valid
} + {isValid && } +
); };