File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
ts/packages/anchor/src/program Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ The minor version will be incremented upon a breaking change and the patch versi
11
11
## [ Unreleased]
12
12
13
13
### Features
14
+ - ts: Make ` Provider ` require publicKey instead of wallet in accounts resolver ([ #3613 ] ( https://github.com/coral-xyz/anchor/pull/3613 ) )
14
15
15
16
### Fixes
16
17
Original file line number Diff line number Diff line change @@ -279,12 +279,12 @@ export class AccountsResolver<IDL extends Idl> {
279
279
if ( ( account . signer || account . address ) && ! this . get ( [ ...path , name ] ) ) {
280
280
// Default signers to the provider
281
281
if ( account . signer ) {
282
- if ( ! this . _provider . wallet ) {
282
+ if ( ! this . _provider . publicKey ) {
283
283
throw new Error (
284
- "This function requires the `Provider` interface implementor to have a `wallet ` field."
284
+ "This function requires the `Provider` interface implementor to have a `publicKey ` field."
285
285
) ;
286
286
}
287
- this . set ( [ ...path , name ] , this . _provider . wallet . publicKey ) ;
287
+ this . set ( [ ...path , name ] , this . _provider . publicKey ) ;
288
288
}
289
289
290
290
// Set based on `address` field
You can’t perform that action at this time.
0 commit comments