kopia lustrzana https://github.com/vitorpamplona/amethyst
Unnecessary Regex compile
rodzic
0c96d0a3fd
commit
38c17f9024
|
@ -26,8 +26,6 @@ fun HexKey.toDisplayHexKey(): String {
|
|||
}
|
||||
|
||||
fun decodePublicKey(key: String): ByteArray {
|
||||
val pattern = Pattern.compile(".+@.+\\.[a-z]+")
|
||||
|
||||
return if (key.startsWith("nsec")) {
|
||||
Persona(privKey = key.bechToBytes()).pubKey
|
||||
} else if (key.startsWith("npub")) {
|
||||
|
|
Ładowanie…
Reference in New Issue