When asking for help in this category, please make sure to provide the following details:
- SDK Version(package.json): 10.2.0
- Platform: React
- Browser Console Screenshots:
- If the issue is related to Custom Authentication, please include the following information (optional):
- Verifier Name:
- JWKS Endpoint:
- Sample idToken (JWT):
Also, kindly provide the Web3Auth initialization and login code snippet below. This will help us better understand your issue and provide you with the necessary assistance.
Web3Auth Configuration (lib/web3authConfig.ts)
import { WALLET_CONNECTORS, WEB3AUTH_NETWORK } from â@web3auth/modalâ;
import { CHAIN_NAMESPACES, CustomChainConfig } from â@web3auth/baseâ;
export const createWeb3AuthConfig = (config) => {
const chainConfig: CustomChainConfig = {
chainNamespace: CHAIN_NAMESPACES.EIP155,
chainId: 0x${config.chainId.toString(16)}
, // Convert to hex
rpcTarget: config.rpcUrl,
displayName: getNetworkDisplayName(),
blockExplorerUrl: config.snowtraceBaseUrl,
ticker: âAVAXâ,
tickerName: âAvalancheâ,
};
return {
web3AuthOptions: {
clientId: config.web3AuthClientId,
web3AuthNetwork: config.web3AuthNetwork,
chainConfig,
uiConfig: {
appName: "Conduit UCPI",
theme: { primary: "#0364ff" },
mode: "auto",
defaultLanguage: "en",
loginGridCol: 3,
primaryButton: "externalLogin",
},
modalConfig: {
connectors: {
[WALLET_CONNECTORS.AUTH]: {
loginMethods: {
google: { showOnModal: true },
facebook: { showOnModal: true },
email_passwordless: { showOnModal: true },
},
showOnModal: true,
},
},
},
},
};
};
Web3Auth Provider Setup (_app.tsx)
Login Implementation (ConnectWallet.tsx)
import { useWeb3Auth, useWeb3AuthConnect, useIdentityToken } from â@web3auth/modal/reactâ;
import { ethers } from âethersâ;
const connectWallet = async () => {
// Connect using Web3Auth React hook
const web3authProvider = await connect();
// Get wallet address using ethers.js
const ethersProvider = new ethers.BrowserProvider(web3authProvider);
const signer = await ethersProvider.getSigner();
const walletAddress = await signer.getAddress();
// For social logins, get identity token
const web3authInstance = (window as any).web3auth;
if (web3authInstance?.connectedConnectorName === 'auth') {
const authUser = await web3authInstance.getIdentityToken();
if (authUser?.idToken) {
await login(authUser.idToken, walletAddress, web3authProvider);
}
}
};
Question:
The onramp aggregator widget is only showing the native coin balance of my wallet. I need my users to be able to see their USDC balance. Am I missing some step to make this happen, or is it not possible in the onramp aggregator?