Skip to content

Commit

Permalink
Filter whitespaces from bech32 stdin
Browse files Browse the repository at this point in the history
  • Loading branch information
Piotr Stachyra committed Nov 4, 2021
1 parent 8044239 commit 791c25b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bech32/app/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ run :: Cmd -> IO ()
run cmd = case cmd of
VersionCmd -> putStrLn $ showVersion version
RunCmd {prefix} -> do
source <- T.decodeUtf8 . B8.filter (/= '\n') <$> B8.hGetContents stdin
source <- T.strip . T.decodeUtf8 <$> B8.hGetContents stdin
case prefix of
Nothing -> runDecode source
Just hrp -> runEncode hrp source
Expand Down

0 comments on commit 791c25b

Please sign in to comment.