mirror of
https://github.com/planetmint/planetmint.git
synced 2025-11-24 14:35:45 +00:00
fixed last test cases
Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>
This commit is contained in:
parent
f9778e9ba1
commit
001943df20
@ -337,11 +337,10 @@ def get_election(conn, election_id):
|
||||
sort=[('height', DESCENDING)])
|
||||
)
|
||||
|
||||
|
||||
@register_query(LocalMongoDBConnection)
|
||||
def get_asset_tokens_for_public_key(conn, asset_id, public_key):
|
||||
query = {'outputs.public_keys': [public_key],
|
||||
'asset.id': asset_id}
|
||||
'assets.id': asset_id}
|
||||
|
||||
cursor = conn.run(
|
||||
conn.collection('transactions').aggregate([
|
||||
|
||||
@ -104,8 +104,9 @@ class ValidationWorker:
|
||||
self.validated_transactions = defaultdict(list)
|
||||
|
||||
def validate(self, dict_transaction):
|
||||
# TODO: this will only work for now, no multiasset support => needs to be refactored for COMPOSE/DECOMPOSE
|
||||
try:
|
||||
asset_id = dict_transaction['asset']['id']
|
||||
asset_id = dict_transaction['assets'][0]['id']
|
||||
except KeyError:
|
||||
asset_id = dict_transaction['id']
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user