Skip to content

Commit

Permalink
add unknown type as failed (#5871)
Browse files Browse the repository at this point in the history
  • Loading branch information
brunobar79 authored Jun 20, 2024
1 parent c9ab8df commit cd21e6a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/handlers/transactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export const getTransactionFlashbotStatus = async (
transaction: RainbowTransaction,
txHash: string
): Promise<{
flashbotsStatus: 'FAILED' | 'CANCELLED';
flashbotsStatus: 'FAILED' | 'CANCELLED' | 'UNKNOWN';
status: 'failed';
minedAt: number;
title: string;
Expand All @@ -89,7 +89,7 @@ export const getTransactionFlashbotStatus = async (
const fbStatus = await flashbotsApi.get<{ status: FlashbotsStatus }>(`/tx/${txHash}`);
const flashbotsStatus = fbStatus.data.status;
// Make sure it wasn't dropped after 25 blocks or never made it
if (flashbotsStatus === 'FAILED' || flashbotsStatus === 'CANCELLED') {
if (flashbotsStatus === 'FAILED' || flashbotsStatus === 'CANCELLED' || flashbotsStatus === 'UNKNOWN') {
const status = 'failed';
const minedAt = Math.floor(Date.now() / 1000);
const title = `${transaction.type}.failed`;
Expand Down

0 comments on commit cd21e6a

Please sign in to comment.