-
Notifications
You must be signed in to change notification settings - Fork 500
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
Refactor Transaction
type to better reflect its true usage
#2519
Labels
Comments
ckniffen
added a commit
that referenced
this issue
Oct 23, 2023
BREAKING CHANGE: `Transaction` type has been redefined to include all transactions and `SubmittableTransaction` was created to define the old value. The following functions which only handle transactions to be submitted now use `SubmittableTransaction`: * `Client.autofill` * `Client.submit` * `Client.submitAndWait` * `Client.prepareTransaction` * `getSignedTx` * `isAccountDelete` Closes #2519
5 tasks
ckniffen
added a commit
that referenced
this issue
Oct 25, 2023
BREAKING CHANGE: `Transaction` type has been redefined to include all transactions and `SubmittableTransaction` was created to define the old value. The following functions which only handle transactions to be submitted now use `SubmittableTransaction`: * `Client.autofill` * `Client.submit` * `Client.submitAndWait` * `Client.prepareTransaction` * `getSignedTx` * `isAccountDelete` Closes #2519
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Before #2515 pseudo transactions were not typed to be returned by
tx
orledger
commands. The type used by those wasTransaction
. In order to not be a breaking change a new type ofPseudoTransaction
was added andTransaction | PseudoTransaction
was used everywhereTransaction
was used but aPseudoTransaction
always could have come back.A cleaner implementation would be to create a new type of
SubmittableTransaction
which equals the current value ofTransaction
.Transaction
would then be updated to equalSubmittableTransaction | PseudoTransaction
. TheSubmittableTransaction
can be used withclient.submit
.Related to #2515 (comment) and #2515 (review)
The text was updated successfully, but these errors were encountered: