Web3Auth / mpc-core-kit

15 stars 4 forks source link

[v3] TssSecurityQuestion.getQuestion throws error #149

Closed AyushBherwani1998 closed 1 month ago

AyushBherwani1998 commented 1 month ago

Description

getQuestion method throws error despite the question being added successfully, and a factor being created.

Key details:

{
"requiredFactors": 0,
"threshold": 2,
"totalFactors": 3,
"shareDescriptions": {
"026b8c25705427688e4b4b9698af6463fa20c1624cd5b7ebdebf047310aa3d7e1e": [
"{\"module\":\"hashedShare\",\"dateAdded\":1717042655232,\"tssShareIndex\":2}"
],
"031ca2a94b4351ebd4249a084574f456584b063f5b98e044cd800a9ad388c86ed4": [
"{\"module\":\"tssSecurityQuestions\",\"dateAdded\":1717042674880,\"question\":\"Fav anime?\",\"tssShareIndex\":3}"
]
},
"metadataPubKey": {
"x": "9e8ddaffc667cb35b2ade061dafb90c6af0cbd089cf70dbcf547c45894e52f54",
"y": "fc714777f6bbae8b530ef89f8064c32f7e1c71b0e9f88dd96c8204b443fe34fb"
},
"tssPubKey": {
"x": "f620e7bdc70bf439f8e6e9277519897441abd511783e1dbc090d7e3691ae97ef",
"y": "ac0574fcd503ec26a102159c718c504ab07b3910a089bfc969254d48785e5095"
},
"keyType": "secp256k1"
}

Factors:

[
"026b8c25705427688e4b4b9698af6463fa20c1624cd5b7ebdebf047310aa3d7e1e",
"031ca2a94b4351ebd4249a084574f456584b063f5b98e044cd800a9ad388c86ed4"
]

getQuestion Method Error:

Screenshot 2024-05-30 at 9 46 06 AM

Reproducible steps

matthiasgeihs commented 1 month ago

investigated.

the functionality works. the issue is the logging. it logs when the question is not found (which happens during initialization), but then once initialization completes it actually loads the question, but doesn't log again, so the old "not found" message is still visible.

fixed the logging in #147.

matthiasgeihs commented 1 month ago

Resolved in #147