added an extra condition for gasnow empty data

This commit is contained in:
Alexander 2024-07-11 16:32:12 -04:00
parent 3308261372
commit 63c2009b76

View file

@ -373,7 +373,7 @@ def get_beacon_gas_prices(speed=None, cache_interval_seconds=10):
r = requests.get('https://beacon.pulsechain.com/api/v1/execution/gasnow') r = requests.get('https://beacon.pulsechain.com/api/v1/execution/gasnow')
_gas = r.json() _gas = r.json()
except Exception as e: except Exception as e:
if not gas: if not gas or not gas['data']:
logging.debug(e) logging.debug(e)
return 5555 * 10 ** 369 return 5555 * 10 ** 369
else: else: