diff --git a/lbry/wallet/transaction.py b/lbry/wallet/transaction.py index 6f47cdd13..01948ceea 100644 --- a/lbry/wallet/transaction.py +++ b/lbry/wallet/transaction.py @@ -928,14 +928,15 @@ class Transaction: funding_accounts: List['Account'], change_account: 'Account', signing_channel: Output = None, comment: str = None): ledger, _ = cls.ensure_all_have_same_ledger_and_wallet(funding_accounts, change_account) - if signing_channel is not None: + if signing_channel is not None or comment is not None: support = Support() - support.emoji = '👍' - support.comment = comment + if comment is not None: + support.comment = comment support_output = Output.pay_support_data_pubkey_hash( amount, claim_name, claim_id, support, ledger.address_to_hash160(holding_address) ) - support_output.sign(signing_channel, b'placeholder txid:nout') + if signing_channel is not None: + support_output.sign(signing_channel, b'placeholder txid:nout') else: support_output = Output.pay_support_pubkey_hash( amount, claim_name, claim_id, ledger.address_to_hash160(holding_address) diff --git a/tests/integration/blockchain/test_claim_commands.py b/tests/integration/blockchain/test_claim_commands.py index 9714a63a6..a04aec775 100644 --- a/tests/integration/blockchain/test_claim_commands.py +++ b/tests/integration/blockchain/test_claim_commands.py @@ -582,6 +582,12 @@ class TransactionOutputCommands(ClaimTestCase): r, = await self.txo_list(type='support') self.assertEqual(r['txid'], support['txid']) self.assertEqual(r['value']['comment'], "nice!") + await self.support_abandon(txid=support['txid'], nout=0, blocking=True) + support = await self.support_create(stream, comment="anonymously great!") + self.assertEqual(support['outputs'][0]['value']['comment'], "anonymously great!") + r, = await self.txo_list(type='support', is_not_spent=True) + self.assertEqual(r['txid'], support['txid']) + self.assertEqual(r['value']['comment'], "anonymously great!") async def test_txo_list_resolve_supports(self): channel = self.get_claim_id(await self.channel_create('@identity'))