Skip to content

Commit

Permalink
fix #16456
Browse files Browse the repository at this point in the history
  • Loading branch information
geoffwalmsley committed Oct 3, 2023
1 parent 4ec5c0d commit 0361ff5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
12 changes: 5 additions & 7 deletions chia/wallet/cat_wallet/dao_cat_wallet.py
Original file line number Diff line number Diff line change
Expand Up @@ -456,11 +456,9 @@ async def exit_vote_state(
spend_bundle: SpendBundle = await self.wallet_state_manager.sign_transaction(cat_spend_bundle.coin_spends)

if fee > 0: # pragma: no cover
dao_wallet = self.wallet_state_manager.wallets[self.dao_cat_info.dao_wallet_id]
chia_tx = await dao_wallet.create_tandem_xch_tx(
chia_tx = await self.standard_wallet.create_tandem_xch_tx(
fee,
tx_config,
extra_conditions=extra_conditions,
)
assert chia_tx.spend_bundle is not None
full_spend = SpendBundle.aggregate([spend_bundle, chia_tx.spend_bundle])
Expand Down Expand Up @@ -501,7 +499,9 @@ async def exit_vote_state(
await self.save_info(dao_cat_info)
return record

async def remove_active_proposal(self, proposal_id_list: List[bytes32], fee: uint64 = uint64(0)) -> SpendBundle:
async def remove_active_proposal(
self, proposal_id_list: List[bytes32], tx_config: TXConfig, fee: uint64 = uint64(0)
) -> SpendBundle:
locked_coins: List[Tuple[LockedCoinInfo, List[bytes32]]] = []
for lci in self.dao_cat_info.locked_coins:
my_finished_proposals = []
Expand All @@ -513,7 +513,6 @@ async def remove_active_proposal(self, proposal_id_list: List[bytes32], fee: uin
extra_delta, limitations_solution = 0, Program.to([])
limitations_program_reveal = Program.to([])
spendable_cat_list = []
dao_wallet = self.wallet_state_manager.wallets[self.dao_cat_info.dao_wallet_id]

for lci_proposals_tuple in locked_coins:
proposal_innerpuzhashes = []
Expand Down Expand Up @@ -563,8 +562,7 @@ async def remove_active_proposal(self, proposal_id_list: List[bytes32], fee: uin
spend_bundle = await self.wallet_state_manager.sign_transaction(cat_spend_bundle.coin_spends)

if fee > 0: # pragma: no cover
dao_wallet = self.wallet_state_manager.wallets[self.dao_cat_info.dao_wallet_id]
chia_tx = await dao_wallet.create_tandem_xch_tx(fee)
chia_tx = await self.standard_wallet.create_tandem_xch_tx(fee, tx_config=tx_config)
assert chia_tx.spend_bundle is not None
full_spend = SpendBundle.aggregate([spend_bundle, chia_tx.spend_bundle])
else:
Expand Down
2 changes: 1 addition & 1 deletion chia/wallet/dao_wallet/dao_wallet.py
Original file line number Diff line number Diff line change
Expand Up @@ -1614,7 +1614,7 @@ async def free_coins_from_finished_proposals(
prop_sb = SpendBundle([cs], AugSchemeMPL.aggregate([]))
spends.append(prop_sb)

sb = await dao_cat_wallet.remove_active_proposal(closed_list)
sb = await dao_cat_wallet.remove_active_proposal(closed_list, tx_config=tx_config)
spends.append(sb)

if not spends: # pragma: no cover
Expand Down

0 comments on commit 0361ff5

Please sign in to comment.