Changed to_json to to_dict in Appointment and Job; added to_json to Appointment to actually return a string

This commit is contained in:
Salvatore Ingala
2019-10-11 10:48:35 +07:00
parent e4e83167b7
commit 7c1d8b69c7
6 changed files with 28 additions and 14 deletions

View File

@@ -29,7 +29,7 @@ class Job:
# can be directly got from DB
self.locator = sha256(unhexlify(dispute_txid)).hexdigest()
def to_json(self):
def to_dict(self):
job = {"locator": self.locator, "justice_rawtx": self.justice_rawtx, "appointment_end": self.appointment_end}
return job