@@ -390,14 +390,13 @@ class Web3Auth(web3AuthOptions: Web3AuthOptions) {
390390 /* *
391391 * Launches the wallet services asynchronously.
392392 *
393- * @param loginParams The login parameters required for authentication.
394393 * @param chainConfig The configuration details of the blockchain network.
395394 * @param path The path where the wallet services will be launched. Default value is "wallet".
396395 * @return A CompletableFuture<Void> representing the asynchronous operation.
397396 */
398397 fun launchWalletServices (
399398 chainConfig : ChainConfig ,
400- path : String? = "wallet"
399+ path : String? = "wallet",
401400 ): CompletableFuture <Void > {
402401 val launchWalletServiceCF: CompletableFuture <Void > = CompletableFuture ()
403402 val sessionId = sessionManager.getSessionId()
@@ -424,7 +423,7 @@ class Web3Auth(web3AuthOptions: Web3AuthOptions) {
424423 " loginId" , loginId
425424 )
426425 walletMap.addProperty(" sessionId" , sessionId)
427- walletMap.addProperty(" isAndroid " , true )
426+ walletMap.addProperty(" platform " , " android " )
428427
429428 val walletHash =
430429 " b64Params=" + gson.toJson(walletMap).toByteArray(Charsets .UTF_8 )
@@ -451,14 +450,14 @@ class Web3Auth(web3AuthOptions: Web3AuthOptions) {
451450 /* *
452451 * Signs a message asynchronously.
453452 *
454- * @param loginParams The login parameters required for authentication .
453+ * @param chainConfig The configuration details of the blockchain network .
455454 * @param method The method name of the request.
456455 * @param requestParams The parameters of the request in JSON array format.
457456 * @param path The path where the signing service is located. Default value is "wallet/request".
458457 * @return A CompletableFuture<Void> representing the asynchronous operation.
459458 */
460459 fun request (
461- loginParams : LoginParams ,
460+ chainConfig : ChainConfig ,
462461 method : String ,
463462 requestParams : JsonArray ,
464463 path : String? = "wallet/request"
@@ -469,12 +468,13 @@ class Web3Auth(web3AuthOptions: Web3AuthOptions) {
469468 val sdkUrl = Uri .parse(web3AuthOption.walletSdkUrl)
470469 val context = web3AuthOption.context
471470 val initOptions = getInitOptions()
472- val initParams = getInitParams(loginParams)
471+ initOptions.put(
472+ " chainConfig" , gson.toJson(chainConfig)
473+ )
473474 val paramMap = JSONObject ()
474475 paramMap.put(
475476 " options" , initOptions
476477 )
477- paramMap.put(" params" , initParams)
478478
479479 val loginIdCf = getLoginId(paramMap)
480480
@@ -483,6 +483,7 @@ class Web3Auth(web3AuthOptions: Web3AuthOptions) {
483483 val signMessageMap = JsonObject ()
484484 signMessageMap.addProperty(" loginId" , loginId)
485485 signMessageMap.addProperty(" sessionId" , sessionId)
486+ signMessageMap.addProperty(" platform" , " android" )
486487
487488 val requestData = JsonObject ().apply {
488489 addProperty(" method" , method)
0 commit comments