From 1e745526435bdafe196e9d29305e246204483ce0 Mon Sep 17 00:00:00 2001 From: Oleg Kubrakov Date: Thu, 2 May 2024 16:10:36 -0700 Subject: [PATCH] Allow to calculate witness hash from PSBT for Delayed Payment Output Looks like this type of the outputs was just missed. --- remotesigning/validator.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/remotesigning/validator.go b/remotesigning/validator.go index 680d7f5..793fc63 100644 --- a/remotesigning/validator.go +++ b/remotesigning/validator.go @@ -28,7 +28,8 @@ func (v HashValidator) ShouldSign(webhookEvent webhooks.WebhookEvent) bool { } for _, signing := range request.SigningJobs { - if strings.HasSuffix(signing.DerivationPath, "/2") { + // PaymentOutput or DelayedPaymentOutput + if strings.HasSuffix(signing.DerivationPath, "/2") || strings.HasSuffix(signing.DerivationPath, "/3"){ msg, err := CalculateWitnessHashPSBT(*signing.Transaction) if err != nil { return false @@ -48,4 +49,4 @@ func (v HashValidator) ShouldSign(webhookEvent webhooks.WebhookEvent) bool { } return true -} \ No newline at end of file +}