@@ -390,14 +390,13 @@ class Web3Auth(web3AuthOptions: Web3AuthOptions) {
390
390
/* *
391
391
* Launches the wallet services asynchronously.
392
392
*
393
- * @param loginParams The login parameters required for authentication.
394
393
* @param chainConfig The configuration details of the blockchain network.
395
394
* @param path The path where the wallet services will be launched. Default value is "wallet".
396
395
* @return A CompletableFuture<Void> representing the asynchronous operation.
397
396
*/
398
397
fun launchWalletServices (
399
398
chainConfig : ChainConfig ,
400
- path : String? = "wallet"
399
+ path : String? = "wallet",
401
400
): CompletableFuture <Void > {
402
401
val launchWalletServiceCF: CompletableFuture <Void > = CompletableFuture ()
403
402
val sessionId = sessionManager.getSessionId()
@@ -424,7 +423,7 @@ class Web3Auth(web3AuthOptions: Web3AuthOptions) {
424
423
" loginId" , loginId
425
424
)
426
425
walletMap.addProperty(" sessionId" , sessionId)
427
- walletMap.addProperty(" isAndroid " , true )
426
+ walletMap.addProperty(" platform " , " android " )
428
427
429
428
val walletHash =
430
429
" b64Params=" + gson.toJson(walletMap).toByteArray(Charsets .UTF_8 )
@@ -451,14 +450,14 @@ class Web3Auth(web3AuthOptions: Web3AuthOptions) {
451
450
/* *
452
451
* Signs a message asynchronously.
453
452
*
454
- * @param loginParams The login parameters required for authentication .
453
+ * @param chainConfig The configuration details of the blockchain network .
455
454
* @param method The method name of the request.
456
455
* @param requestParams The parameters of the request in JSON array format.
457
456
* @param path The path where the signing service is located. Default value is "wallet/request".
458
457
* @return A CompletableFuture<Void> representing the asynchronous operation.
459
458
*/
460
459
fun request (
461
- loginParams : LoginParams ,
460
+ chainConfig : ChainConfig ,
462
461
method : String ,
463
462
requestParams : JsonArray ,
464
463
path : String? = "wallet/request"
@@ -469,12 +468,13 @@ class Web3Auth(web3AuthOptions: Web3AuthOptions) {
469
468
val sdkUrl = Uri .parse(web3AuthOption.walletSdkUrl)
470
469
val context = web3AuthOption.context
471
470
val initOptions = getInitOptions()
472
- val initParams = getInitParams(loginParams)
471
+ initOptions.put(
472
+ " chainConfig" , gson.toJson(chainConfig)
473
+ )
473
474
val paramMap = JSONObject ()
474
475
paramMap.put(
475
476
" options" , initOptions
476
477
)
477
- paramMap.put(" params" , initParams)
478
478
479
479
val loginIdCf = getLoginId(paramMap)
480
480
@@ -483,6 +483,7 @@ class Web3Auth(web3AuthOptions: Web3AuthOptions) {
483
483
val signMessageMap = JsonObject ()
484
484
signMessageMap.addProperty(" loginId" , loginId)
485
485
signMessageMap.addProperty(" sessionId" , sessionId)
486
+ signMessageMap.addProperty(" platform" , " android" )
486
487
487
488
val requestData = JsonObject ().apply {
488
489
addProperty(" method" , method)
0 commit comments