Skip to content

Commit

Permalink
fix: linter
Browse files Browse the repository at this point in the history
  • Loading branch information
yuche committed Sep 18, 2024
1 parent a802f89 commit 3f4eb09
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/ethereum-provider/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ export class EthereumProvider extends EventEmitter {
throw new Error('eth_sign is not supported, use personal_sign instead')
}
case 'wallet_switchEthereumChain': {
const chainId = args.params?.[0]?.chainId as string
this.switchChain(parseInt(chainId))
const [chainId] = args.params as [chainId: string]
this.switchChain(Number.parseInt(chainId, 10))
this.emit('chainChanged', chainId)
return undefined
}
Expand Down

0 comments on commit 3f4eb09

Please sign in to comment.