Skip to content

Commit

Permalink
fix: We should never have this case
Browse files Browse the repository at this point in the history
  • Loading branch information
EdouardBougon committed Aug 2, 2024
1 parent bf3a3aa commit a23bdd7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/connectors/src/metaMask.ts
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,9 @@ export function metaMask(parameters: MetaMaskParameters = {}) {
},
async onConnect(connectInfo) {
const accounts = await this.getAccounts()
if (accounts.length === 0) return
if (accounts.length === 0) {
throw new Error('No accounts selected')
}

const chainId = Number(connectInfo.chainId)
config.emitter.emit('connect', { accounts, chainId })
Expand Down

0 comments on commit a23bdd7

Please sign in to comment.