Skip to content

Commit ec1d137

Browse files
authored
Merge branch 'master' into renovate/actions-checkout-4-x
2 parents 7ba990f + ee7c9a1 commit ec1d137

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

app/api/pricing/coingecko.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,15 @@ async def fetch_chunk(chunk: list[str]) -> dict:
129129
try:
130130
response = combined_data[id]
131131
vs_currency_key = batch.vs_currency.lower()
132+
percentage_change_24h = response.get(f"{vs_currency_key}_24h_change")
132133
item = TokenPriceResponse(
133134
**request.model_dump(),
134135
vs_currency=batch.vs_currency,
135136
price=float(response[vs_currency_key]),
136-
percentage_change_24h=float(
137-
response[f"{vs_currency_key}_24h_change"]
137+
percentage_change_24h=(
138+
float(percentage_change_24h)
139+
if percentage_change_24h is not None
140+
else None
138141
),
139142
cache_status=CacheStatus.MISS,
140143
source=PriceSource.COINGECKO,

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "gate3"
3-
version = "0.3.0"
3+
version = "0.3.1"
44
description = "Gate API for web3 applications at Brave"
55
authors = [
66
]

0 commit comments

Comments
 (0)