Skip to content

Commit

Permalink
Don't load custom chains from localStorage
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaw3d authored Nov 5, 2024
1 parent faa6ca4 commit 0596a1a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/nextjs/components/NetworksDropdown/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ export const chainToOption = (chain: Chain): Options => ({
const STORED_CHAINS_STORAGE_KEY = "storedChains";

export const getStoredChainsFromLocalStorage = (): Chain[] => {
return []; // Prevent error in https://github.com/oasisprotocol/abi-playground/blob/faa6ca4e86a2248672b3e4155ad8b4aa52da4fa9/packages/nextjs/services/store/store.ts#L47 on load
if (typeof window !== "undefined") {
const storedChains = localStorage.getItem(STORED_CHAINS_STORAGE_KEY);
return storedChains ? JSON.parse(storedChains) : [];
Expand Down

0 comments on commit 0596a1a

Please sign in to comment.