mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-06-29 22:00:41 +02:00
Unnecessary Regex compile
This commit is contained in:
@ -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")) {
|
||||
|
Reference in New Issue
Block a user