Skip to content
This repository was archived by the owner on May 16, 2019. It is now read-only.

Commit 2a377ad

Browse files
committed
Set status on dispute payout
1 parent 45f23d2 commit 2a377ad

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

market/moderation.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,12 @@ def close_dispute(resolution_json, db, message_listener, notification_listener,
165165

166166
contract["dispute_resolution"] = resolution_json["dispute_resolution"]
167167

168+
if db.purchases.get_purchase(order_id) is not None:
169+
db.purchases.update_status(order_id, 5)
170+
171+
elif db.sales.get_sale(order_id) is not None:
172+
db.sales.update_status(order_id, 5)
173+
168174
with open(file_path, 'wb') as outfile:
169175
outfile.write(json.dumps(contract, indent=4))
170176

market/network.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -944,6 +944,11 @@ def release_funds(self, order_id):
944944
tx.broadcast(self.protocol.multiplexer.blockchain)
945945
self.log.info("Broadcasting payout tx %s to network" % tx.get_hash())
946946

947+
if self.db.purchases.get_purchase(order_id) is not None:
948+
self.db.purchases.update_status(order_id, 6)
949+
elif self.db.sales.get_sale(order_id) is not None:
950+
self.db.sales.update_status(order_id, 6)
951+
947952
def get_ratings(self, node_to_ask, listing_hash=None):
948953
"""
949954
Query the given node for a listing of ratings/reviews for the given listing.

protos/contract.proto

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ of a larger refactor of the contracts module, hence this is not used yet.
1717

1818
syntax = "proto3";
1919

20-
//This is the message structure for OpenBazaar messages going over the wire
2120
message Contract {
2221
VendorOffer vendor_offer = 1;
2322
BuyerOrder buyer_order = 2;

0 commit comments

Comments
 (0)