Undefined chainId in @web3auth/coinbase-adapter 8.8.0

Description:
The code in /@web3auth/coinbase-adapter/dist/coinbaseAdapter.esm.js is causing chainId to be undefined. The eth_chainId method returns chainId, not an object containing chainId, resulting in unexpected behavior.

I checked the code on GitHub, and it does not exhibit this issue. It appears to be a version deployment issue on npmjs.com

Please investigate and update the package on npmjs.com promptly, as my application depends on this fix.

Affected Package:

Package Name: @web3auth/coinbase-adapter

Version: 8.8.0

Screenshot:
image

Hey @nhatcao2608 thanks for creating a ticket, we’ll investigate and update you as soon as possible.

Hey @nhatcao2608 thanks for catching that, can you also share what unexpected behaviour you are observing?

Hi @Ayush

The undefined chainId leads to the following logic statement, which calls the wallet_addEthereumChain method.

if (chainId !== this.chainConfig.chainId) {
  await this.addChain(this.chainConfig);
  await this.switchChain(this.chainConfig, true);
}

It seems that Coinbase Wallet does not support this method, preventing users from connecting to it.

Thanks, it’s fixed now in v8.9.0

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.