Open willhennessy opened 2 years ago
this is how wallet connect works, for better and worse!
This is only partly true. Yes, for WC connections, the wallet decides at the end for which chainId the connection is going to be established. However it is also possible to specify a chainId during session request, which the wallet can capture and respect. In OP case, if Uniswap correctly specified that the selected network is Polygon, since the wallet also supports Polygon, it would be able to capture and use the correct chainId. I am having the same problem with my wallet supporting WC when connecting to Uniswap and try to use Optimism.
Steps:
Expected Behavior:
Actual Behavior:
import WalletConnectProvider from "@walletconnect/web3-provider";
const provider = new WalletConnectProvider({
...
chainId: 10, // <--- this is supported although not very clearly documented
...
});
this.wcProvider.enable();
Thanks! I’ll reopen this
Steps to Reproduce
Actual Behavior The wallet connects on Ethereum and completely overrides the app state = Polygon.
Expected Behavior The app says Polygon and I'm looking at a price quote on Polygon, so I expect my wallet to connect to Polygon network.
This bug was made more prevalent by two recent launches