Skip to content

Commit

Permalink
Update c-ligthning and some packages
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasDorier committed Aug 17, 2019
1 parent 63df6ac commit 6ea1541
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 15 deletions.
4 changes: 2 additions & 2 deletions BTCPayServer.Common/BTCPayServer.Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.9" />
<PackageReference Include="NBitcoin" Version="4.1.2.38" />
<PackageReference Include="NBXplorer.Client" Version="2.0.0.18" />
<PackageReference Include="NBitcoin" Version="4.2.4" />
<PackageReference Include="NBXplorer.Client" Version="2.0.0.19" />
</ItemGroup>
</Project>
4 changes: 2 additions & 2 deletions BTCPayServer.Tests/BTCPayServer.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.0.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
<PackageReference Include="Selenium.WebDriver" Version="3.141.0" />
<PackageReference Include="Selenium.WebDriver.ChromeDriver" Version="74.0.3729.6" />
<PackageReference Include="Selenium.WebDriver.ChromeDriver" Version="76.0.3809.6801" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
<PrivateAssets>all</PrivateAssets>
Expand Down
4 changes: 2 additions & 2 deletions BTCPayServer.Tests/UnitTest1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,7 @@ public async Task CanRescanWallet()
rescan.GapLimit = 100;

// Sending a coin
var txId = tester.ExplorerNode.SendToAddress(btcDerivationScheme.Derive(new KeyPath("0/90")).ScriptPubKey, Money.Coins(1.0m));
var txId = tester.ExplorerNode.SendToAddress(btcDerivationScheme.GetDerivation(new KeyPath("0/90")).ScriptPubKey, Money.Coins(1.0m));
tester.ExplorerNode.Generate(1);
var transactions = Assert.IsType<ListTransactionsViewModel>(Assert.IsType<ViewResult>(walletController.WalletTransactions(walletId).Result).Model);
Assert.Empty(transactions.Transactions);
Expand Down Expand Up @@ -2791,7 +2791,7 @@ public void ParseDerivationSchemeSettings()
Assert.Equal("Coldcard Import 0x60d1af8b", settings.Label);
Assert.Equal("49'/0'/0'", settings.AccountKeySettings[0].AccountKeyPath.ToString());
Assert.Equal("ypub6WWc2gWwHbdnAAyJDnR4SPL1phRh7REqrPBfZeizaQ1EmTshieRXJC3Z5YoU4wkcdKHEjQGkh6AYEzCQC1Kz3DNaWSwdc1pc8416hAjzqyD", settings.AccountOriginal);
Assert.Equal(root.Derive(new KeyPath("m/49'/0'/0'")).Neuter().PubKey.WitHash.ScriptPubKey.Hash.ScriptPubKey, settings.AccountDerivation.Derive(new KeyPath()).ScriptPubKey);
Assert.Equal(root.Derive(new KeyPath("m/49'/0'/0'")).Neuter().PubKey.WitHash.ScriptPubKey.Hash.ScriptPubKey, settings.AccountDerivation.GetDerivation().ScriptPubKey);

var testnet = new BTCPayNetworkProvider(NetworkType.Testnet).GetNetwork<BTCPayNetwork>("BTC");

Expand Down
4 changes: 2 additions & 2 deletions BTCPayServer.Tests/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ services:
- "bitcoin_datadir:/data"

customer_lightningd:
image: btcpayserver/lightning:v0.7.0-1-dev
image: btcpayserver/lightning:v0.7.2-dev
stop_signal: SIGKILL
restart: unless-stopped
environment:
Expand Down Expand Up @@ -166,7 +166,7 @@ services:
- merchant_lightningd

merchant_lightningd:
image: btcpayserver/lightning:v0.7.0-1-dev
image: btcpayserver/lightning:v0.7.2-dev
stop_signal: SIGKILL
environment:
EXPOSE_TCP: "true"
Expand Down
2 changes: 1 addition & 1 deletion BTCPayServer/BTCPayServer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<EmbeddedResource Include="Currencies.txt" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="BTCPayServer.Lightning.All" Version="1.1.0.23" />
<PackageReference Include="BTCPayServer.Lightning.All" Version="1.1.1" />
<PackageReference Include="BuildBundlerMinifier" Version="2.9.406" />
<PackageReference Include="BundlerMinifier.Core" Version="2.9.406" />
<PackageReference Include="BundlerMinifier.TagHelpers" Version="2.9.406" />
Expand Down
2 changes: 1 addition & 1 deletion BTCPayServer/Controllers/ManageController.2FA.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public async Task<IActionResult> EnableAuthenticator(EnableAuthenticatorViewMode
}

// Strip spaces and hypens
var verificationCode = model.Code.Replace(" ", string.Empty).Replace("-", string.Empty);
var verificationCode = model.Code.Replace(" ", string.Empty, StringComparison.OrdinalIgnoreCase).Replace("-", string.Empty, StringComparison.OrdinalIgnoreCase);

var is2faTokenValid = await _userManager.VerifyTwoFactorTokenAsync(
user, _userManager.Options.Tokens.AuthenticatorTokenProvider, verificationCode);
Expand Down
5 changes: 3 additions & 2 deletions BTCPayServer/Controllers/StoresController.BTCLike.cs
Original file line number Diff line number Diff line change
Expand Up @@ -330,14 +330,15 @@ private async Task<string> ReadAllText(IFormFile file)
private IActionResult ShowAddresses(DerivationSchemeViewModel vm, DerivationSchemeSettings strategy)
{
vm.DerivationScheme = strategy.AccountDerivation.ToString();
var deposit = new NBXplorer.KeyPathTemplates(null).GetKeyPathTemplate(DerivationFeature.Deposit);
if (!string.IsNullOrEmpty(vm.DerivationScheme))
{
var line = strategy.AccountDerivation.GetLineFor(DerivationFeature.Deposit);
var line = strategy.AccountDerivation.GetLineFor(deposit);

for (int i = 0; i < 10; i++)
{
var address = line.Derive((uint)i);
vm.AddressSamples.Add((DerivationStrategyBase.GetKeyPath(DerivationFeature.Deposit).Derive((uint)i).ToString(), address.ScriptPubKey.GetDestinationAddress(strategy.Network.NBitcoinNetwork).ToString()));
vm.AddressSamples.Add((deposit.GetKeyPath((uint)i).ToString(), address.ScriptPubKey.GetDestinationAddress(strategy.Network.NBitcoinNetwork).ToString()));
}
}
vm.Confirmation = true;
Expand Down
4 changes: 2 additions & 2 deletions BTCPayServer/DerivationSchemeParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ private DerivationStrategyBase FindMatch(HashSet<string> hintLabels, DerivationS
var firstKeyPath = new KeyPath("0/0");
if (HintScriptPubKey == null)
return result;
if (HintScriptPubKey == result.Derive(firstKeyPath).ScriptPubKey)
if (HintScriptPubKey == result.GetDerivation(firstKeyPath).ScriptPubKey)
return result;

if (result is MultisigDerivationStrategy)
Expand All @@ -170,7 +170,7 @@ private DerivationStrategyBase FindMatch(HashSet<string> hintLabels, DerivationS
foreach (var labels in ItemCombinations(hintLabels.ToList()))
{
var hinted = facto.Parse(resultNoLabels + '-' + string.Join('-', labels.Select(l => $"[{l}]").ToArray()));
if (HintScriptPubKey == hinted.Derive(firstKeyPath).ScriptPubKey)
if (HintScriptPubKey == hinted.GetDerivation(firstKeyPath).ScriptPubKey)
return hinted;
}
throw new FormatException("Could not find any match");
Expand Down
2 changes: 1 addition & 1 deletion BTCPayServer/Services/HardwareWalletService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public virtual async Task<PubKey> GetPubKey(BTCPayNetwork network, KeyPath keyPa
public async Task<KeyPath> FindKeyPathFromDerivation(BTCPayNetwork network, DerivationStrategyBase derivationScheme, CancellationToken cancellation)
{
var pubKeys = derivationScheme.GetExtPubKeys().Select(k => k.GetPublicKey()).ToArray();
var derivation = derivationScheme.Derive(new KeyPath(0));
var derivation = derivationScheme.GetDerivation(new KeyPath(0));
List<KeyPath> derivations = new List<KeyPath>();
if (network.NBitcoinNetwork.Consensus.SupportSegwit)
{
Expand Down

0 comments on commit 6ea1541

Please sign in to comment.