-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
Steps to reproduce
Initialize web3auth with an EthereumPrivateKeyProvider that points pointing to a non-responding RPC provider.
During: Web3Auth::init -> if(sessionId) { ... await this.privateKeyProvider.setupProvider(finalPrivKey); }
Code sample
import * as WebBrowser from '@toruslabs/react-native-web-browser';
import EncryptedStorage from 'react-native-encrypted-storage';
import Web3Auth, {
ChainNamespace,
WEB3AUTH_NETWORK,
} from '@web3auth/react-native-sdk';
import { EthereumPrivateKeyProvider } from '@web3auth/ethereum-provider';
const chainConfig = {
chainNamespace: ChainNamespace.EIP155,
chainId: ''whatever',
rpcTarget: 'an rpc that does not respond or overall crashes',
// Avoid using public rpcTarget in production.
// Use services like Infura, Quicknode etc
displayName: 'Ethereum Sepolia Testnet',
blockExplorerUrl: 'https://sepolia.etherscan.io',
ticker: 'ETH',
tickerName: 'Ethereum',
decimals: 18,
logo: 'https://cryptologos.cc/logos/ethereum-eth-logo.png',
};
const ethereumPrivateKeyProvider = new EthereumPrivateKeyProvider({
config: {
chainConfig,
},
});
const scheme = 'xyz.piopio.app';
const redirectUrl = `${scheme}://auth`;
export const auth = new Web3Auth(WebBrowser, EncryptedStorage, {
// clientId: WEB3AUTH_CLIENT_ID,
clientId:
'your id',
redirectUrl,
network: WEB3AUTH_NETWORK.SAPPHIRE_MAINNET, // or other networks
privateKeyProvider: ethereumPrivateKeyProvider,
enableLogging: true,
});Metadata
Metadata
Assignees
Labels
No labels