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

correct wallet rpc api for get spendable coins with specified excluded coins #18768

Merged
merged 1 commit into from
Oct 28, 2024

Conversation

altendky
Copy link
Contributor

@altendky altendky commented Oct 25, 2024

Purpose:

found while exploring more hinting with Chia-Network/chia_rs#772

note that this is related to the older object field name that we back-compat support on the api end

Current Behavior:

New Behavior:

Testing Notes:

@altendky altendky requested a review from a team as a code owner October 25, 2024 13:19
@altendky altendky added the Fixed Required label for PR that categorizes merge commit message as "Fixed" for changelog label Oct 25, 2024
@altendky altendky changed the title correct wallet rpc api for get spendable coins with specified excludied coins correct wallet rpc api for get spendable coins with specified excluded coins Oct 25, 2024
Copy link
Contributor

File Coverage Missing Lines
chia/rpc/wallet_rpc_api.py 0.0% lines 1579
Total Missing Coverage
Unknown Unknown 0%

Copy link
Contributor

@Quexington Quexington left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait sorry, does this work? If excluded_coins_input.values is dict[str, Any] then Coin.from_json_dict isn't going to ever match it right?

@altendky
Copy link
Contributor Author

It's not tested, I just know the hinting here.

@clvm_streamable
@dataclass(frozen=True)
class Coin(Streamable):
parent_coin_id: bytes32
puzzle_hash: bytes32
amount: uint64

Does the @clvm_streamable bit make .from_json_dict() not take the dict you would otherwise expect?

@altendky
Copy link
Contributor Author

This situation was pointed out when I tried the now merged Chia-Network/chia_rs#772 in blockchain.

Copy link
Contributor

@Quexington Quexington left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nvm I'm dumb

@altendky altendky requested a review from emlowe October 28, 2024 19:52
@pmaslana pmaslana merged commit 6dee78a into main Oct 28, 2024
359 of 361 checks passed
@pmaslana pmaslana deleted the altendky-patch-40 branch October 28, 2024 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed Required label for PR that categorizes merge commit message as "Fixed" for changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants