fix publish updates not being saved to the db, don't query the db for the stream hash
This commit is contained in:
parent
1a14157d37
commit
1375153fda
1 changed files with 5 additions and 6 deletions
|
@ -2277,9 +2277,7 @@ class Daemon(metaclass=JSONRPCServerType):
|
|||
await self.storage.save_claims([self._old_get_temp_claim_info(
|
||||
tx, new_txo, claim_address, claim, name, dewies_to_lbc(amount)
|
||||
)])
|
||||
stream_hash = await self.storage.get_stream_hash_for_sd_hash(claim.stream.source.sd_hash)
|
||||
if stream_hash:
|
||||
await self.storage.save_content_claim(stream_hash, new_txo.id)
|
||||
await self.storage.save_content_claim(file_stream.stream_hash, new_txo.id)
|
||||
await self.analytics_manager.send_claim_action('publish')
|
||||
else:
|
||||
await account.ledger.release_tx(tx)
|
||||
|
@ -2432,6 +2430,9 @@ class Daemon(metaclass=JSONRPCServerType):
|
|||
file_stream = await self.stream_manager.create_stream(file_path)
|
||||
new_txo.claim.stream.source.sd_hash = file_stream.sd_hash
|
||||
new_txo.script.generate()
|
||||
stream_hash = file_stream.stream_hash
|
||||
else:
|
||||
stream_hash = await self.storage.get_stream_hash_for_sd_hash(old_txo.claim.stream.source.sd_hash)
|
||||
if channel:
|
||||
new_txo.sign(channel)
|
||||
await tx.sign([account])
|
||||
|
@ -2439,8 +2440,6 @@ class Daemon(metaclass=JSONRPCServerType):
|
|||
await self.storage.save_claims([self._old_get_temp_claim_info(
|
||||
tx, new_txo, claim_address, new_txo.claim, new_txo.claim_name, dewies_to_lbc(amount)
|
||||
)])
|
||||
stream_hash = await self.storage.get_stream_hash_for_sd_hash(new_txo.claim.stream.source.sd_hash)
|
||||
if stream_hash:
|
||||
await self.storage.save_content_claim(stream_hash, new_txo.id)
|
||||
await self.analytics_manager.send_claim_action('publish')
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue