Skip to content

Commit

Permalink
feat: code cleaning and optimization
Browse files Browse the repository at this point in the history
Signed-off-by: Gaurav Goel <[email protected]>
  • Loading branch information
grvgoel81 authored and Gaurav Goel committed Nov 4, 2024
1 parent 52ece25 commit 114fbce
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,6 @@ class SingleFactorAuth(
return sfaCF
}

private fun getTorusNodeEndpoints(nodeDetails: NodeDetails): Array<String?> {
return nodeDetails.torusNodeEndpoints
}

fun getSessionData(): SessionData? {
return this.state
}
Expand Down Expand Up @@ -127,7 +123,7 @@ class SingleFactorAuth(

val aggregateIdToken = Hash.sha3String(java.lang.String.join(29.toChar().toString(), aggregateIdTokenSeeds)).replace("0x", "")
retrieveSharesResponse = torusUtils.retrieveShares(
getTorusNodeEndpoints(nodeDetails),
nodeDetails.torusNodeEndpoints,
loginParams.verifier,
verifierParams,
aggregateIdToken,
Expand All @@ -136,7 +132,7 @@ class SingleFactorAuth(
} ?: run{
val verifierParams = VerifierParams(loginParams.verifierId, null, null, null)
retrieveSharesResponse = torusUtils.retrieveShares(
getTorusNodeEndpoints(nodeDetails),
nodeDetails.torusNodeEndpoints,
loginParams.verifier,
verifierParams,
loginParams.idToken,
Expand Down

0 comments on commit 114fbce

Please sign in to comment.