diff --git a/.changeset/clean-snakes-speak.md b/.changeset/clean-snakes-speak.md new file mode 100644 index 00000000..503e5cf4 --- /dev/null +++ b/.changeset/clean-snakes-speak.md @@ -0,0 +1,5 @@ +--- +'@reservoir0x/relay-kit-ui': patch +--- + +Fix zero quote api error message diff --git a/packages/ui/src/components/widgets/WidgetErrorWell.tsx b/packages/ui/src/components/widgets/WidgetErrorWell.tsx index 6546ed18..c948c82b 100644 --- a/packages/ui/src/components/widgets/WidgetErrorWell.tsx +++ b/packages/ui/src/components/widgets/WidgetErrorWell.tsx @@ -38,7 +38,9 @@ export const WidgetErrorWell: FC = ({ const isSmallDevice = useMediaQuery('(max-width: 600px)') const fetchQuoteErrorMessage = error ? error?.response?.data?.message - ? (error?.response?.data.message as string) + ? error?.response?.data.message === 'processing response error' + ? 'Amount is higher than the available liquidity.' + : (error?.response?.data.message as string) : 'Unknown Error' : null const isHighPriceImpact = Number(quote?.details?.totalImpact?.percent) < -3.5