Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor _old_get_temp_claim_info(), eliminating "bid" arg. #3635

Merged
merged 2 commits into from
Aug 1, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions lbry/extras/daemon/daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -2784,7 +2784,7 @@ async def jsonrpc_channel_create(
wallet.save()
await self.broadcast_or_release(tx, blocking)
self.component_manager.loop.create_task(self.storage.save_claims([self._old_get_temp_claim_info(
tx, txo, claim_address, claim, name, dewies_to_lbc(amount)
tx, txo, claim_address, claim, name
)]))
self.component_manager.loop.create_task(self.analytics_manager.send_new_channel())
else:
Expand Down Expand Up @@ -2943,7 +2943,7 @@ async def jsonrpc_channel_update(
wallet.save()
await self.broadcast_or_release(tx, blocking)
self.component_manager.loop.create_task(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)
tx, new_txo, claim_address, new_txo.claim, new_txo.claim_name
)]))
self.component_manager.loop.create_task(self.analytics_manager.send_new_channel())
else:
Expand Down Expand Up @@ -3542,7 +3542,7 @@ async def jsonrpc_stream_create(

async def save_claims():
await self.storage.save_claims([self._old_get_temp_claim_info(
tx, new_txo, claim_address, claim, name, dewies_to_lbc(amount)
tx, new_txo, claim_address, claim, name
)])
if file_path is not None:
await self.storage.save_content_claim(file_stream.stream_hash, new_txo.id)
Expand Down Expand Up @@ -3779,7 +3779,7 @@ async def jsonrpc_stream_update(

async def save_claims():
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)
tx, new_txo, claim_address, new_txo.claim, new_txo.claim_name
)])
if stream_hash:
await self.storage.save_content_claim(stream_hash, new_txo.id)
Expand Down Expand Up @@ -4349,7 +4349,7 @@ async def jsonrpc_support_create(
'nout': tx.position,
'address': claim_address,
'claim_id': claim_id,
'amount': dewies_to_lbc(amount)
'amount': dewies_to_lbc(new_txo.amount)
}]})
self.component_manager.loop.create_task(self.analytics_manager.send_claim_action('new_support'))
else:
Expand Down Expand Up @@ -5479,11 +5479,11 @@ async def resolve(self, accounts, urls, **kwargs):
return results

@staticmethod
def _old_get_temp_claim_info(tx, txo, address, claim_dict, name, bid):
def _old_get_temp_claim_info(tx, txo, address, claim_dict, name):
return {
"claim_id": txo.claim_id,
"name": name,
"amount": bid,
"amount": dewies_to_lbc(txo.amount),
"address": address,
"txid": tx.id,
"nout": txo.position,
Expand Down