You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dapp connects to user Coinbase wallet without authorization pop-up window
Steps
I am creating a DAPP and configuring Coinbase/Wallet SDK according to the official documentation. Using Ethereum. request ({method: 'eth_requestAccounts'}), I can connect to the wallet, but the problem is that there is no prompt during this process. I would like a user authorization pop-up window. This feature is very common in other wallet SDKs, such as the connect feature in Metamak SDKs, which can easily trigger authorization pop ups; But in the documentation of Coinbase, I cannot find the corresponding method;
Expected behavior
In Coinbase browser, in Dapp, when I try to connect to the wallet, there should be a pop-up window that prompts the user for authorization
Version
3.7.2
Additional info
I tried the following two methods:
ethereum.request({ method: 'eth_requestAccounts' }).then(response => {
const accounts : string[] = response as string[];
console.log(User's address is ${accounts[0]});
// Optionally, have the default account set for web3.js
// (web3 as any).eth.defaultAccount = accounts[0];
loginHandle(accounts?.[0]);
});
// Alternatively, you can use ethereum.enable()
ethereum.enable().then((accounts: string[]) => {
console.log(`User's address is ${accounts[0]}`, 'enable');
loginHandle(accounts?.[0]);
// (web3 as any).eth.defaultAccount = accounts[0];
});
Desktop
Mobile (Android) Coinbase browser
Smartphone
No response
The text was updated successfully, but these errors were encountered:
Describe the bug
Dapp connects to user Coinbase wallet without authorization pop-up window
Steps
I am creating a DAPP and configuring Coinbase/Wallet SDK according to the official documentation. Using Ethereum. request ({method: 'eth_requestAccounts'}), I can connect to the wallet, but the problem is that there is no prompt during this process. I would like a user authorization pop-up window. This feature is very common in other wallet SDKs, such as the connect feature in Metamak SDKs, which can easily trigger authorization pop ups; But in the documentation of Coinbase, I cannot find the corresponding method;
Expected behavior
In Coinbase browser, in Dapp, when I try to connect to the wallet, there should be a pop-up window that prompts the user for authorization
Version
3.7.2
Additional info
I tried the following two methods:
ethereum.request({ method: 'eth_requestAccounts' }).then(response => {
const accounts : string[] = response as string[];
console.log(
User's address is ${accounts[0]}
);Desktop
Mobile (Android) Coinbase browser
Smartphone
No response
The text was updated successfully, but these errors were encountered: