Web3Auth/web3auth-web

missing provider in connect `emit` throws in `no-modal.ts`

Closed this issue · 2 comments

Bug - missing provider in connect emit throws in no-modal.ts

this.emit(ADAPTER_STATUS.CONNECTED, { adapter: WALLET_ADAPTERS.TORUS_EVM, reconnected: this.rehydrated } as CONNECTED_EVENT_DATA);

connected to issue in #1913

should additionally emit the provider like:

// L140 --> connect code
// ... rest of connect code
this.emit(ADAPTER_STATUS.CONNECTED, { 
  adapter: WALLET_ADAPTERS.TORUS_EVM, 
  reconnected: this.rehydrated, 
  provider: this.provider // <-- this is the lacking line
} as CONNECTED_EVENT_DATA);
// ... rest of connect code

MRE: https://github.com/W3stside/wagmi-web3auth-example

  1. click Connect with web3auth
  2. select external wallets
  3. click torus when it loads
  4. connect with google accnt
  5. look for error in console

Fixed in v9