Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
brtkx committed Dec 18, 2024
1 parent 2740d95 commit 8df6a57
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions packages/arb-token-bridge-ui/src/hooks/useTransactionHistory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -831,13 +831,9 @@ const useMappedSenderTransactionHistory = ({

const updatePendingTransaction = useCallback(
async (tx: MergedTransaction) => {
if (!senderTxPages) {
return
}

const foundInSwrCache = senderTxPages
.flat()
.find(t => tx.txId === t.txId && tx.childChainId === t.childChainId)
const foundInSwrCache = senderTransactionsWithNewTransactions.find(
t => tx.txId === t.txId && tx.childChainId === t.childChainId
)

if (!foundInSwrCache) {
return
Expand All @@ -846,7 +842,7 @@ const useMappedSenderTransactionHistory = ({
const updatedPendingTransaction = await getUpdatedPendingTransaction(tx)
updateTransactionInSwrCache(updatedPendingTransaction)
},
[senderTxPages, updateTransactionInSwrCache]
[senderTransactionsWithNewTransactions, updateTransactionInSwrCache]
)

// based on an example from SWR
Expand Down

0 comments on commit 8df6a57

Please sign in to comment.