Run dotnet format (#3244)

This commit is contained in:
Nicolas Dorier
2021-12-31 16:59:02 +09:00
committed by GitHub
parent e2d0b7c5f7
commit 04b8eafacb
259 changed files with 1613 additions and 1491 deletions

View File

@@ -37,16 +37,16 @@ namespace BTCPayServer
return (Parse($"{hd.Extkey}{suffix}"), null);
case PubKeyProvider.Origin origin:
var innerResult = ExtractFromPkProvider(origin.Inner, suffix);
return (innerResult.Item1, new[] {origin.KeyOriginInfo});
return (innerResult.Item1, new[] { origin.KeyOriginInfo });
default:
throw new ArgumentOutOfRangeException();
}
}
ArgumentNullException.ThrowIfNull(str);
str = str.Trim();
var outputDescriptor = OutputDescriptor.Parse(str, Network);
switch(outputDescriptor)
switch (outputDescriptor)
{
case OutputDescriptor.PK _:
case OutputDescriptor.Raw _:
@@ -58,7 +58,7 @@ namespace BTCPayServer
var xpubs = multi.PkProviders.Select(provider => ExtractFromPkProvider(provider));
return (
Parse(
$"{multi.Threshold}-of-{(string.Join('-', xpubs.Select(tuple => tuple.Item1.ToString())))}{(multi.IsSorted?"":"-[keeporder]")}"),
$"{multi.Threshold}-of-{(string.Join('-', xpubs.Select(tuple => tuple.Item1.ToString())))}{(multi.IsSorted ? "" : "-[keeporder]")}"),
xpubs.SelectMany(tuple => tuple.Item2).ToArray());
case OutputDescriptor.PKH pkh:
return ExtractFromPkProvider(pkh.PkProvider, "-[legacy]");
@@ -82,7 +82,7 @@ namespace BTCPayServer
case OutputDescriptor.WSH wsh:
if (wsh.Inner is OutputDescriptor.Multi)
{
return ParseOutputDescriptor(wsh.Inner.ToString());
return ParseOutputDescriptor(wsh.Inner.ToString());
}
throw new FormatException("wsh descriptors are only supported with multisig");
default: