diff --git a/packages/widget/package.json b/packages/widget/package.json
index b824bdaf7..d71fd9684 100644
--- a/packages/widget/package.json
+++ b/packages/widget/package.json
@@ -61,7 +61,7 @@
"@sentry/integrations": "^7.14.0",
"@sentry/react": "^7.14.0",
"@sentry/tracing": "^7.14.0",
- "@tanstack/react-query": "^4.7.2",
+ "@tanstack/react-query": "^4.8.0",
"@tanstack/react-virtual": "^3.0.0-beta.18",
"big.js": "^6.2.1",
"i18next": "^21.9.2",
diff --git a/packages/widget/src/components/SwapRouteCard/SwapRouteCard.tsx b/packages/widget/src/components/SwapRouteCard/SwapRouteCard.tsx
index bb9c4e628..ae784972c 100644
--- a/packages/widget/src/components/SwapRouteCard/SwapRouteCard.tsx
+++ b/packages/widget/src/components/SwapRouteCard/SwapRouteCard.tsx
@@ -82,6 +82,12 @@ export const SwapRouteCardEssentials: React.FC<
SwapRouteCardEssentialsProps
> = ({ route, dense }) => {
const { t } = useTranslation();
+ const executionTime =
+ (
+ route.steps
+ .map((step) => step.estimate.executionDuration)
+ .reduce((duration, x) => duration + x) / 60
+ ).toFixed(0) || 1;
return (
- {t(`swap.currency`, { value: route.gasCostUSD ?? 0 })}
+ {t(`swap.currency`, { value: route.gasCostUSD ?? 0.01 })}
@@ -113,11 +119,7 @@ export const SwapRouteCardEssentials: React.FC<
fontWeight="500"
lineHeight={1}
>
- {`${(
- route.steps
- .map((step) => step.estimate.executionDuration)
- .reduce((duration, x) => duration + x) / 60
- ).toFixed(0)}m`}
+ {`${executionTime}m`}
{!dense ? (
diff --git a/yarn.lock b/yarn.lock
index f6947d592..f08d0e634 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2902,17 +2902,17 @@
resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.24.43.tgz#2e2bce0e5e493aaf639beed0cd6c88cfde7dd3d7"
integrity sha512-1orQTvtazZmsPeBroJjysvsOQCYV2yjWlebkSY38pl5vr2tdLjEJ+LoxITlGNZaH2RE19WlAwQMkH/7C14wLfw==
-"@tanstack/query-core@4.7.2":
- version "4.7.2"
- resolved "https://registry.yarnpkg.com/@tanstack/query-core/-/query-core-4.7.2.tgz#5e8f0bc632b9c5423e5c5ca6d147c386b64dfec7"
- integrity sha512-1zQuFsKShMhLY6rQYBEmkYiK9Zcb3lQcCVOTIgQcvliKIxPyZFaE/8LMtaITEEfgGF5qwYqHdm61+BUtpyNsrg==
+"@tanstack/query-core@4.8.0":
+ version "4.8.0"
+ resolved "https://registry.yarnpkg.com/@tanstack/query-core/-/query-core-4.8.0.tgz#8a7d0a0495c92ab82a49de5c4393dc7b40080d66"
+ integrity sha512-PVcSqAWboFA86eNgtHTOjfHjBkNuFGAM6kPH82p1ibx1R76f7EjedZ+LZi4ZnW4ppoSl/+hUtCgWsiNQ2ViLTw==
-"@tanstack/react-query@^4.7.2":
- version "4.7.2"
- resolved "https://registry.yarnpkg.com/@tanstack/react-query/-/react-query-4.7.2.tgz#ce020c4e0261e16b99d24322d1598ffc28974472"
- integrity sha512-4nJ0HxU2kxkaHZ/swJw39io3Bb3liiggJBsCCdFOydZOl8AJDRCor1E3GsOBrtn53HT01R9EIP4PY/6fyYdKsw==
+"@tanstack/react-query@^4.8.0":
+ version "4.8.0"
+ resolved "https://registry.yarnpkg.com/@tanstack/react-query/-/react-query-4.8.0.tgz#30dbbb9efeb28c66a40ef0bf68b89952dce66ed2"
+ integrity sha512-e3QzL/S8XeA5MYqOUUABet4oZDBc1MbeUIo32r0cxEDoDJS+9oqx0az9AbBxacZ7SjM/Fy4u/eXQFBjsKGFQ6A==
dependencies:
- "@tanstack/query-core" "4.7.2"
+ "@tanstack/query-core" "4.8.0"
use-sync-external-store "^1.2.0"
"@tanstack/react-virtual@^3.0.0-beta.18":