fix claim not being saved to the db

This commit is contained in:
Jack Robison 2019-03-30 21:44:00 -04:00
parent f0e17cff9a
commit f125468ebf
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2

View file

@ -350,9 +350,12 @@ class StreamManager:
raise ResolveError("cannot download a channel claim, specify a /path")
# resolve the claim
resolved = (await self.wallet.ledger.resolve(0, 10, uri)).get(uri, {})
resolved_result = await self.wallet.ledger.resolve(0, 10, uri)
await self.storage.save_claims_for_resolve([
value for value in resolved_result.values() if 'error' not in value
])
resolved = resolved_result.get(uri, {})
resolved = resolved if 'value' in resolved else resolved.get('claim')
if not resolved:
raise ResolveError(f"Failed to resolve stream at '{uri}'")
if 'error' in resolved: