Skip to content

Commit

Permalink
syntax improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
imalsogreg committed Sep 1, 2023
1 parent c51989c commit aa4739d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Pact/Types/Crypto.hs
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ instance Scheme (SPPKScheme 'WebAuthn) where
let pactHashText :: T.Text = PactHash.hashToText msg
if pactHashText == challenge
then return ()
else Left $ "Hash mismatch"
else Left "Hash mismatch"

--------- SCHEME HELPER DATA TYPES ---------

Expand Down Expand Up @@ -422,12 +422,12 @@ instance A.FromJSON WebAuthnSignature where
clientDataJSON <- o .: "clientDataJSON"
authenticatorData <- o .: "authenticatorData"
signature <- o .: "signature"
pure $ WebAuthnSignature { clientDataJSON, authenticatorData, signature }
pure $ WebAuthnSignature {..}

-- | This type represents a challenge that was used during
-- a WebAuthn "assertion" flow. For signing Pact payloads, this
-- is the PactHash of a transaction.
data ClientDataJSON = ClientDataJSON {
newtype ClientDataJSON = ClientDataJSON {
challenge :: T.Text
} deriving (Show, Generic)

Expand Down

0 comments on commit aa4739d

Please sign in to comment.