BIP21 Support for Wallet spending (#1322)

* BIP21 Support for Wallet spending

* extract bip21 loading to method

* add bip21 parsing test
This commit is contained in:
Andrew Camilleri
2020-02-13 09:18:43 +01:00
committed by GitHub
parent 1a409a441d
commit 07f0d95f56
6 changed files with 109 additions and 26 deletions

View File

@@ -15,26 +15,8 @@ namespace BTCPayServer.Models
public StatusSeverity Severity { get; set; }
public bool AllowDismiss { get; set; } = true;
public string SeverityCSS
{
get
{
switch (Severity)
{
case StatusSeverity.Info:
return "info";
case StatusSeverity.Error:
return "danger";
case StatusSeverity.Success:
return "success";
case StatusSeverity.Warning:
return "warning";
default:
throw new ArgumentOutOfRangeException();
}
}
}
public string SeverityCSS => ToString(Severity);
private void ParseNonJsonStatus(string s)
{
Message = s;
@@ -43,6 +25,23 @@ namespace BTCPayServer.Models
: StatusSeverity.Success;
}
public static string ToString(StatusSeverity severity)
{
switch (severity)
{
case StatusSeverity.Info:
return "info";
case StatusSeverity.Error:
return "danger";
case StatusSeverity.Success:
return "success";
case StatusSeverity.Warning:
return "warning";
default:
throw new ArgumentOutOfRangeException();
}
}
public enum StatusSeverity
{
Info,