diff --git a/core/disputes.go b/core/disputes.go index 64a385b579..3abdbda80b 100644 --- a/core/disputes.go +++ b/core/disputes.go @@ -1210,6 +1210,12 @@ func (n *OpenBazaarNode) ReleaseFunds(contract *pb.RicardianContract, records [] peerID := order.BuyerID.PeerID + // Build, sign, and broadcast transaction + txnID, err := wal.Multisign(inputs, outputs, mySigs, moderatorSigs, redeemScriptBytes, *big.NewInt(0), true) + if err != nil { + return err + } + // Update database if n.IpfsNode.Identity.Pretty() == order.BuyerID.PeerID { err = n.Datastore.Purchases().Put(orderID, *contract, pb.OrderState_DECIDED, true) @@ -1221,12 +1227,6 @@ func (n *OpenBazaarNode) ReleaseFunds(contract *pb.RicardianContract, records [] log.Errorf("ReleaseFunds error updating database: %s", err.Error()) } - // Build, sign, and broadcast transaction - txnID, err := wal.Multisign(inputs, outputs, mySigs, moderatorSigs, redeemScriptBytes, *big.NewInt(0), true) - if err != nil { - return err - } - err = n.SendOrderPayment(&SpendResponse{ Txid: util.NormalizeAddress(hexutil.Encode(txnID)), Currency: ¤cyDef,