I took a look all aronnd the forums. This one seems to follow the official Moralis docs the most https://forum.moralis.io/t/react-moralis-cannot-connect-walletlink/10794/2
I setup a coinbase wallet connector that extends the AbstractWeb3Connector (I think).
import Moralis from "moralis";
import CoinbaseWalletSDK from "@coinbase/wallet-sdk";
import Web3 from "web3";
class CoinbaseWalletConnector extends Moralis?.AbstractWeb3Connector {
account;
provider;
coinbaseLink = new CoinbaseWalletSDK({
appName: "Sample App",
appLogoUrl: "Sample PNG",
darkMode: false,
});
async activate() {
const ethereum = this.coinbaseLink.makeWeb3Provider(
"https://eth-mainnet.alchemyapi.io/v3/....",
1
);
await ethereum.enable();
const web3 = new Web3(ethereum);
const accounts = await web3.eth.getAccounts();
this.account = accounts[0];
this.provider = ethereum;
this.subscribeToEvents(this.provider);
return {
provider: this.provider,
account: this.account,
};
}
async deactivate() {
this.unsubscribeToEvents(this.provider);
this.coinbaseLink.disconnect();
this.account = null;
this.provider = null;
}
}
export default CoinbaseWalletConnector;
Then from where I want to prompt the coinbase wallet connect I initialize the coinbase wallet connector like
const coinbaseConnector = () => new CoinbaseWalletConnector();
Then I tried both
authenticate({
connector: coinbaseConnector,
});
and
Moralis.authenticate({
connector: coinbaseConnector,
});
Neither prompts open the coinbase connect. I am also sure the browser has the coinbase wallet extension. Any help would be greatly appreciated!!! Thank you all