wallet-standard icon indicating copy to clipboard operation
wallet-standard copied to clipboard

OKX Wallet Extension caused runtime error

Open jessupjn opened this issue 1 year ago • 0 comments

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();
    }
}

jessupjn avatar Dec 12 '23 23:12 jessupjn