Skip to content

Commit 1bfa09f

Browse files
committed
feat: Resolved PR comments.
Signed-off-by: Gaurav Goel <[email protected]>
1 parent c8269d4 commit 1bfa09f

File tree

3 files changed

+16
-7
lines changed

3 files changed

+16
-7
lines changed

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

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,11 @@ import com.web3auth.core.Web3Auth
2222
import com.web3auth.core.isEmailValid
2323
import com.web3auth.core.isPhoneNumberValid
2424
import com.web3auth.core.types.AUTH_CONNECTION
25+
import com.web3auth.core.types.AuthConnection
26+
import com.web3auth.core.types.AuthConnectionConfig
2527
import com.web3auth.core.types.BuildEnv
26-
import com.web3auth.core.types.ChainConfig
2728
import com.web3auth.core.types.ChainNamespace
29+
import com.web3auth.core.types.ChainsConfig
2830
import com.web3auth.core.types.ExtraLoginOptions
2931
import com.web3auth.core.types.Language
3032
import com.web3auth.core.types.LoginParams
@@ -178,6 +180,13 @@ class MainActivity : AppCompatActivity(), AdapterView.OnItemClickListener {
178180
"onPrimary" to "#0000FF"
179181
)
180182
),
183+
authConnectionConfig = listOf(
184+
AuthConnectionConfig(
185+
authConnectionId = "web3auth-auth0-email-passwordless-sapphire-devnet",
186+
authConnection = AuthConnection.JWT,
187+
clientId = "d84f6xvbdV75VTGmHiMWfZLeSPk8M07C"
188+
)
189+
),
181190
authBuildEnv = BuildEnv.TESTING,
182191
sessionTime = 86400,
183192
)
@@ -217,7 +226,7 @@ class MainActivity : AppCompatActivity(), AdapterView.OnItemClickListener {
217226
val launchWalletCompletableFuture = web3Auth.showWalletUI(
218227
chainId = "0x89",
219228
chainConfig = listOf(
220-
ChainConfig(
229+
ChainsConfig(
221230
chainId = "0x89",
222231
rpcTarget = "https://1rpc.io/matic",
223232
chainNamespace = ChainNamespace.EIP155
@@ -244,7 +253,7 @@ class MainActivity : AppCompatActivity(), AdapterView.OnItemClickListener {
244253
val signMsgCompletableFuture = web3Auth.request(
245254
chainId = "0x89",
246255
chainConfig = listOf(
247-
ChainConfig(
256+
ChainsConfig(
248257
chainId = "0x89",
249258
rpcTarget = "https://polygon-rpc.com/",
250259
chainNamespace = ChainNamespace.EIP155

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import com.google.gson.JsonObject
1212
import com.web3auth.core.api.ApiHelper
1313
import com.web3auth.core.api.ApiService
1414
import com.web3auth.core.keystore.KeyStoreManagerUtils
15-
import com.web3auth.core.types.ChainConfig
15+
import com.web3auth.core.types.ChainsConfig
1616
import com.web3auth.core.types.ErrorCode
1717
import com.web3auth.core.types.ExtraLoginOptions
1818
import com.web3auth.core.types.InitOptions
@@ -521,7 +521,7 @@ class Web3Auth(web3AuthOptions: Web3AuthOptions, context: Context) : WebViewResu
521521
*/
522522
fun showWalletUI(
523523
chainId: String,
524-
chainConfig: List<ChainConfig>,
524+
chainConfig: List<ChainsConfig>,
525525
path: String? = "wallet",
526526
): CompletableFuture<Void> {
527527
val launchWalletServiceCF: CompletableFuture<Void> = CompletableFuture()
@@ -584,7 +584,7 @@ class Web3Auth(web3AuthOptions: Web3AuthOptions, context: Context) : WebViewResu
584584
*/
585585
fun request(
586586
chainId: String,
587-
chainConfig: List<ChainConfig>,
587+
chainConfig: List<ChainsConfig>,
588588
method: String,
589589
requestParams: JsonArray,
590590
path: String? = "wallet/request",

core/src/main/java/com/web3auth/core/types/ChainConfig.kt renamed to core/src/main/java/com/web3auth/core/types/ChainsConfig.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import androidx.annotation.Keep
44
import java.io.Serializable
55

66
@Keep
7-
data class ChainConfig(
7+
data class ChainsConfig(
88
@Keep val chainNamespace: ChainNamespace = ChainNamespace.EIP155,
99
@Keep val decimals: Int? = 18,
1010
@Keep val blockExplorerUrl: String? = null,

0 commit comments

Comments
 (0)