Display proper rate for ln sats feature

fixes #1128
This commit is contained in:
Kukks 2019-11-10 18:49:24 +01:00
parent b75eaee6dd
commit 621a7d998d
3 changed files with 3 additions and 1 deletions

View file

@ -78,5 +78,6 @@ namespace BTCPayServer.Models.InvoicingModels
public string RootPath { get; set; }
public decimal CoinSwitchAmountMarkupPercentage { get; set; }
public bool RedirectAutomatically { get; set; }
public string RateBaseAmount { get; set; } = "1";
}
}

View file

@ -185,6 +185,7 @@ namespace BTCPayServer.Payments.Lightning
model.BtcPaid = Money.Parse(model.BtcPaid).ToUnit(MoneyUnit.Satoshi).ToString(CultureInfo.InvariantCulture);
model.NetworkFee = new Money(model.NetworkFee, MoneyUnit.BTC).ToUnit(MoneyUnit.Satoshi);
model.OrderAmount = Money.Parse(model.OrderAmount).ToUnit(MoneyUnit.Satoshi).ToString(CultureInfo.InvariantCulture);
model.RateBaseAmount = Money.FromUnit(1, MoneyUnit.BTC).Satoshi.ToString(CultureInfo.InvariantCulture);
}
}
public override string GetCryptoImage(PaymentMethodId paymentMethodId)

View file

@ -100,7 +100,7 @@
<span>{{ srvModel.btcDue }} {{ srvModel.cryptoCode }}</span>
</div>
<div class="single-item-order__right__ex-rate" v-if="srvModel.orderAmountFiat && srvModel.cryptoCode">
1 {{ srvModel.cryptoCodeSrv }} = {{ srvModel.rate }}
{{srvModel.rateBaseAmount}} {{ srvModel.cryptoCodeSrv }} = {{ srvModel.rate }}
</div>
</div>
<span class="fa fa-angle-double-down"></span>