Additional error handling around currencies without rates
This commit is contained in:
parent
0825ec4a43
commit
84871d5a7c
|
@ -583,7 +583,9 @@ class LocalPlatformClient(ABC):
|
||||||
if payment_details:
|
if payment_details:
|
||||||
form["account_info"] = payment_details_text
|
form["account_info"] = payment_details_text
|
||||||
form["msg"] = ad_text
|
form["msg"] = ad_text
|
||||||
|
if min_amount is not None:
|
||||||
form["min_amount"] = round(min_amount, 2)
|
form["min_amount"] = round(min_amount, 2)
|
||||||
|
if max_amount is not None:
|
||||||
form["max_amount"] = round(max_amount, 2)
|
form["max_amount"] = round(max_amount, 2)
|
||||||
|
|
||||||
if edit:
|
if edit:
|
||||||
|
|
|
@ -138,7 +138,7 @@ class Money(object):
|
||||||
rates = await self.get_rates_all()
|
rates = await self.get_rates_all()
|
||||||
if currency not in rates and not currency == "USD":
|
if currency not in rates and not currency == "USD":
|
||||||
log.error(f"Can't create ad without rates: {currency}")
|
log.error(f"Can't create ad without rates: {currency}")
|
||||||
return
|
return (None, None)
|
||||||
if currency == "USD":
|
if currency == "USD":
|
||||||
min_amount = min_usd
|
min_amount = min_usd
|
||||||
max_amount = max_usd
|
max_amount = max_usd
|
||||||
|
|
Loading…
Reference in New Issue