Skip to content

Commit

Permalink
PLT-6163: Tags in client API
Browse files Browse the repository at this point in the history
  • Loading branch information
yveshauser committed Jun 19, 2023
1 parent 6ee9595 commit 7cc35c7
Showing 1 changed file with 5 additions and 15 deletions.
20 changes: 5 additions & 15 deletions src/Marlowe/Runtime/Web/Types.purs
Original file line number Diff line number Diff line change
Expand Up @@ -300,21 +300,11 @@ instance EncodeJson Tags where
<<< un Tags

instance DecodeJson Tags where
decodeJson _ = Right mempty

-- FIXME: properly decode Tags
{-
decodeJson json = do
(obj :: Object Metadata) <- decodeJson json
(arr :: Array (String /\ Metadata)) <- for (Object.toUnfoldable obj) \(idx /\ value) -> do
idx' <- do
let
err = TypeMismatch $ "Expecting an integer metadata label but got: " <> show idx
note err (Just idx)
pure (idx' /\ value)
pure <<< Tags <<< Map.fromFoldable $ arr
-}
decodeJson json = do
(obj :: Object Metadata) <- decodeJson json
let
(arr :: Array (String /\ Metadata)) = Object.toUnfoldable obj
pure <<< Tags <<< Map.fromFoldable $ arr

type ContractHeadersRowBase r =
( contractId :: TxOutRef
Expand Down

0 comments on commit 7cc35c7

Please sign in to comment.