Wallet auto-connect
How to implement the wallet auto-connect
export function isOneInchWalletProviderInjected(): boolean {
return Boolean(ethereum?.isOneInchIOSWallet || ethereum?.isOneInchAndroidWallet);
}// Retrieving accounts: eth_requestAccounts returns the current one, it gives an array containing single address
const accounts = await ethereum.request({ method: 'eth_requestAccounts' });// returns id of the network in hex-format
const currentChain = await ethereum.request({ method: 'eth_chainId' });Last updated