Skip to content

Commit

Permalink
aligning to new Script developments
Browse files Browse the repository at this point in the history
  • Loading branch information
paweljakubas committed Jan 27, 2021
1 parent 44dcc8c commit 52330b0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/core/src/Cardano/Wallet/Api/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ import Prelude
import Cardano.Address.Derivation
( XPrv, XPub, xpubFromBytes, xpubToBytes )
import Cardano.Address.Script
( Script )
( KeyHash, Script )
import Cardano.Api.Typed
( TxMetadataJsonSchema (..)
, displayError
Expand Down Expand Up @@ -458,7 +458,7 @@ data ApiAddress (n :: NetworkDiscriminant) = ApiAddress

data ApiCredential =
CredentialPubKey ByteString
| CredentialScript Script
| CredentialScript (Script KeyHash)
deriving (Eq, Generic, Show)

data ApiAddressData =
Expand Down
4 changes: 2 additions & 2 deletions lib/core/src/Cardano/Wallet/Primitive/Scripts.hs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ import qualified Data.Map.Strict as Map

isShared
:: (k ~ ShelleyKey, SoftDerivation k)
=> Script
=> Script KeyHash
-> SeqState n k
-> ([k 'ScriptK XPub], SeqState n k)
isShared script (SeqState !s1 !s2 !pending !rpk !prefix !s3) =
Expand Down Expand Up @@ -89,5 +89,5 @@ isShared script (SeqState !s1 !s2 !pending !rpk !prefix !s3) =
insertIf :: Ord k => (v -> Bool) -> k -> v -> Map k v -> Map k v
insertIf predicate k v = if predicate v then Map.insert k v else id

retrieveAllVerKeyHashes :: Script -> [KeyHash]
retrieveAllVerKeyHashes :: Script KeyHash -> [KeyHash]
retrieveAllVerKeyHashes = foldScript (:) []

0 comments on commit 52330b0

Please sign in to comment.