Improve UI of immature balance, show available balance in wallet list (#2732)

This commit is contained in:
Nicolas Dorier
2021-08-01 22:13:12 +09:00
committed by GitHub
parent 906c7eb7ec
commit 1b85ab8b54
4 changed files with 7 additions and 6 deletions

View File

@@ -1063,7 +1063,8 @@ namespace BTCPayServer.Controllers
using CancellationTokenSource cts = new CancellationTokenSource(TimeSpan.FromSeconds(10));
try
{
return (await wallet.GetBalance(derivationStrategy, cts.Token)).Total.ShowMoney(wallet.Network);
var b = await wallet.GetBalance(derivationStrategy, cts.Token);
return (b.Available ?? b.Total).ShowMoney(wallet.Network);
}
catch
{