Skip to content

Commit

Permalink
fix: wiping txHistory on both source and dest chains
Browse files Browse the repository at this point in the history
  • Loading branch information
infiniteflower committed Dec 6, 2024
1 parent 7abff9c commit b0e22ab
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ export default class BridgeStatusController extends StaticIntervalPollingControl
};

// Wipes the bridge status for the given address and chainId
// Will match either source or destination chainId to the selectedChainId
// Will match only source chainId to the selectedChainId
#wipeBridgeStatusByChainId = (address: string, selectedChainId: Hex) => {
const sourceTxMetaIdsToDelete = Object.keys(
this.state.bridgeStatusState.txHistory,
Expand All @@ -324,14 +324,10 @@ export default class BridgeStatusController extends StaticIntervalPollingControl
const hexSourceChainId = decimalToPrefixedHex(
bridgeHistoryItem.quote.srcChainId,
);
const hexDestChainId = decimalToPrefixedHex(
bridgeHistoryItem.quote.destChainId,
);

return (
bridgeHistoryItem.account === address &&
(hexSourceChainId === selectedChainId ||
hexDestChainId === selectedChainId)
hexSourceChainId === selectedChainId
);
});

Expand Down

0 comments on commit b0e22ab

Please sign in to comment.