Skip to content

Commit

Permalink
fix(bridge): initial quote time issue (#866)
Browse files Browse the repository at this point in the history
  • Loading branch information
dohaki authored Oct 12, 2023
1 parent 84f306c commit 81f8989
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/views/Bridge/hooks/useBridgeAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export function useBridgeAction(
!frozenTokenPrice ||
!tokenSymbol
) {
return;
throw new Error("Missing required data for bridge action");
}

if (isWrongNetwork) {
Expand Down
6 changes: 4 additions & 2 deletions src/views/Bridge/hooks/useTransferQuote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

2 comments on commit 81f8989

@vercel
Copy link

@vercel vercel bot commented on 81f8989 Oct 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

goerli-frontend-v2 – ./

goerli-frontend-v2.vercel.app
goerli-frontend-v2-git-master-uma.vercel.app
goerli-frontend-v2-uma.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 81f8989 Oct 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.