From 9cdc079aed0bebae81d16f8ef0bea27ffc0117f8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jos=C3=A9=20A=2EP?=
<53834183+Jossec101@users.noreply.github.com>
Date: Tue, 25 Jun 2024 11:09:58 +0200
Subject: [PATCH] Bump dependencies (#374)
* Bump deps
* Fix problem with new change in nbxplorer when tracking btc addresses
---
src/NodeGuard.csproj | 50 ++++++++++-----------
src/Services/BitcoinService.cs | 8 ++--
src/Services/NBXplorerService.cs | 10 ++---
test/NodeGuard.Tests/NodeGuard.Tests.csproj | 22 ++++-----
4 files changed, 45 insertions(+), 45 deletions(-)
diff --git a/src/NodeGuard.csproj b/src/NodeGuard.csproj
index ada8df2d..8890db6b 100644
--- a/src/NodeGuard.csproj
+++ b/src/NodeGuard.csproj
@@ -18,46 +18,46 @@
-
-
+
+
-
+
-
-
-
-
-
+
+
+
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
-
-
+
+
+
+
-
+
-
+
-
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
-
-
-
+
+
+
diff --git a/src/Services/BitcoinService.cs b/src/Services/BitcoinService.cs
index 8b62d6fb..e67ab73a 100644
--- a/src/Services/BitcoinService.cs
+++ b/src/Services/BitcoinService.cs
@@ -72,7 +72,7 @@ ICoinSelectionService coinSelectionService
if (wallet == null) throw new ArgumentNullException(nameof(wallet));
var balance = await _nbXplorerService.GetBalanceAsync(wallet.GetDerivationStrategy(), default);
- var confirmedBalanceMoney = (Money) balance.Confirmed;
+ var confirmedBalanceMoney = (Money)balance.Confirmed;
return (confirmedBalanceMoney.ToUnit(MoneyUnit.BTC), confirmedBalanceMoney.Satoshi);
}
@@ -149,7 +149,7 @@ public async Task GenerateTemplatePSBT(WalletWithdrawalRequest walletWithd
{
var balanceResponse = await _nbXplorerService.GetBalanceAsync(derivationStrategy);
- walletWithdrawalRequest.Amount = ((Money) balanceResponse.Confirmed).ToUnit(MoneyUnit.BTC);
+ walletWithdrawalRequest.Amount = ((Money)balanceResponse.Confirmed).ToUnit(MoneyUnit.BTC);
var update = _walletWithdrawalRequestRepository.Update(walletWithdrawalRequest);
if (!update.Item1)
@@ -217,7 +217,7 @@ await _coinSelectionService.GetTxInputCoins(availableUTXOs, walletWithdrawalRequ
var builder = txBuilder;
builder.AddCoins(scriptCoins);
- var changelessAmount = selectedUTXOs.Sum(u => (Money) u.Value);
+ var changelessAmount = selectedUTXOs.Sum(u => (Money)u.Value);
var amount = new Money(walletWithdrawalRequest.SatsAmount, MoneyUnit.Satoshi);
var destination = BitcoinAddress.Create(walletWithdrawalRequest.DestinationAddress, nbXplorerNetwork);
@@ -452,7 +452,7 @@ public async Task PerformWithdrawal(WalletWithdrawalRequest walletWithdrawalRequ
walletWithdrawalRequest.DestinationAddress,
CurrentNetworkHelper.GetCurrentNetwork()));
- await _nbXplorerService.TrackAsync(trackedSourceAddress, default);
+ await _nbXplorerService.TrackAsync(trackedSourceAddress, new TrackWalletRequest{}, default);
}
catch (Exception e)
{
diff --git a/src/Services/NBXplorerService.cs b/src/Services/NBXplorerService.cs
index a13fdc71..08f45ad6 100644
--- a/src/Services/NBXplorerService.cs
+++ b/src/Services/NBXplorerService.cs
@@ -13,7 +13,7 @@ public interface INBXplorerService
{
public Task TrackAsync(DerivationStrategyBase derivationStrategyBase, CancellationToken cancellation = default);
- public Task TrackAsync(TrackedSource trackedSource, CancellationToken cancellation = default);
+ public Task TrackAsync(TrackedSource trackedSource, TrackWalletRequest trackWalletRequest, CancellationToken cancellation = default);
public Task GetTransactionAsync(uint256 txId, CancellationToken cancellation = default);
@@ -36,7 +36,7 @@ public Task GetFeeRateAsync(int blockCount, FeeRate fallbackFe
public Task BroadcastAsync(Transaction tx, bool testMempoolAccept,
CancellationToken cancellation = default);
-
+
public Task GetTransactionsAsync(DerivationStrategyBase derivationStrategy);
public Task ScanUTXOSetAsync(DerivationStrategyBase derivationStrategy,
@@ -100,10 +100,10 @@ public async Task TrackAsync(DerivationStrategyBase derivationStrategyBase,
await client.TrackAsync(derivationStrategyBase, cancellation: cancellation);
}
- public async Task TrackAsync(TrackedSource trackedSource, CancellationToken cancellation = default)
+ public async Task TrackAsync(TrackedSource trackedSource, TrackWalletRequest trackWalletRequest, CancellationToken cancellation = default)
{
var client = await LightningHelper.CreateNBExplorerClient();
- await client.TrackAsync(trackedSource, cancellation);
+ await client.TrackAsync(trackedSource, trackWalletRequest, cancellation);
}
public async Task GetTransactionAsync(uint256 txId, CancellationToken cancellation = default)
@@ -209,7 +209,7 @@ public async Task GetFeeRateAsync(int blockCount, FeeRate fall
{
var feerate = new GetFeeRateResult
{
- FeeRate = new FeeRate((decimal) recommendedFees.FastestFee),
+ FeeRate = new FeeRate((decimal)recommendedFees.FastestFee),
BlockCount = 1 // 60 mins / 10 mins
};
diff --git a/test/NodeGuard.Tests/NodeGuard.Tests.csproj b/test/NodeGuard.Tests/NodeGuard.Tests.csproj
index 5f764148..8348b7f7 100644
--- a/test/NodeGuard.Tests/NodeGuard.Tests.csproj
+++ b/test/NodeGuard.Tests/NodeGuard.Tests.csproj
@@ -10,30 +10,30 @@
-
+
-
+
-
+
-
-
+
+
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
-
+
+
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
-
+