web3modal
web3modal copied to clipboard
[feature] Disable smart accounts but leave email accounts available
What problem does this new feature solve?
I have not found in the documentation how to disable smart accounts from the login interface leaving only the use of email accounts available.
My attempt was to place only eoa in the defaultAccountTypes variable without adding smart accounts in the hope that the smart account would not appear.
networks: [polygon],
defaultNetwork: polygon,
projectId,
defaultAccountTypes: {eip155:'eoa'},
features: {
email: true,
socials: false
},
But this does not prevent both types of accounts from appearing:
The email accounts users are inexperienced blockchain users. And I don't want them to be confused by the fact that they have two different addresses.
Describe the solution you'd like
Is it possible to create a feature that disables smart accounts and only shows email accounts?
@Cainuriel can you explain in more detail why you would like that solution?
I have the same problem with Google Login. It injects 2 addresses: one for Google Login and the other for Smart Account.
This would not be a problem if it selected the Google Login address by default - however it does not.
The problem is that code like this falls over if the Smart Account is selected:
const provider = new BrowserProvider(walletProvider as Eip1193Provider)
const signer = await provider.getSigner();`
More specifically the above code results in this error:
client.ts:1196 Requested RPC call is not allowed {method: 'eth_requestAccounts'}
If I manually select the Google Login all works fine and I can sign etc.
The reason I am using Account Abstraction in the first place is to allow web2 users to use web3 tech under the hood. However if they are faced with 2 addresses and have to switch to the Google Login address then this is super confusing.
Also this setting does not make sure that Google Login is selected:
createAppKit({ adapters: [wagmiAdapter], ...generalConfig, features: { analytics: true, }, defaultAccountTypes: {eip155: 'eoa'} // This is to avoid the Smart Account })
What are we to do? This cannot work with our user base - if this cannot be solved I cannot use AppKit.
Thank you.
@Cainuriel can you explain in more detail why you would like that solution?
Ideally, smart accounts should be disabled. In the same object feature something like this:
networks: [polygon],
defaultNetwork: polygon,
projectId,
defaultAccountTypes: {eip155:'eoa'},
features: {
email: true,
socials: false,
smart_accounts: false
},
this could also work: defaultAccountTypes . That is, smart accounts that are not actually EOA would not appear.
I'm having a similar issue with Smart Accounts. My issue is that you cannot sign a message on a smart account, or at least not through AppKit. It returns an error Uncaught (in promise) Error: Invalid byte sequence
Once I switch to the eoa account, I'm able to sign just fine.
The fact that appKit defaults to the Smart Account is not intuitive to the end user that doesn't know what smart accounts are.
Is there a way to disable smart accounts if we don't want them?
Is there a way to make the eoa wallet the default?
I've the same request as @lucas-quinn-guru. The default wallet connected via email (or social logins) for that matter should be via EOA and not the smart account, or there should be an option to have this customisation to enable/disable this.
I've the same request as @lucas-quinn-guru. The default wallet connected via email (or social logins) for that matter should be via EOA and not the smart account, or there should be an option to have this customisation to enable/disable this.
Same request as everyone else. :)