mirror of
https://github.com/fiatjaf/nak.git
synced 2025-12-12 18:18:50 +00:00
do not act on input blank.
This commit is contained in:
@@ -12,7 +12,8 @@ type Result = Either[
|
||||
]
|
||||
|
||||
object Parser {
|
||||
def parseInput(input: String): Result =
|
||||
def parseInput(input: String): Result = if input == "" then Left("")
|
||||
else
|
||||
ByteVector
|
||||
.fromHex(input)
|
||||
.flatMap(b => Try(Right(ByteVector32(b))).toOption)
|
||||
|
||||
Reference in New Issue
Block a user