Skip to content

OKX Wallet Extension caused runtime error #39

Open
@jessupjn

Description

@jessupjn

Steps to reproduce:

  • Install OKX Wallet Extension
  • Run an app that uses Solana wallet adapter (you dont even have to open the OKX extension)

The error:

react-dom.development.js:22839 Uncaught TypeError: off is not a function
    at StandardWalletAdapter.destroy (adapter.ts:125:13)
    at useStandardWalletAdapters.ts:40:73
    at Array.forEach (<anonymous>)
    at useStandardWalletAdapters.ts:40:44
    at safelyCallDestroy (react-dom.development.js:22932:5)
    at commitHookEffectListUnmount (react-dom.development.js:23100:11)
    at invokePassiveEffectUnmountInDEV (react-dom.development.js:25207:13)
    at invokeEffectsInDev (react-dom.development.js:27351:11)

Its coming from this method:

destroy(): void {
    this.#account = null;
    this.#publicKey = null;
    this.#connecting = false;
    this.#disconnecting = false;

    const off = this.#off;
    if (off) {
        this.#off = null;
        off();
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions