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

feat(types): Make DepositPreauth easier to guard #2355

Closed
wants to merge 3 commits into from

Conversation

ckniffen
Copy link
Collaborator

High Level Overview of Change

DepositPreauth transaction is now a union type to correctly model that the Authorize and Unauthorize fields cannot appear at the same time.

Type of Change

  • New feature (non-breaking change which adds functionality)
  • Documentation Updates

`DepositPreauth` transaction is now a union type to correctly model that
the `Authorize` and `Unauthorize` fields cannot appear at the same time.
@@ -13,6 +13,9 @@ Subscribe to [the **xrpl-announce** mailing list](https://groups.google.com/g/xr
* Add type for NFToken object that is stored on a `NFTokenPage`.
* Add type for `account_info`'s `account_flags` property.

### Changed
* `DeposityPreauth` has a new type definition that will not allow `Authorize` and `Unauthorize` on the same instance. This provides better guard support.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
* `DeposityPreauth` has a new type definition that will not allow `Authorize` and `Unauthorize` on the same instance. This provides better guard support.
* `DepositPreauth` has a new type definition that will not allow `Authorize` and `Unauthorize` on the same instance. This provides better guard support.

Comment on lines +15 to +16
DepositPreauthWithAuthorize,
DepositPreauthWithUnauthorize,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do these two need to be exported?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes if people want to type guard.

@ckniffen
Copy link
Collaborator Author

This makes the documentation output look goofy. Closing for now.

@ckniffen ckniffen closed this Jul 25, 2023
@ckniffen ckniffen deleted the feature/deposit-preauth-improved branch July 26, 2023 23:07
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