js-stellar-base icon indicating copy to clipboard operation
js-stellar-base copied to clipboard

Missing types in OperationType

Open aristidesstaffieri opened this issue 1 year ago • 0 comments

Describe the bug Missing revoke sponsorship types in OperationType

What version are you on? @stellar/[email protected]

To Reproduce Go to lab an build a "Revoke Sponsorship" op. Select any of the options and fill out the fields. Inspect the transaction and note that operation.type !== 'revokeSponsorship' but instead has a type specific to the type of revocation(revokeTrustlineSponsorship for example).

Expected behavior The OperationType type would have op types matching the Operation type, which would allow clients downstream to switch over operation.type which is an Operation.BaseOperation<T extends OperationType = OperationType>.type.

Additional context Here is where I step around this in a client - https://github.com/stellar/freighter/pull/1096/files#diff-e0ff0af943168c2545ebfe644635fa24c65c454685e591e279f3e410ab66fa23R644

aristidesstaffieri avatar Feb 05 '24 18:02 aristidesstaffieri