mirror of
https://github.com/planetmint/planetmint.git
synced 2025-11-25 15:05:49 +00:00
added check to fix vote test cases, requires future change
Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>
This commit is contained in:
parent
20bce1f09b
commit
d2d0840555
@ -240,11 +240,13 @@ class Planetmint(object):
|
|||||||
transaction = backend.query.get_transaction(self.connection, transaction_id)
|
transaction = backend.query.get_transaction(self.connection, transaction_id)
|
||||||
|
|
||||||
if transaction:
|
if transaction:
|
||||||
|
# TODO: get_assets is used with transaction_id this will not work with the asset change
|
||||||
assets = backend.query.get_assets(self.connection, [transaction_id])
|
assets = backend.query.get_assets(self.connection, [transaction_id])
|
||||||
metadata = backend.query.get_metadata(self.connection, [transaction_id])
|
metadata = backend.query.get_metadata(self.connection, [transaction_id])
|
||||||
# NOTE: assets must not be replaced for transfer transactions
|
# NOTE: assets must not be replaced for transfer transactions
|
||||||
# TODO: check if this holds true for other tx types, some test cases connected to election and voting are still failing
|
# TODO: check if this holds true for other tx types, some test cases connected to election and voting are still failing
|
||||||
if transaction['operation'] != 'TRANSFER' and assets:
|
# NOTE: assets should be appended for all txs that define new assets otherwise the ids are already stored in tx
|
||||||
|
if transaction['operation'] != 'TRANSFER' and transaction['operation'] != 'VOTE' and assets:
|
||||||
transaction['assets'] = list(assets)
|
transaction['assets'] = list(assets)
|
||||||
|
|
||||||
if 'metadata' not in transaction:
|
if 'metadata' not in transaction:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user