diff --git a/src/Pages/ChannelRequests.razor b/src/Pages/ChannelRequests.razor
index 2088b484..b9905e1d 100644
--- a/src/Pages/ChannelRequests.razor
+++ b/src/Pages/ChannelRequests.razor
@@ -91,34 +91,29 @@
- @if (context.CellValue == null || (int)context.CellValue == 0)
- {
-
-
-
-
-
- }
- else
- {
-
-
-
-
-
- }
+
+
+
+
+
+
+ @if (_selectedWalletId != null)
+ {
+ @($"{_selectedWalletBalance:f8} BTC ({Math.Round(PriceConversionHelper.BtcToUsdConversion(_selectedWalletBalance, _btcPrice), 2)} USD)")
+ }
+ else
+ {
+ @("Wallet not selected")
+ }
+
@@ -422,6 +417,7 @@
private int _selectedSourceNodeId;
private Node? _selectedDestNode;
private int? _selectedWalletId;
+ private decimal _selectedWalletBalance;
private string? _destNodeName;
private static readonly decimal _minimumChannelCapacity = new Money(Constants.MINIMUM_CHANNEL_CAPACITY_SATS).ToUnit(MoneyUnit.BTC);
private decimal _amount { get; set; } = _minimumChannelCapacity;
@@ -523,9 +519,12 @@
_selectedSourceNodeId = nodeId;
}
- private void OnSelectedWallet(int walletId)
+ private async Task OnSelectedWallet(int walletId)
{
_selectedWalletId = walletId == 0 ? null : walletId;
+ var wallet = _allWallets.Find(w => w.Id == _selectedWalletId);
+ var balance = (await LightningService.GetWalletBalance(wallet))?.Available ?? new Money(0);
+ _selectedWalletBalance = ((Money)balance).ToUnit(MoneyUnit.BTC);
}
private async Task SearchNode()
diff --git a/src/Shared/UTXOSelectorModal.razor b/src/Shared/UTXOSelectorModal.razor
index 57ad10e5..8ea72a7a 100644
--- a/src/Shared/UTXOSelectorModal.razor
+++ b/src/Shared/UTXOSelectorModal.razor
@@ -33,7 +33,12 @@
@if (_selectedStrategy == CoinSelectionStrategy.ClosestToTargetFirst)
{
- Target
+
+ Target
+
+
+
+
@($"{Math.Round(PriceConversionHelper.BtcToUsdConversion(_closestTo, _btcPrice), 2)} USD")
@@ -47,14 +52,24 @@
@if (!_isManualSelection)
{
- Amount
+
+ Amount
+
+
+
+
@($"{Math.Round(PriceConversionHelper.BtcToUsdConversion(_amount, _btcPrice), 2)} USD")
- Limit
+
+ Limit
+
+
+
+
}