Show Immature Balance in walletsend page (#2731)

* Wallet Send page also shows immature balance

* changes ans to and

* Immature Balance msg is not tooltip

* Make msg more clear
This commit is contained in:
Manan Sharma
2021-08-01 17:42:00 +05:30
committed by GitHub
parent 2207d836f1
commit 906c7eb7ec
4 changed files with 19 additions and 4 deletions

View File

@@ -489,8 +489,13 @@ namespace BTCPayServer.Controllers
.ToArray();
var balance = _walletProvider.GetWallet(network).GetBalance(paymentMethod.AccountDerivation);
model.NBXSeedAvailable = await GetSeed(walletId, network) != null;
model.CurrentBalance = (await balance).Total.GetValue(network);
var Balance= await balance;
model.CurrentBalance = (Balance.Available ?? Balance.Total).GetValue(network);
if (Balance.Immature is null)
model.ImmatureBalance = 0;
else
model.ImmatureBalance = Balance.Immature.GetValue(network);
await Task.WhenAll(recommendedFees);
model.RecommendedSatoshiPerByte =
recommendedFees.Select(tuple => tuple.Result).Where(option => option != null).ToList();