From 161850150a5c7e19e3f45fac99bfb80cf7903654 Mon Sep 17 00:00:00 2001 From: Kukks Date: Fri, 17 Apr 2020 10:46:29 +0200 Subject: [PATCH] fix p2sh detection input --- BTCPayServer/Services/PayjoinClient.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BTCPayServer/Services/PayjoinClient.cs b/BTCPayServer/Services/PayjoinClient.cs index 8915a6d24..3e617bdba 100644 --- a/BTCPayServer/Services/PayjoinClient.cs +++ b/BTCPayServer/Services/PayjoinClient.cs @@ -34,7 +34,7 @@ namespace BTCPayServer.Services if (i.WitnessUtxo.ScriptPubKey.IsScriptType(ScriptType.P2WPKH)) return ScriptPubKeyType.Segwit; if (i.WitnessUtxo.ScriptPubKey.IsScriptType(ScriptType.P2SH) && - i.FinalScriptWitness.ToScript().IsScriptType(ScriptType.P2WPKH)) + i.FinalScriptWitness.GetSigner().ScriptPubKey.IsScriptType(ScriptType.P2WPKH)) return ScriptPubKeyType.SegwitP2SH; return null as ScriptPubKeyType?; }