btcpayserver/BTCPayServer/Models/WalletViewModels/WalletPSBTViewModel.cs
nicolas.dorier d1556eb6cd
bump
2019-05-13 08:55:26 +09:00

37 lines
880 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using NBitcoin;
namespace BTCPayServer.Models.WalletViewModels
{
public class WalletPSBTViewModel
{
public string Decoded { get; set; }
string _FileName;
public string FileName
{
get
{
return string.IsNullOrEmpty(_FileName) ? "psbt-export.psbt" : _FileName;
}
set
{
_FileName = value;
}
}
public string PSBT { get; set; }
public List<string> Errors { get; set; } = new List<string>();
internal PSBT GetPSBT(Network network)
{
try
{
return NBitcoin.PSBT.Parse(PSBT, network);
}
catch { }
return null;
}
}
}