mirror of
https://github.com/lnbits/lnbits.git
synced 2025-12-05 10:11:29 +01:00
fix int type by changing the order
This commit is contained in:
@@ -603,8 +603,8 @@ class ConversionData(BaseModel):
|
|||||||
async def api_fiat_as_sats(data: ConversionData):
|
async def api_fiat_as_sats(data: ConversionData):
|
||||||
output = {}
|
output = {}
|
||||||
if data.from_ == "sat":
|
if data.from_ == "sat":
|
||||||
output["sats"] = data.amount
|
|
||||||
output["BTC"] = data.amount / 100000000
|
output["BTC"] = data.amount / 100000000
|
||||||
|
output["sats"] = int(data.amount)
|
||||||
for currency in data.to.split(","):
|
for currency in data.to.split(","):
|
||||||
output[currency.strip().upper()] = await satoshis_amount_as_fiat(
|
output[currency.strip().upper()] = await satoshis_amount_as_fiat(
|
||||||
data.amount, currency.strip()
|
data.amount, currency.strip()
|
||||||
|
|||||||
Reference in New Issue
Block a user