Skip to content

Commit

Permalink
fix: ethers5 requestAccounts (#2454)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomiir authored Jun 20, 2024
1 parent d717c49 commit f79085f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/ethers5/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,8 @@ export class Web3Modal extends Web3ModalScaffold {

try {
EthersStoreUtil.setError(undefined)
this.setCoinbaseProvider(ethersConfig)
await CoinbaseProvider.request({ method: 'eth_requestAccounts' })
this.setCoinbaseProvider(ethersConfig)
} catch (error) {
EthersStoreUtil.setError(error)
throw new Error((error as CoinbaseProviderError).message)
Expand Down Expand Up @@ -646,7 +646,6 @@ export class Web3Modal extends Web3ModalScaffold {
ConstantsUtil.COINBASE_SDK_CONNECTOR_ID
)
const CoinbaseProvider = config.coinbase

if (CoinbaseProvider) {
const { address, chainId } = await EthersHelpersUtil.getUserInfo(CoinbaseProvider)
if (address && chainId) {
Expand Down

0 comments on commit f79085f

Please sign in to comment.