diff --git a/packages/boba/gas-price-oracle/src/service.ts b/packages/boba/gas-price-oracle/src/service.ts index 68da3842f4..93a3b3a003 100644 --- a/packages/boba/gas-price-oracle/src/service.ts +++ b/packages/boba/gas-price-oracle/src/service.ts @@ -671,14 +671,20 @@ export class GasPriceOracleService extends BaseService { private async _queryTokenPrice(tokenPair: string): Promise { if (tokenPair === 'ETH/USD') { - this.state.ETHUSDPrice = Number( + const ETHUSDPrice = Number( await this._getTokenPriceFromCoinGecko('ethereum') ) + if (ETHUSDPrice > 0) { + this.state.ETHUSDPrice = ETHUSDPrice + } } if (tokenPair === 'BOBA/USD') { - this.state.BOBAUSDPrice = Number( + const BOBAUSDPrice = Number( await this._getTokenPriceFromCoinGecko('boba-network') ) + if (BOBAUSDPrice > 0) { + this.state.BOBAUSDPrice = BOBAUSDPrice + } } }