Skip to content

Commit

Permalink
Throw error when no best pool found
Browse files Browse the repository at this point in the history
  • Loading branch information
vic-en committed Oct 18, 2023
1 parent 41ef17b commit 382b551
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/connectors/curve/curve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 382b551

Please sign in to comment.