Skip to content

Commit

Permalink
fix breaking change on null or undefined wallet (#2303)
Browse files Browse the repository at this point in the history
Co-authored-by: henrye <henry@notanemail>
  • Loading branch information
Henry-E and henrye committed Dec 6, 2022
1 parent 11af9a6 commit 1bb1969
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
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

1 comment on commit 1bb1969

@vercel
Copy link

@vercel vercel bot commented on 1bb1969 Dec 6, 2022

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

anchor-docs – ./

anchor-docs-200ms.vercel.app
anchor-docs-git-master-200ms.vercel.app
www.anchor-lang.com
anchor-lang.com

Please sign in to comment.