-
Notifications
You must be signed in to change notification settings - Fork 869
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
fix: onProgramAccountChange()
and onAccountChange()
now accept an encoding
#2861
fix: onProgramAccountChange()
and onAccountChange()
now accept an encoding
#2861
Conversation
|
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @steveluscher and the rest of your teammates on Graphite |
e6a5f7e
to
cbb3595
Compare
onAccountChange( | ||
publicKey: PublicKey, | ||
callback: AccountChangeCallback, | ||
commitment?: Commitment, | ||
): ClientSubscriptionId; |
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.
Existing method signature for backward compatibility.
onProgramAccountChange( | ||
programId: PublicKey, | ||
callback: ProgramAccountChangeCallback, | ||
commitment?: Commitment, | ||
filters?: GetProgramAccountsFilter[], | ||
): ClientSubscriptionId; |
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.
Existing method signature for backward compatibility.
config | ||
? config | ||
: maybeFilters | ||
? {filters: maybeFilters} | ||
: undefined /* extra */, |
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.
According to TypeScript, you either have a config, or you have commitment/filters, but never both.
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.
Little gross, but wfm.
cbb3595
to
d91a9af
Compare
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.
commitment?: Commitment; | ||
/** | ||
* Encoding format for Account data | ||
* - `base58` is slow. |
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.
I laughed at this, until I realized it's actually what's in the docs. 😅
config | ||
? config | ||
: maybeFilters | ||
? {filters: maybeFilters} | ||
: undefined /* extra */, |
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.
Little gross, but wfm.
Because there has been no activity on this PR for 14 days since it was merged, it has been automatically locked. Please open a new issue if it requires a follow up. |
Fixes #2725.