Skip to content

Commit

Permalink
dont show timeout errors
Browse files Browse the repository at this point in the history
  • Loading branch information
rise1507 committed Apr 15, 2024
1 parent 6600bc2 commit d65c589
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -312,9 +312,11 @@ const updateMultisig = async (multisigAddress: string, isFirst: boolean): Promis

// Render error if still relevant
if (currentMultisigAddress !== multisigAddress) return;
toggle($('#multisig_content'), false);
toggle($('#multisig_error'), true);
$('#multisig_error').innerText = e.message;
if (isFirst || !e?.message?.startsWith('Timeout')) {
toggle($('#multisig_content'), false);
toggle($('#multisig_error'), true);
$('#multisig_error').innerText = e.message;
}
}

clearTimeout(updateMultisigTimeoutId);
Expand Down Expand Up @@ -454,9 +456,11 @@ const updateOrder = async (orderAddress: AddressInfo, orderId: bigint, isFirstTi

// Render error if still relevant
if (currentOrderId !== orderId) return;
toggle($('#order_content'), false);
toggle($('#order_error'), true);
$('#order_error').innerText = e.message;
if (isFirstTime || !e?.message?.startsWith('Timeout')) {
toggle($('#order_content'), false);
toggle($('#order_error'), true);
$('#order_error').innerText = e.message;
}
}

clearTimeout(updateOrderTimeoutId);
Expand Down

0 comments on commit d65c589

Please sign in to comment.