Skip to content

Commit 1a45252

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

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,8 @@ class Web3Auth(web3AuthOptions: Web3AuthOptions, context: Context) : WebViewResu
258258
val b64ParamString = decodeBase64URLString(b64Params).toString(Charsets.UTF_8)
259259

260260
if (b64ParamString.contains("actionType")) {
261+
if (::manageMfaCompletableFuture.isInitialized)
262+
manageMfaCompletableFuture.complete(true)
261263
return
262264
}
263265

@@ -300,9 +302,6 @@ class Web3Auth(web3AuthOptions: Web3AuthOptions, context: Context) : WebViewResu
300302

301303
if (::enableMfaCompletableFuture.isInitialized)
302304
enableMfaCompletableFuture.complete(true)
303-
304-
if (::manageMfaCompletableFuture.isInitialized)
305-
manageMfaCompletableFuture.complete(true)
306305
}
307306
} else {
308307
print(error)

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,13 @@ data class Web3AuthOptions(
1717
var walletSdkUrl: String? = getWalletSdkUrl(buildEnv),
1818
var dashboardUrl: String? = getDashBoardUrl(buildEnv),
1919
var originData: Map<String, String>? = null
20-
)
20+
) {
21+
init {
22+
if (dashboardUrl == null) {
23+
dashboardUrl = getDashBoardUrl(buildEnv)
24+
}
25+
}
26+
}
2127

2228
fun getSdkUrl(buildEnv: BuildEnv?): String {
2329
val sdkUrl: String = when (buildEnv) {

0 commit comments

Comments
 (0)