diff --git a/packages/hdwallet-metamask/src/metamask.ts b/packages/hdwallet-metamask/src/metamask.ts index c097c9481..272438a3a 100644 --- a/packages/hdwallet-metamask/src/metamask.ts +++ b/packages/hdwallet-metamask/src/metamask.ts @@ -79,6 +79,7 @@ export class MetaMaskHDWallet implements core.HDWallet, core.ETHWallet { public initialize(): never; public initialize(provider: unknown): Promise; public async initialize(provider?: unknown): Promise { + if (this.provider) return; if (!provider) throw new Error("provider is required"); this.provider = provider; }