Update BC-UR bundle and support decoding hex format of wallet (#2505)

This commit is contained in:
Andrew Camilleri
2021-05-07 17:35:43 +02:00
committed by GitHub
parent 84ec33afb3
commit c38eeddc55
2 changed files with 6 additions and 1 deletions

View File

@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BTCPayServer.Payments;
using NBitcoin;
using NBitcoin.DataEncoders;
@@ -98,6 +99,10 @@ namespace BTCPayServer
JObject jobj = null;
try
{
if (HexEncoder.IsWellFormed(fileContents))
{
fileContents = Encoding.UTF8.GetString(Encoders.Hex.DecodeData(fileContents));
}
jobj = JObject.Parse(fileContents);
}
catch

File diff suppressed because one or more lines are too long