Update NBXplorer

This commit is contained in:
nicolas.dorier
2019-11-15 18:53:20 +09:00
parent 89539fca01
commit 2bfea50014
6 changed files with 11 additions and 13 deletions

View File

@@ -5,6 +5,6 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.9" Condition="'$(TargetFramework)' == 'netcoreapp2.1'" /> <PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.9" Condition="'$(TargetFramework)' == 'netcoreapp2.1'" />
<FrameworkReference Include="Microsoft.AspNetCore.App" Condition="'$(TargetFramework)' != 'netcoreapp2.1'" /> <FrameworkReference Include="Microsoft.AspNetCore.App" Condition="'$(TargetFramework)' != 'netcoreapp2.1'" />
<PackageReference Include="NBXplorer.Client" Version="2.0.0.23" /> <PackageReference Include="NBXplorer.Client" Version="2.0.0.24" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@@ -76,7 +76,7 @@ services:
- customer_lnd - customer_lnd
- merchant_lnd - merchant_lnd
nbxplorer: nbxplorer:
image: nicolasdorier/nbxplorer:2.0.0.62 image: nicolasdorier/nbxplorer:2.0.0.63
restart: unless-stopped restart: unless-stopped
ports: ports:
- "32838:32838" - "32838:32838"

View File

@@ -88,8 +88,7 @@ namespace BTCPayServer.Controllers
var segwit = network.NBitcoinNetwork.Consensus.SupportSegwit; var segwit = network.NBitcoinNetwork.Consensus.SupportSegwit;
var derivation = new DerivationStrategyFactory(network.NBitcoinNetwork).CreateDirectDerivationStrategy(getxpubResult.ExtPubKey, new DerivationStrategyOptions() var derivation = new DerivationStrategyFactory(network.NBitcoinNetwork).CreateDirectDerivationStrategy(getxpubResult.ExtPubKey, new DerivationStrategyOptions()
{ {
P2SH = segwit, ScriptPubKeyType = segwit ? ScriptPubKeyType.SegwitP2SH : ScriptPubKeyType.Legacy
Legacy = !segwit
}); });
getxpubResult.DerivationScheme = derivation; getxpubResult.DerivationScheme = derivation;
getxpubResult.RootFingerprint = (await hw.GetExtPubKey(network, new KeyPath(), normalOperationTimeout.Token)).ExtPubKey.PubKey.GetHDFingerPrint(); getxpubResult.RootFingerprint = (await hw.GetExtPubKey(network, new KeyPath(), normalOperationTimeout.Token)).ExtPubKey.PubKey.GetHDFingerPrint();

View File

@@ -21,8 +21,8 @@ namespace BTCPayServer.Data
public static bool SetBlob(this PaymentRequestData paymentRequestData, PaymentRequestBlob blob) public static bool SetBlob(this PaymentRequestData paymentRequestData, PaymentRequestBlob blob)
{ {
var original = new Serializer(Network.Main).ToString(paymentRequestData.GetBlob()); var original = new Serializer(null).ToString(paymentRequestData.GetBlob());
var newBlob = new Serializer(Network.Main).ToString(blob); var newBlob = new Serializer(null).ToString(blob);
if (original == newBlob) if (original == newBlob)
return false; return false;
paymentRequestData.Blob = ZipUtils.Zip(newBlob); paymentRequestData.Blob = ZipUtils.Zip(newBlob);

View File

@@ -45,11 +45,10 @@ namespace BTCPayServer.Data
} }
#pragma warning restore CS0618 #pragma warning restore CS0618
static Network Dummy = Network.Main;
public static StoreBlob GetStoreBlob(this StoreData storeData) public static StoreBlob GetStoreBlob(this StoreData storeData)
{ {
var result = storeData.StoreBlob == null ? new StoreBlob() : new Serializer(Dummy).ToObject<StoreBlob>(Encoding.UTF8.GetString(storeData.StoreBlob)); var result = storeData.StoreBlob == null ? new StoreBlob() : new Serializer(null).ToObject<StoreBlob>(Encoding.UTF8.GetString(storeData.StoreBlob));
if (result.PreferredExchange == null) if (result.PreferredExchange == null)
result.PreferredExchange = CoinAverageRateProvider.CoinAverageName; result.PreferredExchange = CoinAverageRateProvider.CoinAverageName;
return result; return result;
@@ -57,8 +56,8 @@ namespace BTCPayServer.Data
public static bool SetStoreBlob(this StoreData storeData, StoreBlob storeBlob) public static bool SetStoreBlob(this StoreData storeData, StoreBlob storeBlob)
{ {
var original = new Serializer(Dummy).ToString(storeData.GetStoreBlob()); var original = new Serializer(null).ToString(storeData.GetStoreBlob());
var newBlob = new Serializer(Dummy).ToString(storeBlob); var newBlob = new Serializer(null).ToString(storeBlob);
if (original == newBlob) if (original == newBlob)
return false; return false;
storeData.StoreBlob = Encoding.UTF8.GetBytes(newBlob); storeData.StoreBlob = Encoding.UTF8.GetBytes(newBlob);

View File

@@ -543,7 +543,7 @@ namespace BTCPayServer.Services.Invoices
public PaymentMethodDictionary GetPaymentMethods() public PaymentMethodDictionary GetPaymentMethods()
{ {
PaymentMethodDictionary paymentMethods = new PaymentMethodDictionary(); PaymentMethodDictionary paymentMethods = new PaymentMethodDictionary();
var serializer = new Serializer(Dummy); var serializer = new Serializer(null);
#pragma warning disable CS0618 #pragma warning disable CS0618
if (PaymentMethod != null) if (PaymentMethod != null)
{ {
@@ -574,7 +574,7 @@ namespace BTCPayServer.Services.Invoices
public void SetPaymentMethods(PaymentMethodDictionary paymentMethods) public void SetPaymentMethods(PaymentMethodDictionary paymentMethods)
{ {
var obj = new JObject(); var obj = new JObject();
var serializer = new Serializer(Dummy); var serializer = new Serializer(null);
#pragma warning disable CS0618 #pragma warning disable CS0618
foreach (var v in paymentMethods) foreach (var v in paymentMethods)
{ {