From 4ddbcd1fd10a7a8ec58be97fda429ea6e8a81fd7 Mon Sep 17 00:00:00 2001 From: louisinger Date: Fri, 23 Aug 2024 12:30:27 +0200 Subject: [PATCH] hotfix AddInWitnessUtxo in txBuilder --- .../infrastructure/tx-builder/covenantless/builder.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/internal/infrastructure/tx-builder/covenantless/builder.go b/server/internal/infrastructure/tx-builder/covenantless/builder.go index 3c876fe95..f952b5398 100644 --- a/server/internal/infrastructure/tx-builder/covenantless/builder.go +++ b/server/internal/infrastructure/tx-builder/covenantless/builder.go @@ -624,7 +624,7 @@ func (b *txBuilder) createPoolTx( if err != nil { return nil, err } - for _, utxo := range utxos { + for inIndex, utxo := range utxos { script, err := hex.DecodeString(utxo.GetScript()) if err != nil { return nil, err @@ -633,7 +633,7 @@ func (b *txBuilder) createPoolTx( if err := updater.AddInWitnessUtxo(&wire.TxOut{ Value: int64(utxo.GetValue()), PkScript: script, - }, 0); err != nil { + }, inIndex); err != nil { return nil, err } }