Skip to content

Commit be374c6

Browse files
Merge pull request #56 from Web3Auth/code-refactoring
removing store object
2 parents 85b551a + d695985 commit be374c6

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

core/src/main/java/com/web3auth/core/Web3Auth.kt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,6 @@ class Web3Auth(web3AuthOptions: Web3AuthOptions) {
175175
sessionResponse.whenComplete { response, error ->
176176
if (error == null) {
177177
val tempJson = JSONObject(response)
178-
tempJson.put("userInfo", tempJson.get("store"))
179-
tempJson.remove("store")
180178
web3AuthResponse =
181179
gson.fromJson(tempJson.toString(), Web3AuthResponse::class.java)
182180
if (web3AuthResponse.error?.isNotBlank() == true) {
@@ -214,9 +212,9 @@ class Web3Auth(web3AuthOptions: Web3AuthOptions) {
214212
throw Error(Web3AuthError.getError(ErrorCode.NOUSERFOUND))
215213
} else {
216214
if (web3AuthOption.useCoreKitKey == true) {
217-
web3AuthResponse.coreKitEd25519PrivKey
215+
web3AuthResponse.coreKitKey
218216
} else {
219-
web3AuthResponse.ed25519PrivKey
217+
web3AuthResponse.privKey
220218
}
221219
}
222220
return privKey

0 commit comments

Comments
 (0)