|
@@ -20,9 +20,9 @@ def add_contract():
|
|
|
desc=description.get(),
|
|
desc=description.get(),
|
|
|
deadline=int(deadline.get()),
|
|
deadline=int(deadline.get()),
|
|
|
price=float(price.get()),
|
|
price=float(price.get()),
|
|
|
- state = False,
|
|
|
|
|
- client=s,
|
|
|
|
|
- contractor=r)
|
|
|
|
|
|
|
+ state=False,
|
|
|
|
|
+ client=str(s),
|
|
|
|
|
+ contractor=str(r))
|
|
|
|
|
|
|
|
|
|
|
|
|
add_term(contract1)
|
|
add_term(contract1)
|
|
@@ -32,8 +32,8 @@ def add_contract():
|
|
|
def process_term():
|
|
def process_term():
|
|
|
term1 = Contract.Term()
|
|
term1 = Contract.Term()
|
|
|
term1.create(title=title2.get(),
|
|
term1.create(title=title2.get(),
|
|
|
- desc=description2.get(),
|
|
|
|
|
- deadline=int(deadline2.get()))
|
|
|
|
|
|
|
+ desc=description2.get(),
|
|
|
|
|
+ deadline=int(deadline2.get()))
|
|
|
|
|
|
|
|
contract1.add_term(term=term1)
|
|
contract1.add_term(term=term1)
|
|
|
|
|
|
|
@@ -52,10 +52,11 @@ def add_contract():
|
|
|
transaction1.timestamp = time.time()
|
|
transaction1.timestamp = time.time()
|
|
|
|
|
|
|
|
# keys need to be in plain text, otherwise the json dump fucks up
|
|
# keys need to be in plain text, otherwise the json dump fucks up
|
|
|
- transaction1.sender = get_keys(sender.get())
|
|
|
|
|
- transaction1.receiver = get_keys(recipient.get())
|
|
|
|
|
- transaction1.data = transaction1.hash_value
|
|
|
|
|
|
|
+ transaction1.sender = str(get_keys(sender.get()))
|
|
|
|
|
+ transaction1.receiver = str(get_keys(recipient.get()))
|
|
|
|
|
+ transaction1.data = str(transaction1.hash_value)
|
|
|
output = transaction1.serialize()
|
|
output = transaction1.serialize()
|
|
|
|
|
+ output = json.dumps(output, sort_keys=True)
|
|
|
print(output, type(output))
|
|
print(output, type(output))
|
|
|
|
|
|
|
|
conn.root.push_transaction(output)
|
|
conn.root.push_transaction(output)
|