track fiat value of payments (#1789)
* save fiat_amounts on payment creation * show fiat amount in frontend * add lnbits_default_accounting_currency * extract fiat calculation logic into service * move all currency conversions to calc_fiat_amounts move all conversion logic into create_invoice so extensions can benefit aswell * show user-defined and wallet-defined currency in frontend * remove sat from fiat units * make bundle * improve tests * debug log
This commit is contained in:
@@ -178,7 +178,8 @@ window.LNbits = {
|
||||
id: data.id,
|
||||
name: data.name,
|
||||
adminkey: data.adminkey,
|
||||
inkey: data.inkey
|
||||
inkey: data.inkey,
|
||||
currency: data.currency
|
||||
}
|
||||
newWallet.msat = data.balance_msat
|
||||
newWallet.sat = Math.round(data.balance_msat / 1000)
|
||||
@@ -203,7 +204,9 @@ window.LNbits = {
|
||||
extra: data.extra,
|
||||
wallet_id: data.wallet_id,
|
||||
webhook: data.webhook,
|
||||
webhook_status: data.webhook_status
|
||||
webhook_status: data.webhook_status,
|
||||
fiat_amount: data.fiat_amount,
|
||||
fiat_currency: data.fiat_currency
|
||||
}
|
||||
|
||||
obj.date = Quasar.utils.date.formatDate(
|
||||
|
||||
Reference in New Issue
Block a user