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

Commit 2dacc0f

Browse files
committed
Fix disputed but accepted out of sync orders
1 parent de8d0fb commit 2dacc0f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

wallet/listeners/transaction_listener.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,12 @@ func (l *TransactionListener) cleanupOrderState(isSale bool, contract *pb.Ricard
7676
}
7777
}
7878

79-
if contract.DisputeAcceptance != nil && state == pb.OrderState_FULFILLED {
80-
log.Infof("Out of sync order. Found %s and should be %s\n", state, pb.OrderState_DECIDED)
79+
if contract.DisputeAcceptance != nil && state == pb.OrderState_DISPUTED {
80+
log.Infof("Out of sync order. Found %s and should be %s\n", state, pb.OrderState_RESOLVED)
8181
if isSale {
82-
err = l.db.Sales().Put(orderId, *contract, pb.OrderState_DECIDED, false)
82+
err = l.db.Sales().Put(orderId, *contract, pb.OrderState_RESOLVED, false)
8383
} else {
84-
err = l.db.Purchases().Put(orderId, *contract, pb.OrderState_DECIDED, false)
84+
err = l.db.Purchases().Put(orderId, *contract, pb.OrderState_RESOLVED, false)
8585
}
8686
if err != nil {
8787
log.Errorf("Error saving new order state: %s", err)

0 commit comments

Comments
 (0)