mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-23 06:35:13 +01:00
Remove some annoying warnings
This commit is contained in:
parent
a20db7f341
commit
7fadb4c5ad
3 changed files with 4 additions and 4 deletions
|
@ -2639,7 +2639,7 @@ donation:
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Assert.Equal(1, invoice.SupportedTransactionCurrencies.Count);
|
Assert.Single(invoice.SupportedTransactionCurrencies);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,8 +28,8 @@ namespace BTCPayServer.Hosting
|
||||||
return JArray.Parse(content).OfType<JObject>()
|
return JArray.Parse(content).OfType<JObject>()
|
||||||
.Select(jobj => new Bundle()
|
.Select(jobj => new Bundle()
|
||||||
{
|
{
|
||||||
Name = jobj.Property("name")?.Value.Value<string>() ?? jobj.Property("outputFileName").Value.Value<string>(),
|
Name = jobj.Property("name", StringComparison.OrdinalIgnoreCase)?.Value.Value<string>() ?? jobj.Property("outputFileName", StringComparison.OrdinalIgnoreCase).Value.Value<string>(),
|
||||||
OutputFileUrl = Path.Combine(hosting.ContentRootPath, jobj.Property("outputFileName").Value.Value<string>())
|
OutputFileUrl = Path.Combine(hosting.ContentRootPath, jobj.Property("outputFileName", StringComparison.OrdinalIgnoreCase).Value.Value<string>())
|
||||||
}).ToDictionary(o => o.Name, o => o);
|
}).ToDictionary(o => o.Name, o => o);
|
||||||
}
|
}
|
||||||
}, true);
|
}, true);
|
||||||
|
|
|
@ -118,7 +118,7 @@ namespace BTCPayServer.Services
|
||||||
if (network.NBitcoinNetwork.NetworkType == NetworkType.Mainnet)
|
if (network.NBitcoinNetwork.NetworkType == NetworkType.Mainnet)
|
||||||
throw new Exception($"The opened ledger app does not seems to support {network.NBitcoinNetwork.Name}.");
|
throw new Exception($"The opened ledger app does not seems to support {network.NBitcoinNetwork.Name}.");
|
||||||
}
|
}
|
||||||
var fingerprint = onlyChaincode ? new byte[4] : (await ledger.GetWalletPubKeyAsync(account.Parent, cancellation: cancellation)).UncompressedPublicKey.Compress().Hash.ToBytes().Take(4).ToArray();
|
var fingerprint = onlyChaincode ? default : (await ledger.GetWalletPubKeyAsync(account.Parent, cancellation: cancellation)).UncompressedPublicKey.Compress().GetHDFingerPrint();
|
||||||
var extpubkey = new ExtPubKey(pubKey.UncompressedPublicKey.Compress(), pubKey.ChainCode, (byte)account.Indexes.Length, fingerprint, account.Indexes.Last()).GetWif(network.NBitcoinNetwork);
|
var extpubkey = new ExtPubKey(pubKey.UncompressedPublicKey.Compress(), pubKey.ChainCode, (byte)account.Indexes.Length, fingerprint, account.Indexes.Last()).GetWif(network.NBitcoinNetwork);
|
||||||
return extpubkey;
|
return extpubkey;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue