mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2025-02-23 14:40:47 +01:00
api: Fix conversion from fiat to satoshis (#516)
Conversion to satoshis incorrectly used data.to as fiat currency rather than data._from.
This commit is contained in:
parent
251e6a8233
commit
baf55afc28
1 changed files with 1 additions and 1 deletions
|
@ -560,6 +560,6 @@ async def api_fiat_as_sats(data: ConversionData):
|
|||
return output
|
||||
else:
|
||||
output[data.from_.upper()] = data.amount
|
||||
output["sats"] = await fiat_amount_as_satoshis(data.amount, data.to)
|
||||
output["sats"] = await fiat_amount_as_satoshis(data.amount, data._from)
|
||||
output["BTC"] = output["sats"] / 100000000
|
||||
return output
|
||||
|
|
Loading…
Add table
Reference in a new issue