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

enforces enums in wallet transaction rpc schemas #3680

Merged
merged 1 commit into from
Mar 22, 2023

Conversation

hughy
Copy link
Contributor

@hughy hughy commented Mar 22, 2023

Summary

the getAccountTransaction and getAccountTransactions RPC endpoints return a transaction status and a transaction type with each transaction in a response. each of these fields has a set of valid values that we define with an enum.

the response schemas, however, only specify that 'status' and 'type' are strings.

updates the response schemas to enforce that transaction status is one of the TransactionStatus enum values and that transaction type is one of the TransactionType enum values.

Proposed on Discord: https://discord.com/channels/771503434028941353/831945060777852998/1088097724907409468

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.

[X] Yes

Breaking Change

Is this a breaking change? If yes, add notes below on why this is breaking and
what additional work is required, if any.

[ ] Yes

the getAccountTransaction and getAccountTransactions RPC endpoints return a
transaction status and a transaction type with each transaction in a response.
each of these fields has a set of valid values that we define with an enum.

the response schemas, however, only specify that 'status' and 'type' are
strings.

updates the response schemas to enforce that transaction status is one of the
TransactionStatus enum values and that transaction type is one of the
TransactionType enum values.
@hughy hughy requested a review from a team as a code owner March 22, 2023 15:45
@hughy hughy merged commit a38b28e into staging Mar 22, 2023
@hughy hughy deleted the fix/transaction-rpc-enums branch March 22, 2023 16:01
holahula pushed a commit that referenced this pull request Mar 23, 2023
the getAccountTransaction and getAccountTransactions RPC endpoints return a
transaction status and a transaction type with each transaction in a response.
each of these fields has a set of valid values that we define with an enum.

the response schemas, however, only specify that 'status' and 'type' are
strings.

updates the response schemas to enforce that transaction status is one of the
TransactionStatus enum values and that transaction type is one of the
TransactionType enum values.
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.

3 participants