Decimal precision and filter valid transaction (#1538)

The liquid transactions list was showing all transactions to the wallet, even when it had nothing to do with the specific crypto code (e.g sending LBTC txs in USDT, LCAD in USDT, etc). This PR fixes that.

It also uses the previously introduced checkout decimal precision fix to the Wallets screen, specifically the balance amount on wallet llist and balance change on transaction list.
This commit is contained in:
Andrew Camilleri
2020-05-03 18:04:34 +02:00
committed by GitHub
parent 9c9c102e74
commit 67da6ee379
7 changed files with 61 additions and 15 deletions

View File

@@ -285,7 +285,7 @@ namespace BTCPayServer.Controllers
vm.Id);
vm.Timestamp = tx.Timestamp;
vm.Positive = tx.BalanceChange.GetValue(wallet.Network) >= 0;
vm.Balance = tx.BalanceChange.ToString();
vm.Balance = tx.BalanceChange.ShowMoney(wallet.Network);
vm.IsConfirmed = tx.Confirmations != 0;
if (walletTransactionsInfo.TryGetValue(tx.TransactionId.ToString(), out var transactionInfo))
@@ -996,7 +996,8 @@ namespace BTCPayServer.Controllers
{
try
{
return (await wallet.GetBalance(derivationStrategy, cts.Token)).ToString(CultureInfo.InvariantCulture);
return (await wallet.GetBalance(derivationStrategy, cts.Token)).ShowMoney(wallet.Network
.Divisibility);
}
catch
{