Skip to content
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

Fixing breaking change where null or undefined wallet throws an error #2303

Merged
merged 1 commit into from Dec 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -41,6 +41,7 @@ The minor version will be incremented upon a breaking change and the patch versi
- ts: Update seeds inference to allow nested user defined structs within the seeds ([#2198](https://github.com/coral-xyz/anchor/pull/2198))
- event: Fix multiple event listeners with the same name. ([#2165](https://github.com/coral-xyz/anchor/pull/2165))
- lang: Prevent the payer account from being initialized as a program account. ([#2284](https://github.com/coral-xyz/anchor/pull/2284))
- ts: Fixing breaking change where null or undefined wallet throws an error. ([#2303](https://github.com/coral-xyz/anchor/pull/2303))

### Breaking

Expand Down
2 changes: 1 addition & 1 deletion ts/packages/anchor/src/provider.ts
Expand Up @@ -60,7 +60,7 @@ export class AnchorProvider implements Provider {
readonly wallet: Wallet,
readonly opts: ConfirmOptions
) {
this.publicKey = wallet.publicKey;
this.publicKey = wallet?.publicKey;
}

static defaultOptions(): ConfirmOptions {
Expand Down