Skip to content

Commit

Permalink
fix: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
grothem committed Jan 3, 2025
1 parent 8eddcad commit 28ef80c
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions src/libs/web3-data-provider/Web3Provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ export const Web3ContextProvider: React.FC<{ children: ReactElement }> = ({ chil
const { switchChainAsync } = useSwitchChain();
const { watchAssetAsync } = useWatchAsset();
const { chainId, address } = useAccount();
// const { disconnect } = useDisconnect();
const { connect, connectors } = useConnect();

const [readOnlyModeAddress, setReadOnlyModeAddress] = useState<string | undefined>();
Expand All @@ -57,22 +56,10 @@ export const Web3ContextProvider: React.FC<{ children: ReactElement }> = ({ chil
currentAccount = readOnlyModeAddress;
}

// console.log('isConnecting', isConnecting);
// console.log('isConnected', isConnected);

useEffect(() => {
if (didInit) {
return;
}
// if (didInit) {
// // If user connects a wallet after the app is loaded, then we need to reset the readOnlyModeAddress
// if (isConnected && readOnlyMode) {
// localStorage.removeItem('readOnlyModeAddress');
// setReadOnlyModeAddress(undefined);
// }

// return;
// }

// If the app loads in readOnlyMode, then we disconnect the wallet if it auto connected
const storedReadOnlyAddress = localStorage.getItem('readOnlyModeAddress');
Expand Down

0 comments on commit 28ef80c

Please sign in to comment.