From 382b5517783968eaf88cf5067181b5074ede4f01 Mon Sep 17 00:00:00 2001 From: vic-en Date: Tue, 17 Oct 2023 22:50:42 -0500 Subject: [PATCH] Throw error when no best pool found --- src/connectors/curve/curve.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/connectors/curve/curve.ts b/src/connectors/curve/curve.ts index 465e15e6b7..5d2d0bd6cc 100644 --- a/src/connectors/curve/curve.ts +++ b/src/connectors/curve/curve.ts @@ -194,9 +194,9 @@ export class Curve implements Uniswapish { amount.toString() ); const pool = info[0]; - if (!pool) { + if (!pool || pool === '0x0000000000000000000000000000000000000000') { throw new UniswapishPriceError( - `priceSwapOut: no trade pair found for ${quoteToken.address} to ${baseToken.address}.` + `No pool found for ${quoteToken.address} to ${baseToken.address}.` ); } return {