Skip to content

Commit

Permalink
renamed function to clearLocalStorage
Browse files Browse the repository at this point in the history
  • Loading branch information
mikestarrdev committed Jun 29, 2023
1 parent b23b21a commit 00ce027
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/components/TransactionsTab/TransactionsTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ import {
BackdropFilter,
ClearTransactionsButton,
} from "./TransactionsTab.styles";
import AnimatedWalletTransaction from "./subcomponents/AnimatedWalletTransaction/AnimatedWalletTransaction";
import { clearLocalStorage } from "./helpers/clearLocalStorage";
import AnimatedWalletTransaction from "./subcomponents/AnimatedWalletTransaction/AnimatedWalletTransaction";

type TransactionsTabType = {
address: string;
Expand Down Expand Up @@ -96,8 +96,8 @@ const TransactionsTab = ({
return isUnsupportedNetwork
? t("wallet.unsupported")
: addressOrName
? addressOrName
: t("wallet.notConnected");
? addressOrName
: t("wallet.notConnected");
}, [addressOrName, isUnsupportedNetwork, t]);
const walletUrl = useMemo(
() => getAccountUrl(chainId, address),
Expand Down Expand Up @@ -160,7 +160,7 @@ const TransactionsTab = ({

const handleClearTransactions = () => {
dispatch(setTransactions(null));
clearLocalStorage(address)
clearLocalStorage(address);
};

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export const clearLocalStorage = (address: string) => {
for (let i = 0; i < localStorage.length; i++) {
const key = localStorage.key(i);
if (key?.includes(`airswap/transactions/${address}`)) {
localStorage.removeItem(key)
localStorage.removeItem(key);
}
}
}
};

0 comments on commit 00ce027

Please sign in to comment.