diff --git a/src/views/Bridge/hooks/useBridgeAction.ts b/src/views/Bridge/hooks/useBridgeAction.ts index edac8ce0a..05be8b043 100644 --- a/src/views/Bridge/hooks/useBridgeAction.ts +++ b/src/views/Bridge/hooks/useBridgeAction.ts @@ -67,7 +67,7 @@ export function useBridgeAction( !frozenTokenPrice || !tokenSymbol ) { - return; + throw new Error("Missing required data for bridge action"); } if (isWrongNetwork) { diff --git a/src/views/Bridge/hooks/useTransferQuote.ts b/src/views/Bridge/hooks/useTransferQuote.ts index bbce0ae34..be997a2e3 100644 --- a/src/views/Bridge/hooks/useTransferQuote.ts +++ b/src/views/Bridge/hooks/useTransferQuote.ts @@ -86,14 +86,16 @@ export function useTransferQuote( toAddress ); + let initialQuoteTimeToUse = initialQuoteTime || Date.now(); + if (!initialQuoteTime) { - setInitialQuoteTime((s) => s ?? Date.now()); + setInitialQuoteTime((s) => s ?? initialQuoteTimeToUse); } return { estimatedTime, quote, - initialQuoteTime, + initialQuoteTime: initialQuoteTimeToUse, quotedFees: feesQuery.fees, quotedLimits: limitsQuery.limits, quotePriceUSD: usdPriceQuery.data.price,