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

Commit d01e377

Browse files
committed
Properly set read flag in transactionListener
1 parent 9eba5d5 commit d01e377

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

wallet/listeners/transaction_listener.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ func (l *TransactionListener) OnTransactionReceived(cb wallet.TransactionCallbac
168168
log.Errorf("failed updating order (%s) to RESOLVED: %s", orderId, err.Error())
169169
}
170170
} else {
171-
if err := l.db.Sales().Put(orderId, *contract, state, false); err != nil {
171+
if err := l.db.Sales().Put(orderId, *contract, state, !unseenTx); err != nil {
172172
log.Errorf("failed updating order (%s) with DisputeAcceptance: %s", orderId, err.Error())
173173
}
174174
}
@@ -212,7 +212,7 @@ func (l *TransactionListener) OnTransactionReceived(cb wallet.TransactionCallbac
212212
log.Errorf("failed updating order (%s) to RESOLVED: %s", orderId, err.Error())
213213
}
214214
} else {
215-
if err := l.db.Purchases().Put(orderId, *contract, state, false); err != nil {
215+
if err := l.db.Purchases().Put(orderId, *contract, state, !unseenTx); err != nil {
216216
log.Errorf("failed updating order (%s) with DisputeAcceptance: %s", orderId, err.Error())
217217
}
218218
}

0 commit comments

Comments
 (0)