Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Commit f9c7d3f

Browse files
authored
Merge pull request #1940 from OpenBazaar/1681-escrowrelease-without-inputs
[#1681] Protect POSTReleaseEscrow sweep when there are no inputs
2 parents edb5cc6 + 6804ab0 commit f9c7d3f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

core/completion.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,10 @@ func (n *OpenBazaarNode) ReleaseFundsAfterTimeout(contract *pb.RicardianContract
349349
}
350350
}
351351

352+
if len(txInputs) == 0 {
353+
return errors.New("there are no inputs available for this transaction")
354+
}
355+
352356
chaincode, err := hex.DecodeString(contract.BuyerOrder.Payment.Chaincode)
353357
if err != nil {
354358
return err

0 commit comments

Comments
 (0)