anza-xyz / wallet-standard

Solana extensions to the Wallet Standard.
Apache License 2.0
79 stars 42 forks source link

OKX Wallet Extension caused runtime error #39

Open jessupjn opened 8 months ago

jessupjn commented 8 months ago

Steps to reproduce:

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