Skip to content

Commit

Permalink
Allow to calculate witness hash from PSBT for Delayed Payment Output
Browse files Browse the repository at this point in the history
Looks like this type of the outputs was just missed.
  • Loading branch information
yellowred committed May 2, 2024
1 parent 0760bd0 commit 1e74552
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions remotesigning/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -48,4 +49,4 @@ func (v HashValidator) ShouldSign(webhookEvent webhooks.WebhookEvent) bool {
}

return true
}
}

0 comments on commit 1e74552

Please sign in to comment.