Skip to content

Commit

Permalink
imported getFitleredFailedTransactions and used in handleClearFailedT…
Browse files Browse the repository at this point in the history
…ransactions
  • Loading branch information
mikestarrdev committed Jun 29, 2023
1 parent da29a90 commit ecc5f9e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/TransactionsTab/TransactionsTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ import {
ClearFailedTxButton,
} from "./TransactionsTab.styles";
import { clearLocalStorageFailedTx } from "./helpers/clearLocalStorageFailedTx";
import AnimatedWalletTransaction from "./subcomponents/AnimatedWalletTransaction/AnimatedWalletTransaction";
import { getFitleredFailedTransactions } from "./helpers/getFitleredFailedTransactions";
import AnimatedWalletTransaction from "./subcomponents/AnimatedWalletTransaction/AnimatedWalletTransaction";

type TransactionsTabType = {
address: string;
Expand Down Expand Up @@ -97,8 +97,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 balance = balances.values[nativeCurrencyAddress] || "0";

const handleClearFailedTransactions = () => {
const filteredTransactions = getFitleredFailedTransactions(transactions)
const filteredTransactions = getFitleredFailedTransactions(transactions);
dispatch(setTransactions({ all: filteredTransactions }));
clearLocalStorageFailedTx(address);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ export const clearLocalStorageFailedTx = (address: string) => {
);

const updatedKeys = JSON.stringify({ all: filteredOrders });
console.log(updatedKeys)
localStorage.setItem(key, updatedKeys);
console.log(localStorage.getItem(key))
}
}
}
Expand Down

0 comments on commit ecc5f9e

Please sign in to comment.