Skip to content

Commit

Permalink
Make mkCommand and mkUnsignedCommand stop producing empty verifier lists
Browse files Browse the repository at this point in the history
  • Loading branch information
edmundnoble committed Nov 7, 2023
1 parent 1300a42 commit e1cfd21
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Pact/Types/Command.hs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ mkCommand
mkCommand creds vers meta nonce nid rpc = mkCommand' creds encodedPayload
where
encodedPayload = J.encodeStrict $ toLegacyJsonViaEncode payload
payload = Payload rpc nonce meta (keyPairsToSigners creds) (Just vers) nid
payload = Payload rpc nonce meta (keyPairsToSigners creds) (if null vers then Nothing else Just vers) nid

keyPairToSigner :: Ed25519KeyPair -> [MsgCapability] -> Signer
keyPairToSigner cred caps = Signer scheme pub addr caps
Expand Down Expand Up @@ -175,7 +175,7 @@ mkUnsignedCommand
-> IO (Command ByteString)
mkUnsignedCommand signers vers meta nonce nid rpc = mkCommand' [] encodedPayload
where encodedPayload = J.encodeStrict payload
payload = Payload rpc nonce meta signers (Just vers) nid
payload = Payload rpc nonce meta signers (if null vers then Nothing else Just vers) nid

signHash :: TypedHash h -> Ed25519KeyPair -> IO UserSig
signHash hsh (pub,priv) = UserSig . toB16Text <$> sign pub priv (toUntypedHash hsh)
Expand Down

0 comments on commit e1cfd21

Please sign in to comment.