diff --git a/src/sakia/data/entities/transaction.py b/src/sakia/data/entities/transaction.py index 0fdf0e59f591899444a0efb3f7f2e480f5701839..82096a04466c1ac12440460043ecc617962545f3 100644 --- a/src/sakia/data/entities/transaction.py +++ b/src/sakia/data/entities/transaction.py @@ -21,15 +21,15 @@ def parse_transaction_doc(tx_doc, pubkey, block_number, mediantime, txid): :return: the found transaction """ receivers = [ - o.conditions.left.pubkey + o.condition.left.pubkey for o in tx_doc.outputs - if o.conditions.left.pubkey != tx_doc.issuers[0] + if o.condition.left.pubkey != tx_doc.issuers[0] ] in_issuers = len([i for i in tx_doc.issuers if i == pubkey]) > 0 in_outputs = ( - len([o for o in tx_doc.outputs if o.conditions.left.pubkey == pubkey]) > 0 + len([o for o in tx_doc.outputs if o.condition.left.pubkey == pubkey]) > 0 ) if len(receivers) == 0 and in_issuers: @@ -43,14 +43,14 @@ def parse_transaction_doc(tx_doc, pubkey, block_number, mediantime, txid): elif in_issuers or in_outputs: # If the wallet pubkey is in the issuers we sent this transaction if in_issuers: - outputs = [o for o in tx_doc.outputs if o.conditions.left.pubkey != pubkey] + outputs = [o for o in tx_doc.outputs if o.condition.left.pubkey != pubkey] amount = 0 for o in outputs: amount += o.amount * math.pow(10, o.base) # If we are not in the issuers, # maybe we are in the recipients of this transaction else: - outputs = [o for o in tx_doc.outputs if o.conditions.left.pubkey == pubkey] + outputs = [o for o in tx_doc.outputs if o.condition.left.pubkey == pubkey] amount = 0 for o in outputs: amount += o.amount * math.pow(10, o.base) diff --git a/src/sakia/services/documents.py b/src/sakia/services/documents.py index 254c9a5304936c6e0d52ba222bccbf4055a5194a..512f73b5ce5d526ddc00fe177eb34ffce38cce88 100644 --- a/src/sakia/services/documents.py +++ b/src/sakia/services/documents.py @@ -420,7 +420,7 @@ class DocumentsService: :return: """ for offset, output in enumerate(txdoc.outputs): - if output.conditions.left.pubkey == pubkey: + if output.condition.left.pubkey == pubkey: source = Source( currency=currency, pubkey=pubkey, diff --git a/src/sakia/services/sources.py b/src/sakia/services/sources.py index 70ac3b7b75adb98f210f2d8f4476bf8d97d8e06a..9c6b47ae6d8354168c2823404bbd1dbeca643d63 100644 --- a/src/sakia/services/sources.py +++ b/src/sakia/services/sources.py @@ -53,7 +53,7 @@ class SourcesServices(QObject): """ txdoc = TransactionDoc.from_signed_raw(transaction.raw) for offset, output in enumerate(txdoc.outputs): - if output.conditions.left.pubkey == pubkey: + if output.condition.left.pubkey == pubkey: source = Source( currency=self.currency, pubkey=pubkey, @@ -218,7 +218,7 @@ class SourcesServices(QObject): """ txdoc = TransactionDoc.from_signed_raw(tx.raw) for offset, output in enumerate(txdoc.outputs): - if output.conditions.left.pubkey == pubkey: + if output.condition.left.pubkey == pubkey: source = Source( currency=self.currency, pubkey=pubkey,