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

Move usage of RpcAccountImport to exporter system #5034

Merged
merged 8 commits into from
Jun 12, 2024

Conversation

NullSoldier
Copy link
Contributor

Summary

This old type was only used by the RPC system, but now is moving into the JSON encoder to show that it's only used by the JSON encoding system to export an AccountImport into JSON.

Testing Plan

Documentation

Does this change require any updates to the Iron Fish Docs (ex. the RPC API
Reference
)? If yes, link a
related documentation pull request for the website.

[ ] Yes

Breaking Change

Is this a breaking change? If yes, add notes below on why this is breaking and label it with breaking-change-rpc or breaking-change-sdk.

[ ] Yes

@NullSoldier NullSoldier requested a review from a team as a code owner June 11, 2024 01:41
proofAuthorizingKey: string | null
}

const AccountEncodedJSONSchema: yup.ObjectSchema<AccountEncodedJSON> = yup
Copy link
Member

Choose a reason for hiding this comment

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

This schema doesn't quite match the type AccountEncodedJSON, I'm guessing that's where some of the test failures are from

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Interestingly enough, I didn't actually change this. This is the old schema from RpcAccountImport. That means this is now catching failures that always existed now that we're actually checking the schema on import. That's a good thing. I'll investigate and make the schema match!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is fixed now in 135043f

Copy link
Member

@dguenther dguenther left a comment

Choose a reason for hiding this comment

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

Once tests pass this looks good to me!

@NullSoldier NullSoldier force-pushed the jason/rpc-account-import branch from 950d68e to 7839a18 Compare June 11, 2024 19:28
This old type was only used by the RPC system, but now is moving into
the JSON encoder to show that it's only used by the JSON encoding system
to export an AccountImport into JSON.
This must throw DecodeFailed or else it will crash if decoding using
this decoder failed.
The encoder is deprecated because you cannot encode accounts anymore
using it. This test was still trying to encode a new account import
format with an old deprecated encoder.
@NullSoldier NullSoldier force-pushed the jason/rpc-account-import branch from 7839a18 to 994ff31 Compare June 11, 2024 19:33
@NullSoldier NullSoldier force-pushed the jason/rpc-account-import branch from af6b027 to 32d3b49 Compare June 12, 2024 00:15
@NullSoldier NullSoldier merged commit c0f9736 into staging Jun 12, 2024
9 checks passed
@NullSoldier NullSoldier deleted the jason/rpc-account-import branch June 12, 2024 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants