Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: exchange rate uses core api endpoint #115

Merged
merged 3 commits into from
Dec 19, 2024
Merged

fix: exchange rate uses core api endpoint #115

merged 3 commits into from
Dec 19, 2024

Conversation

talvasconcelos
Copy link
Collaborator

Fiat conversion rates are sent as tuple

@dni
Copy link
Member

dni commented Dec 19, 2024

why?

@dni
Copy link
Member

dni commented Dec 19, 2024

use endpoint from core instead. and remove the dead code

@api_router.get("/api/v1/rate/{currency}")
async def api_check_fiat_rate(currency: str) -> dict[str, float]:
    rate, price = await get_fiat_rate_satoshis(currency)
    return {"rate": rate, "price": price}

@dni dni changed the title fix: exchange rate now is a tuple/list fix: exchange rate uses core api endpoint Dec 19, 2024
@dni dni merged commit 87e9528 into main Dec 19, 2024
14 checks passed
@dni dni deleted the fix_exchange_rate branch December 19, 2024 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants