Skip to content

Commit

Permalink
Merge pull request #593 from Concordium/fix-sto-json
Browse files Browse the repository at this point in the history
Fix JSON serialization of SpeicalTransacationOutcome
  • Loading branch information
td202 authored Jan 17, 2025
2 parents 4da594d + b9320b4 commit 6f6d108
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion haskell-src/Concordium/Types/Transactions.hs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import Data.Aeson (FromJSON (..), ToJSON (..))
import qualified Data.Aeson as AE
import Data.Aeson.TH
import qualified Data.ByteString as BS
import Data.Char (isLower)
import Data.List (foldl')
import qualified Data.Map.Strict as Map
import qualified Data.Serialize as S
Expand Down Expand Up @@ -762,7 +763,7 @@ data SpecialTransactionOutcome
}
deriving (Show, Eq)

$(deriveJSON defaultOptions{fieldLabelModifier = firstLower . drop 3} ''SpecialTransactionOutcome)
$(deriveJSON defaultOptions{fieldLabelModifier = firstLower . dropWhile isLower} ''SpecialTransactionOutcome)

instance HashableTo H.Hash SpecialTransactionOutcome where
getHash = H.hash . S.encode
Expand Down

0 comments on commit 6f6d108

Please sign in to comment.