fix: catch init fiat providers (#3281)

This commit is contained in:
dni ⚡
2025-07-17 14:58:03 +03:00
committed by GitHub
parent 851c952c6d
commit 133afff8ee
3 changed files with 19 additions and 4 deletions
+5
View File
@@ -176,6 +176,11 @@ async def test_connection(provider: str) -> SimpleStatus:
This function should be called when setting up or testing the Stripe integration.
"""
fiat_provider = await get_fiat_provider(provider)
if not fiat_provider:
return SimpleStatus(
success=False,
message=f"Fiat provider '{provider}' not found.",
)
status = await fiat_provider.status()
if status.error_message:
return SimpleStatus(