Skip to content

Conversation

@steveluscher
Copy link
Contributor

Fixes #2725.

@changeset-bot
Copy link

changeset-bot bot commented Jun 26, 2024

⚠️ No Changeset found

Latest commit: d91a9af

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @steveluscher and the rest of your teammates on Graphite Graphite

@steveluscher steveluscher force-pushed the 06-26-fix_onprogramaccountchange_and_onaccountchange_now_accept_an_encoding branch from e6a5f7e to cbb3595 Compare June 26, 2024 21:45
Comment on lines 6380 to +6384
onAccountChange(
publicKey: PublicKey,
callback: AccountChangeCallback,
commitment?: Commitment,
): ClientSubscriptionId;
Copy link
Contributor Author

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.

Comment on lines 6457 to +6461
onProgramAccountChange(
programId: PublicKey,
callback: ProgramAccountChangeCallback,
commitment?: Commitment,
filters?: GetProgramAccountsFilter[],
): ClientSubscriptionId;
Copy link
Contributor Author

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.

Comment on lines +6476 to +6479
config
? config
: maybeFilters
? {filters: maybeFilters}
: undefined /* extra */,
Copy link
Contributor Author

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Little gross, but wfm.

@steveluscher steveluscher requested a review from buffalojoec June 26, 2024 21:47
@steveluscher steveluscher force-pushed the 06-26-fix_onprogramaccountchange_and_onaccountchange_now_accept_an_encoding branch from cbb3595 to d91a9af Compare June 26, 2024 21:57
Copy link
Contributor

@buffalojoec buffalojoec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

commitment?: Commitment;
/**
* Encoding format for Account data
* - `base58` is slow.
Copy link
Contributor

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. 😅

Comment on lines +6476 to +6479
config
? config
: maybeFilters
? {filters: maybeFilters}
: undefined /* extra */,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Little gross, but wfm.

@steveluscher steveluscher merged commit f9b0d6d into master Jun 27, 2024
@steveluscher steveluscher deleted the 06-26-fix_onprogramaccountchange_and_onaccountchange_now_accept_an_encoding branch June 27, 2024 14:32
@github-actions
Copy link
Contributor

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WSS method onAccountChange doesn't support custom encoding

3 participants