Skip to content

Commit 695a354

Browse files
committed
feat: Add appState in SignMessage.kt
Signed-off-by: Gaurav Goel <[email protected]>
1 parent 2adec20 commit 695a354

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -522,10 +522,6 @@ class Web3Auth(web3AuthOptions: Web3AuthOptions, context: Context) {
522522
"options", initOptions
523523
)
524524

525-
appState?.let {
526-
paramMap.put("appState", it)
527-
}
528-
529525
val loginIdCf = getLoginId(paramMap, context)
530526

531527
loginIdCf.whenComplete { loginId, error ->
@@ -536,7 +532,8 @@ class Web3Auth(web3AuthOptions: Web3AuthOptions, context: Context) {
536532
request = RequestData(
537533
method = method,
538534
params = gson.toJson(requestParams)
539-
)
535+
),
536+
appState = appState.let { it }
540537
)
541538

542539
val signMessageHash =

core/src/main/java/com/web3auth/core/types/SignMessage.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ data class SignMessage(
44
val loginId: String,
55
val sessionId: String,
66
val platform: String = "android",
7-
val request: RequestData
7+
val request: RequestData,
8+
val appState: String? = null //Added for mocaverse use-case
89
)
910

1011
data class RequestData(

0 commit comments

Comments
 (0)