File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ module BotPlutusInterface.UtxoParser (
99import Control.Applicative (many , (<|>) )
1010import Control.Monad (mzero , void )
1111import Data.Aeson.Extras (tryDecode )
12+ import Data.Attoparsec.ByteString.Char8 (isSpace )
1213import Data.Attoparsec.Text (
1314 Parser ,
1415 char ,
@@ -22,8 +23,8 @@ import Data.Attoparsec.Text (
2223 signed ,
2324 skipSpace ,
2425 skipWhile ,
25- takeWhile ,
2626 string ,
27+ takeWhile ,
2728 (<?>) ,
2829 )
2930import Data.Text (Text )
@@ -41,7 +42,7 @@ import Plutus.V1.Ledger.Api (
4142 BuiltinByteString ,
4243 Credential (PubKeyCredential , ScriptCredential ),
4344 CurrencySymbol (.. ),
44- TokenName (.. ),
45+ TokenName (.. ),
4546 )
4647import PlutusTx.Builtins (toBuiltin )
4748import Prelude hiding (takeWhile )
@@ -107,8 +108,8 @@ tokenNameParser = do
107108 where
108109 tokenName = do
109110 void $ char ' .'
110- void $ (string " 0x" <|> string " " )
111- TokenName <$> decodeHash (takeWhile (not . inClass " " ))
111+ void (string " 0x" ) <|> pure ( )
112+ TokenName <$> decodeHash (takeWhile (not . isSpace ))
112113
113114datumHashNoneParser :: Parser ()
114115datumHashNoneParser = " TxOutDatumNone" >> pure ()
You can’t perform that action at this time.
0 commit comments