Skip to content

Commit 20dcbc3

Browse files
committed
fix: reuse pubky nonce constant
1 parent 46b372d commit 20dcbc3

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

app/src/main/java/to/bitkit/models/PubkyRingAuthCallback.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@ package to.bitkit.models
22

33
import android.net.Uri
44

5+
private const val NONCE_PARAM = "nonce"
6+
57
sealed interface PubkyRingAuthCallback {
68
companion object {
79
private const val BITKIT_SCHEME = "bitkit"
810
private const val PUBKY_AUTH_HOST = "pubky-auth"
911
private const val SUCCESS_PATH = "/success"
1012
private const val CANCEL_PATH = "/cancel"
1113
private const val ERROR_PATH = "/error"
12-
private const val NONCE_PARAM = "nonce"
1314
private const val ERROR_MESSAGE_PARAM = "errorMessage"
1415

1516
fun parse(uri: Uri): PubkyRingAuthCallback? {
@@ -62,7 +63,7 @@ object PubkyRingAuthUrlBuilder {
6263

6364
return Uri.parse(baseUrl)
6465
.buildUpon()
65-
.appendQueryParameter("nonce", nonce)
66+
.appendQueryParameter(NONCE_PARAM, nonce)
6667
.build()
6768
.toString()
6869
}

0 commit comments

Comments
 (0)