diff --git a/cats/cats.py b/cats/cats.py index bba85cd..9bef4bb 100644 --- a/cats/cats.py +++ b/cats/cats.py @@ -24,7 +24,7 @@ from chia.wallet.transaction_record import TransactionRecord from chia.wallet.util.tx_config import DEFAULT_TX_CONFIG from chia.wallet.vc_wallet.cr_cat_drivers import ProofsChecker, construct_cr_layer -from chia.wallet.wallet_request_types import PushTX +from chia.wallet.wallet_request_types import Addition, CreateSignedTransaction, PushTX from chia.wallet.wallet_rpc_client import WalletRpcClient from chia.wallet.wallet_spend_bundle import WalletSpendBundle from chia_rs import AugSchemeMPL, G2Element @@ -58,9 +58,8 @@ async def get_signed_tx( if wallet_client is None: raise ValueError("Error getting wallet client. Make sure wallet is running.") signed_tx = await wallet_client.create_signed_transactions( - [{"puzzle_hash": ph, "amount": amt}], - DEFAULT_TX_CONFIG, - fee=fee, # TODO: no default tx config + CreateSignedTransaction(additions=[Addition(amount=amt, puzzle_hash=ph)], fee=fee), + tx_config=DEFAULT_TX_CONFIG, ) return signed_tx.signed_tx diff --git a/cats/unwind_the_bag.py b/cats/unwind_the_bag.py index f336de8..a2fc5db 100644 --- a/cats/unwind_the_bag.py +++ b/cats/unwind_the_bag.py @@ -24,7 +24,14 @@ from chia.wallet.lineage_proof import LineageProof from chia.wallet.uncurried_puzzle import uncurry_puzzle from chia.wallet.util.tx_config import DEFAULT_COIN_SELECTION_CONFIG, DEFAULT_TX_CONFIG -from chia.wallet.wallet_request_types import GetNextAddress, LogIn, PushTX, SelectCoins +from chia.wallet.wallet_request_types import ( + Addition, + CreateSignedTransaction, + GetNextAddress, + LogIn, + PushTX, + SelectCoins, +) from chia.wallet.wallet_rpc_client import WalletRpcClient from chia.wallet.wallet_spend_bundle import WalletSpendBundle from chia_rs import CoinSpend, G2Element @@ -303,9 +310,11 @@ async def app( # Create signed coin spends and change for fees fees_tx = await wallet_client.create_signed_transactions( - [{"amount": change_amount, "puzzle_hash": change_ph}], - coins=fee_coins, - fee=uint64(unwind_fee), + CreateSignedTransaction( + additions=[Addition(amount=uint64(change_amount), puzzle_hash=change_ph)], + coins=fee_coins, + fee=uint64(unwind_fee), + ), extra_conditions=(*cat_announcements,), tx_config=DEFAULT_TX_CONFIG, ) @@ -420,9 +429,11 @@ async def app( # Create signed coin spends and change for fees fees_tx = await wallet_client.create_signed_transactions( - [{"amount": change_amount, "puzzle_hash": change_ph}], - coins=fee_coins, - fee=uint64(spend_bundle_fee), + CreateSignedTransaction( + additions=[Addition(amount=uint64(change_amount), puzzle_hash=change_ph)], + coins=fee_coins, + fee=uint64(spend_bundle_fee), + ), extra_conditions=(*cat_announcements,), tx_config=DEFAULT_TX_CONFIG, ) diff --git a/setup.py b/setup.py index 6ccf671..d1c7fd3 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ long_description = fh.read() dependencies = [ - "chia-blockchain==2.5.7", + "chia-blockchain==2.6.0", ] dev_dependencies = [