|
32 | 32 | calculate_synthetic_offset,
|
33 | 33 | DEFAULT_HIDDEN_PUZZLE_HASH,
|
34 | 34 | )
|
| 35 | +from chia.wallet.transaction_record import TransactionRecord |
35 | 36 |
|
36 | 37 | from cic import __version__
|
37 | 38 | from cic.cli.record_types import SingletonRecord, ACHRecord, RekeyRecord
|
@@ -876,17 +877,20 @@ async def do_command():
|
876 | 877 | print("Cannot find a way to link fee to this transaction. Please specify 0 fee and try again.")
|
877 | 878 | return
|
878 | 879 | else:
|
879 |
| - spends.append( |
880 |
| - ( |
881 |
| - await wallet_client.create_signed_transaction( |
882 |
| - [ |
883 |
| - {"puzzle_hash": bytes32([0] * 32), "amount": 0} |
884 |
| - ], # This is dust but the RPC requires it |
885 |
| - fee=uint64(fee), |
886 |
| - coin_announcements=[fee_announcement], |
887 |
| - ) |
888 |
| - ).spend_bundle |
| 880 | + txs: List[TransactionRecord] = await wallet_client.create_signed_transactions( |
| 881 | + additions=[ |
| 882 | + {"puzzle_hash": bytes32([0] * 32), "amount": 0} |
| 883 | + ], # This is dust but the RPC requires it, |
| 884 | + fee=uint64(fee), |
| 885 | + coin_announcements=[fee_announcement], |
| 886 | + min_coin_amount=uint64(0), |
| 887 | + max_coin_amount=uint64(2 ** 64 - 1), |
889 | 888 | )
|
| 889 | + if len(txs) == 0: |
| 890 | + raise ValueError("`create_signed_transaction` returned empty list!") |
| 891 | + |
| 892 | + tx = txs[0] |
| 893 | + spends.append(tx.spend_bundle) |
890 | 894 |
|
891 | 895 | result = await node_client.push_tx(SpendBundle.aggregate(spends))
|
892 | 896 | print(result)
|
|
0 commit comments