Skip to content
Merged
Show file tree
Hide file tree
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
7 changes: 3 additions & 4 deletions cats/cats.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
25 changes: 18 additions & 7 deletions cats/unwind_the_bag.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
)
Expand Down Expand Up @@ -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,
)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
long_description = fh.read()

dependencies = [
"chia-blockchain==2.5.7",
"chia-blockchain==2.6.0",
]

dev_dependencies = [
Expand Down
Loading