-
Notifications
You must be signed in to change notification settings - Fork 512
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
Conversation
`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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* `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. |
DepositPreauthWithAuthorize, | ||
DepositPreauthWithUnauthorize, |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
This makes the documentation output look goofy. Closing for now. |
High Level Overview of Change
DepositPreauth
transaction is now a union type to correctly model that theAuthorize
andUnauthorize
fields cannot appear at the same time.Type of Change