I am getting Questions that time errors how to solve?
TypeError: Cannot read properties of undefined (reading ‘getGeneralStoreDomain’)
at TssSecurityQuestion.getQuestion (mpcCoreKit.esm.js:752:39)
at initMPC (Loginbutton.jsx:117:41)
const securityQuestion: TssSecurityQuestion = useMemo(() => new TssSecurityQuestion(), []);
useEffect(() => {
const initMPC = async () => {
try {
const selectedNetwork = WEB3AUTH_NETWORK.MAINNET;
const clientidweb3 = process.env.NEXT_PUBLIC_WEB3AUTH_CLIENTID;
const coreKitInstance = new Web3AuthMPCCoreKit({
web3AuthClientId: clientidweb3,
web3AuthNetwork: selectedNetwork,
uxMode: "redirect",
chainConfig: {
chainNamespace: "eip155",
chainId: "0xa4ba",
rpcTarget: "https://nova.arbitrum.io/rpc",
displayName: "Arbitrum Nova",
blockExplorer: "https://explorer.arbitrum.io/nova",
ticker: "NOVA",
tickerName: "Nova",
},
});
await coreKitInstance.init();
setCoreKitInstance(coreKitInstance);
setCoreKitStatus(coreKitInstance.status);
console.log("coreKitInstance.status-->", coreKitInstance.status);
if (coreKitInstance.status === COREKIT_STATUS.REQUIRED_SHARE) {
setRequiredshares(true);
}
if (coreKitInstance.provider) {
const web3Instance = new Web3(coreKitInstance.provider);
setWeb3(web3Instance);
setWeb3AuthSigner(coreKitInstance.provider);
const userdata = coreKitInstance?.getUserInfo();
setUserinfo(userdata);
router.push("/dashboard");
console.log("userdata-->", userdata);
}
try {
let result = securityQuestion.getQuestion(coreKitInstance);
console.log("🚀 ~ init ~ result:", result);
setQuestion(result);
} catch (e) {
setQuestion(undefined);
console.log("Result Error--->", e);
}
} catch (error) {
console.error("Error initializing MPC Core Kit:", error);
}
};