Skip to content

Commit f1c719f

Browse files
Merge pull request #87 from Web3Auth/feat/updates
feat: add new providers and update launchWalletServices() function
2 parents c2e822c + 587a344 commit f1c719f

File tree

4 files changed

+15
-13
lines changed

4 files changed

+15
-13
lines changed

app/src/main/java/com/web3auth/app/MainActivity.kt

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -187,14 +187,9 @@ class MainActivity : AppCompatActivity(), AdapterView.OnItemClickListener {
187187
val launchWalletButton = findViewById<Button>(R.id.launchWalletButton)
188188
launchWalletButton.setOnClickListener {
189189
val launchWalletCompletableFuture = web3Auth.launchWalletServices(
190-
loginParams = LoginParams(
191-
selectedLoginProvider,
192-
extraLoginOptions = null,
193-
mfaLevel = MFALevel.NONE,
194-
),
195190
chainConfig = ChainConfig(
196-
chainId = "0x1",
197-
rpcTarget = "https://mainnet.infura.io/v3/daeee53504be4cd3a997d4f2718d33e0",
191+
chainId = "0x89",
192+
rpcTarget = "https://1rpc.io/matic",
198193
chainNamespace = ChainNamespace.EIP155
199194
)
200195
)

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,6 @@ class Web3Auth(web3AuthOptions: Web3AuthOptions) {
396396
* @return A CompletableFuture<Void> representing the asynchronous operation.
397397
*/
398398
fun launchWalletServices(
399-
loginParams: LoginParams,
400399
chainConfig: ChainConfig,
401400
path: String? = "wallet"
402401
): CompletableFuture<Void> {
@@ -411,13 +410,10 @@ class Web3Auth(web3AuthOptions: Web3AuthOptions) {
411410
"chainConfig", gson.toJson(chainConfig)
412411
)
413412

414-
val initParams = getInitParams(loginParams)
415-
416413
val paramMap = JSONObject()
417414
paramMap.put(
418415
"options", initOptions
419416
)
420-
paramMap.put("params", initParams)
421417

422418
val loginIdCf = getLoginId(paramMap)
423419

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

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,25 @@ enum class Provider {
2323
KAKAO,
2424
@SerializedName("linkedin")
2525
LINKEDIN,
26+
2627
@SerializedName("twitter")
2728
TWITTER,
29+
2830
@SerializedName("weibo")
2931
WEIBO,
32+
3033
@SerializedName("wechat")
3134
WECHAT,
35+
3236
@SerializedName("email_passwordless")
3337
EMAIL_PASSWORDLESS,
38+
3439
@SerializedName("jwt")
35-
JWT
40+
JWT,
41+
42+
@SerializedName("sms_passwordless")
43+
SMS_PASSWORDLESS,
44+
45+
@SerializedName("farcaster")
46+
FARCASTER
3647
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,6 @@ fun getWalletSdkUrl(buildEnv: BuildEnv?): String {
5454
}
5555

5656
const val openLoginVersion = "v8"
57-
const val walletServicesVersion = "v1"
57+
const val walletServicesVersion = "v2"
5858
const val WEBVIEW_URL = "walletUrl"
5959
const val REDIRECT_URL = "redirectUrl"

0 commit comments

Comments
 (0)