mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-26 15:41:29 +01:00
22 lines
599 B
C#
22 lines
599 B
C#
|
#nullable enable
|
||
|
using System;
|
||
|
using BTCPayServer;
|
||
|
namespace BTCPayServer.Services.WalletFileParsing;
|
||
|
public class NBXDerivGenericWalletFileParser : IWalletFileParser
|
||
|
{
|
||
|
public (BTCPayServer.DerivationSchemeSettings? DerivationSchemeSettings, string? Error) TryParse(BTCPayNetwork network,
|
||
|
string data)
|
||
|
{
|
||
|
try
|
||
|
{
|
||
|
var result = BTCPayServer.DerivationSchemeSettings.Parse(data, network);
|
||
|
result.Source = "Generic";
|
||
|
return (result, null);
|
||
|
}
|
||
|
catch (Exception)
|
||
|
{
|
||
|
return (null, null);
|
||
|
}
|
||
|
}
|
||
|
}
|