Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update to 2.1.1 #50

Merged
merged 1 commit into from
Oct 16, 2023
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
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