@@ -10,7 +10,7 @@ import { HiOutlineCheckCircle } from "react-icons/hi";
1010import { Link } from "./Link" ;
1111
1212const UserCard : React . FC = ( ) => {
13- const { coreKitInstance , web3, coreKitStatus , drawerHeading, setDrawerHeading, drawerInfo, setDrawerInfo, userInfo } = useCoreKit ( ) ;
13+ const { web3, drawerHeading, setDrawerHeading, drawerInfo, setDrawerInfo, userInfo } = useCoreKit ( ) ;
1414
1515 const [ openConsole , setOpenConsole ] = React . useState ( false ) ;
1616
@@ -36,24 +36,6 @@ const UserCard: React.FC = () => {
3636 }
3737 } , [ drawerInfo ] ) ;
3838
39- const listFactors = async ( ) => {
40- if ( ! coreKitInstance ) {
41- throw new Error ( "coreKitInstance not found" ) ;
42- }
43- const temp = await coreKitInstance . getDeviceFactor ( ) ;
44- // const temp2 = await coreKitInstance.tKey.reconstructKey();
45- const factorPubs = coreKitInstance . tKey . metadata . factorPubs ;
46- if ( ! factorPubs ) {
47- throw new Error ( "factorPubs not found" ) ;
48- }
49- const pubsHex = factorPubs [ coreKitInstance . tKey . tssTag ] . map ( ( pub ) => {
50- return pub . toSEC1 ( factorKeyCurve , true ) . toString ( "hex" ) ;
51- } ) ;
52- console . log ( pubsHex ) ;
53- coreKitInstance . tKey . getMetadata ( ) . getGeneralStoreDomain ( "tssSecurityQuestion:default" ) ;
54- } ;
55-
56-
5739 const getAccounts = async ( ) => {
5840 if ( ! web3 ) {
5941 return ;
@@ -65,7 +47,7 @@ const UserCard: React.FC = () => {
6547
6648 React . useEffect ( ( ) => {
6749 getAccounts ( ) ;
68- } , [ web3 ] ) ;
50+ } , [ userInfo , web3 ] ) ;
6951
7052 const handleConsoleBtn = ( ) => {
7153 setDrawerHeading ( "User Info Console" ) ;
@@ -106,7 +88,7 @@ const UserCard: React.FC = () => {
10688 src = { userInfo . profileImage }
10789 className = "w-full h-full"
10890 alt = "Profile"
109- onError = { ( err ) => {
91+ onError = { ( ) => {
11092 setImageError ( true ) ;
11193 } }
11294 />
0 commit comments