Skip to content

Commit

Permalink
catch v2 gas model exception to return undefined v2 gas model
Browse files Browse the repository at this point in the history
  • Loading branch information
jsy1218 committed Feb 27, 2024
1 parent 8e06d2c commit 0c7b6bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/routers/alpha-router/alpha-router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2089,7 +2089,7 @@ export class AlphaRouter
token: quoteToken,
l2GasDataProvider: this.l2GasDataProvider,
providerConfig: providerConfig,
})
}).catch(_ => undefined) // If v2 model throws uncaught exception, we return undefined v2 gas model, so there's a chance v3 route can go through
: Promise.resolve(undefined);

const v3GasModelPromise = this.v3GasModelFactory.buildGasModel({
Expand Down

0 comments on commit 0c7b6bd

Please sign in to comment.