Skip to content

Commit

Permalink
Merge pull request #50 from Chia-Network/2.1.1_update
Browse files Browse the repository at this point in the history
update to 2.1.1
  • Loading branch information
geoffwalmsley authored Oct 16, 2023
2 parents 89400cb + 64884aa commit a2d0a9f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions chianft/util/mint.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from chia.util.ints import uint64
from chia.wallet.singleton import SINGLETON_LAUNCHER_PUZZLE_HASH
from chia.wallet.util.wallet_types import WalletType
from chia.wallet.util.tx_config import DEFAULT_COIN_SELECTION_CONFIG, DEFAULT_TX_CONFIG


class Minter:
Expand Down Expand Up @@ -74,7 +75,7 @@ async def get_wallet_ids(

async def get_funding_coin(self, amount: int) -> Coin:
coins = await self.wallet_client.select_coins(
amount=amount, wallet_id=self.xch_wallet_id
amount=amount, wallet_id=self.xch_wallet_id, coin_selection_config=DEFAULT_COIN_SELECTION_CONFIG
)
if len(coins) > 1:
raise ValueError(
Expand Down Expand Up @@ -146,6 +147,7 @@ async def create_spend_bundles(
did_coin=did_coin_dict,
did_lineage_parent=did_lineage_parent,
mint_from_did=mint_from_did,
tx_config=DEFAULT_TX_CONFIG,
)
if not resp["success"]:
raise ValueError(
Expand Down Expand Up @@ -228,6 +230,7 @@ async def add_fee_to_spend(
],
coins=[fee_coin],
fee=uint64(total_fee),
tx_config=DEFAULT_TX_CONFIG,
)
assert fee_tx.spend_bundle is not None
spend_with_fee = SpendBundle.aggregate([fee_tx.spend_bundle, spend])
Expand Down Expand Up @@ -407,11 +410,12 @@ async def submit_spend_bundles(
estimated_max_fee = (
len(spend_bundles) * self.spend_cost(spend_bundles[0]) * 5
)
csc = DEFAULT_COIN_SELECTION_CONFIG.override(excluded_coin_ids=[funding_coin.name()])
fee_coin = (
await self.wallet_client.select_coins(
amount=estimated_max_fee,
wallet_id=self.xch_wallet_id,
excluded_coins=[funding_coin],
coin_selection_config=csc,
)
)[0]

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
long_description = fh.read()

dependencies = [
"chia-blockchain==2.0.0",
"chia-blockchain==2.1.1",
]

dev_dependencies = [
Expand Down

0 comments on commit a2d0a9f

Please sign in to comment.