Skip to content

Commit

Permalink
use startsWith for prefix instead of contains
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Tate <ryan.tate@spruceid.com>
  • Loading branch information
Ryanmtate committed Oct 21, 2024
1 parent c7cef01 commit 798a352
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,8 @@ fun DispatchQRView(
val scope = rememberCoroutineScope()

fun onRead(url: String) {
println("Reading URL: $url")

scope.launch {
if (url.contains(OPEN_ID4VP_SCHEME)) {
if (url.startsWith(OPEN_ID4VP_SCHEME)) {
val encodedUrl = URLEncoder.encode(url, StandardCharsets.UTF_8.toString())

navController.navigate("oid4vp/$encodedUrl") {
Expand Down

0 comments on commit 798a352

Please sign in to comment.