From c91c44ab590c045f907fd55daaedf30f6ca29cd9 Mon Sep 17 00:00:00 2001 From: Matthew Callens Date: Wed, 26 Jan 2022 13:23:35 -0500 Subject: [PATCH 1/3] fix class node wallet type declaration --- ts/src/index.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ts/src/index.ts b/ts/src/index.ts index f359ef86f6..cb69d65238 100644 --- a/ts/src/index.ts +++ b/ts/src/index.ts @@ -1,3 +1,6 @@ +import { Keypair, PublicKey, Transaction } from "@solana/web3.js"; +import type { Wallet as ProviderWallet } from "./provider"; +import NodeWallet from "./nodewallet"; import { isBrowser } from "./utils/common.js"; export { default as BN } from "bn.js"; @@ -12,7 +15,7 @@ export * from "./program/index.js"; export * from "./spl/index.js"; export declare const workspace: any; -export declare const Wallet: import("./nodewallet").default; +export declare class Wallet extends NodeWallet {} if (!isBrowser) { exports.workspace = require("./workspace.js").default; From 440824ebdb377aa9db55c431b2718e2403534c00 Mon Sep 17 00:00:00 2001 From: Matthew Callens Date: Wed, 26 Jan 2022 13:49:42 -0500 Subject: [PATCH 2/3] update changelog with PR number --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 070c67392b..83e3a9f18a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,10 @@ incremented for features. ## [Unreleased] +### Fixes + +* ts: Fix the root type declaration of the `Wallet` / `NodeWallet` class. ([#1363](https://github.com/project-serum/anchor/pull/1363)) + ### Features * lang: Add `seeds::program` constraint for specifying which program_id to use when deriving PDAs.([#1197](https://github.com/project-serum/anchor/pull/1197)) From 8214fc8bc6673ee481b17c10df4f311459330e8c Mon Sep 17 00:00:00 2001 From: Matthew Callens Date: Wed, 26 Jan 2022 13:51:17 -0500 Subject: [PATCH 3/3] remove unused index imports --- ts/src/index.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/ts/src/index.ts b/ts/src/index.ts index cb69d65238..818ad60d64 100644 --- a/ts/src/index.ts +++ b/ts/src/index.ts @@ -1,5 +1,3 @@ -import { Keypair, PublicKey, Transaction } from "@solana/web3.js"; -import type { Wallet as ProviderWallet } from "./provider"; import NodeWallet from "./nodewallet"; import { isBrowser } from "./utils/common.js";