Skip to content

Commit 693eabe

Browse files
committed
feat: platform parameter added
Signed-off-by: Gaurav Goel <[email protected]>
1 parent 5d09fa2 commit 693eabe

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,8 @@ class Web3Auth(web3AuthOptions: Web3AuthOptions, context: Context) : WebViewResu
152152
"appState",
153153
gson.toJson(loginIdObject).toByteArray(Charsets.UTF_8).toBase64URLString()
154154
)
155+
initParamsJson.put("platform", "android")
156+
initParamsJson.put("dappUrl", web3AuthOption.redirectUrl)
155157
paramMap.put("sessionId", sessionManager.getSessionId())
156158
}
157159
paramMap.put("params", initParamsJson)
@@ -164,10 +166,7 @@ class Web3Auth(web3AuthOptions: Web3AuthOptions, context: Context) : WebViewResu
164166
val loginIdCf = getLoginId(sessionId, paramsString)
165167
loginIdCf.whenComplete { loginId, error ->
166168
if (error == null) {
167-
val jsonObject = mapOf(
168-
"loginId" to loginId,
169-
"platform" to "android"
170-
)
169+
val jsonObject = mapOf("loginId" to loginId)
171170

172171
val hash = "b64Params=" + gson.toJson(jsonObject).toByteArray(Charsets.UTF_8)
173172
.toBase64URLString()

0 commit comments

Comments
 (0)