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 a39abfe commit da29a90
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/components/TransactionsTab/TransactionsTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ import {
BackdropFilter,
ClearFailedTxButton,
} from "./TransactionsTab.styles";
import AnimatedWalletTransaction from "./subcomponents/AnimatedWalletTransaction/AnimatedWalletTransaction";
import { clearLocalStorageFailedTx } from "./helpers/clearLocalStorageFailedTx";
import AnimatedWalletTransaction from "./subcomponents/AnimatedWalletTransaction/AnimatedWalletTransaction";
import { getFitleredFailedTransactions } from "./helpers/getFitleredFailedTransactions";

type TransactionsTabType = {
address: string;
Expand Down Expand Up @@ -159,8 +160,9 @@ const TransactionsTab = ({
const balance = balances.values[nativeCurrencyAddress] || "0";

const handleClearFailedTransactions = () => {
dispatch(setTransactions(null));
clearLocalStorageFailedTx(address)
const filteredTransactions = getFitleredFailedTransactions(transactions)
dispatch(setTransactions({ all: filteredTransactions }));
clearLocalStorageFailedTx(address);
};

return (
Expand Down

0 comments on commit da29a90

Please sign in to comment.