Skip to content
Closed
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
6 changes: 3 additions & 3 deletions chia/cmds/wallet_funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ async def get_unit_name_for_wallet_id(
async def get_transaction(
*, root_path: pathlib.Path, wallet_rpc_port: Optional[int], fingerprint: Optional[int], tx_id: str, verbose: int
) -> None:
async with get_wallet_client(root_path, wallet_rpc_port, fingerprint) as (wallet_client, fingerprint, config):
async with get_wallet_client(root_path, wallet_rpc_port, fingerprint) as (wallet_client, _, config):
transaction_id = bytes32.from_hexstr(tx_id)
address_prefix = selected_network_address_prefix(config)
tx: TransactionRecord = await wallet_client.get_transaction(transaction_id=transaction_id)
Expand Down Expand Up @@ -1865,7 +1865,7 @@ async def approve_r_cats(
push: bool,
condition_valid_times: ConditionValidTimes,
) -> list[TransactionRecord]:
async with get_wallet_client(root_path, wallet_rpc_port, fingerprint) as (wallet_client, fingerprint, config):
async with get_wallet_client(root_path, wallet_rpc_port, fingerprint) as (wallet_client, fp, config):
if wallet_client is None:
return
txs = await wallet_client.crcat_approve_pending(
Expand All @@ -1876,7 +1876,7 @@ async def approve_r_cats(
min_coin_amount=min_coin_amount,
max_coin_amount=max_coin_amount,
reuse_puzhash=reuse,
).to_tx_config(units["cat"], config, fingerprint),
).to_tx_config(units["cat"], config, fp),
push=push,
timelock_info=condition_valid_times,
)
Expand Down
12 changes: 6 additions & 6 deletions chia/data_layer/data_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -1172,8 +1172,8 @@ async def update_ancestor_hashes_on_insert(
)

if status == Status.COMMITTED:
for left_hash, right_hash, store_id in insert_ancestors_cache:
await self._insert_ancestor_table(left_hash, right_hash, store_id, new_generation)
for left_hash, right_hash, cache_store_id in insert_ancestors_cache:
await self._insert_ancestor_table(left_hash, right_hash, cache_store_id, new_generation)

return new_root

Expand Down Expand Up @@ -1329,8 +1329,8 @@ async def delete(
generation=new_generation,
)
if status == Status.COMMITTED:
for left_hash, right_hash, store_id in insert_ancestors_cache:
await self._insert_ancestor_table(left_hash, right_hash, store_id, new_generation)
for left_hash, right_hash, cache_store_id in insert_ancestors_cache:
await self._insert_ancestor_table(left_hash, right_hash, cache_store_id, new_generation)

return new_root

Expand Down Expand Up @@ -1428,8 +1428,8 @@ async def clean_node_table(self, writer: Optional[aiosqlite.Connection] = None)
"""
params = {"pending_status": Status.PENDING.value, "pending_batch_status": Status.PENDING_BATCH.value}
if writer is None:
async with self.db_wrapper.writer(foreign_key_enforcement_enabled=False) as writer:
await writer.execute(query, params)
async with self.db_wrapper.writer(foreign_key_enforcement_enabled=False) as sub_writer:
await sub_writer.execute(query, params)
else:
await writer.execute(query, params)

Expand Down
6 changes: 3 additions & 3 deletions chia/wallet/nft_wallet/nft_wallet.py
Original file line number Diff line number Diff line change
Expand Up @@ -550,9 +550,9 @@ async def create_from_puzzle_info(
name: Optional[str] = None,
) -> Any:
# Off the bat we don't support multiple profile but when we do this will have to change
for wallet in wallet_state_manager.wallets.values():
if wallet.type() == WalletType.NFT.value:
return wallet
for wsm_wallet in wallet_state_manager.wallets.values():
if wsm_wallet.type() == WalletType.NFT.value:
return wsm_wallet

# TODO: These are not the arguments to this function yet but they will be
return await cls.create_new_nft_wallet(
Expand Down
1 change: 0 additions & 1 deletion ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ ignore = [
# Should probably fix these
"PLR6301", # no-self-use
"PLR2004", # magic-value-comparison
"PLR1704", # redefined-argument-from-local
"PLR5501", # collapsible-else-if

# Pylint warning
Expand Down
Loading