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

Commit

Permalink
Fix bug unsubscribing from libbitcoin
Browse files Browse the repository at this point in the history
  • Loading branch information
cpacia committed Nov 2, 2016
1 parent 853ba90 commit afc9cd1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion market/contracts.py
Original file line number Diff line number Diff line change
Expand Up @@ -1087,6 +1087,7 @@ def save(self):
self.db.listings.add_listing(data)

def process_refund(self, refund_json, blockchain, notification_listener):
self.blockchain = blockchain
if "refund" in self.contract:
raise Exception("Refund already processed for this order")
self.contract["refund"] = refund_json["refund"]
Expand Down Expand Up @@ -1121,7 +1122,7 @@ def process_refund(self, refund_json, blockchain, notification_listener):
signatures.append(signature_obj)

tx.multisign(signatures, redeem_script)
tx.broadcast(blockchain)
tx.broadcast(self.blockchain)
self.db.transactions.add_transaction(tx.to_raw_tx())
self.blockchain.unsubscribe_address(
self.contract["buyer_order"]["order"]["payment"]["address"], self.on_tx_received)
Expand Down

0 comments on commit afc9cd1

Please sign in to comment.