Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add versioned transaction methods to adapter interface #558
Add versioned transaction methods to adapter interface #558
Changes from 11 commits
5269c16
5ce4a3c
1529a5b
9ce97d6
d5e9fd8
6762d53
8098e7b
f2f13b2
f395866
af2257a
f731ea1
98ca6e8
aed4d7a
793b161
4b9132b
eb4011d
20bc5ed
04a6205
80d1d48
f2d50d6
46ef36c
a46ff71
43cde10
6505731
aa1e381
1e8b5ee
87b3943
6cc7d90
4369e40
8819905
bde0bb2
c2d14da
a801e06
ebe79ec
1c0b0f6
6266bd8
6533919
18878eb
ddf04df
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Okay, I think these types are very reasonable now. By inferring
SupportedTransactionVersions
from the actual implementer, and making the methods return the type they were called with, existing code that expectssignTransaction(transaction: Transaction): Promise<Transaction>
will just work.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.
This type is still not perfect in the sense that a dev will see
(transaction: Transaction | VersionedTransaction)
as the parameter type, so they have to know to check the adapter forsupportedTransactionVersions
. But it is functional and nonbreaking, because it will always be expected to return whichever type it was called with.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.
That seems totally fine to me