resolve integration tests fixed

This commit is contained in:
Lex Berezhny 2019-05-05 17:04:06 -04:00
parent 587f0b2ea8
commit 998ee9feba

View file

@ -13,6 +13,7 @@ from binascii import hexlify, unhexlify
from traceback import format_exc from traceback import format_exc
from aiohttp import web from aiohttp import web
from functools import wraps from functools import wraps
from google.protobuf.message import DecodeError
from torba.client.wallet import Wallet from torba.client.wallet import Wallet
from torba.client.baseaccount import SingleKey, HierarchicalDeterministic from torba.client.baseaccount import SingleKey, HierarchicalDeterministic
@ -3475,10 +3476,13 @@ class Daemon(metaclass=JSONRPCServerType):
async def resolve(self, urls): async def resolve(self, urls):
results = await self.ledger.resolve(urls) results = await self.ledger.resolve(urls)
if results: if results:
claims = self.stream_manager._convert_to_old_resolve_output(results) try:
await self.storage.save_claims_for_resolve([ claims = self.stream_manager._convert_to_old_resolve_output(results)
value for value in claims.values() if 'error' not in value await self.storage.save_claims_for_resolve([
]) value for value in claims.values() if 'error' not in value
])
except DecodeError:
pass
return results return results
def _old_get_temp_claim_info(self, tx, txo, address, claim_dict, name, bid): def _old_get_temp_claim_info(self, tx, txo, address, claim_dict, name, bid):