Skip to content

Commit

Permalink
marlowe: Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
j-mueller committed Oct 11, 2021
1 parent 89c5c59 commit ca4311c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions marlowe/src/Language/Marlowe/Client.hs
Expand Up @@ -42,8 +42,9 @@ import Language.Marlowe.Scripts
import Language.Marlowe.Semantics hiding (Contract)
import qualified Language.Marlowe.Semantics as Marlowe
import Language.Marlowe.Util (extractContractRoles)
import Ledger (CurrencySymbol, Datum (..), PubKeyHash, Slot (..), TokenName, TxOut (..),
inScripts, pubKeyHash, txOutValue)
import Ledger (CurrencySymbol, Datum (..), PubKeyHash, Slot (..),
TokenName, TxOut (..), ValidatorHash, inScripts,
txOutValue)
import qualified Ledger
import Ledger.Ada (adaSymbol, adaValueOf)
import Ledger.Address (pubKeyHashAddress, scriptHashAddress)
Expand All @@ -54,7 +55,7 @@ import qualified Ledger.Typed.Scripts as Scripts
import Ledger.Typed.Tx (TypedScriptTxOut (..), tyTxOutData)
import qualified Ledger.Value as Val
import Plutus.ChainIndex (_ValidTx, citxInputs, citxOutputs, citxTxId)
import Plutus.Contract
import Plutus.Contract as Contract
import Plutus.Contract.StateMachine (AsSMContractError (..), StateMachineClient (..), Void,
WaitingResult (..))
import qualified Plutus.Contract.StateMachine as SM
Expand Down Expand Up @@ -387,8 +388,7 @@ setupMarloweParams
-> Contract MarloweContractState s e
(MarloweParams, TxConstraints i o, ScriptLookups (SM.StateMachine MarloweData MarloweInput))
setupMarloweParams owners contract = mapError (review _MarloweError) $ do
creator <- pubKeyHash <$> ownPubKey
let ownAddress = pubKeyHashAddress creator
ownAddress <- pubKeyHashAddress <$> Contract.ownPubKeyHash
let roles = extractContractRoles contract
if Set.null roles
then do
Expand Down Expand Up @@ -527,7 +527,7 @@ marloweCompanionContract = checkExistingRoleTokens
where
checkExistingRoleTokens = do
-- Get the existing unspend outputs of the wallet that activated the companion contract
pkh <- pubKeyHash <$> ownPubKey
pkh <- Contract.ownPubKeyHash
let ownAddress = pubKeyHashAddress pkh
-- Filter those outputs for role tokens and notify the WebSocket subscribers
-- NOTE: CombinedWSStreamToServer has an API to subscribe to WS notifications
Expand Down
2 changes: 1 addition & 1 deletion marlowe/test/Spec/Marlowe/Common.hs
Expand Up @@ -332,7 +332,7 @@ shrinkContract cont = case cont of

pangramContract :: Contract
pangramContract = let
alicePk = PK $ pubKeyHash $ walletPubKey $ knownWallet 1
alicePk = PK $ walletPubKeyHash $ knownWallet 1
aliceAcc = alicePk
bobRole = Role "Bob"
constant = Constant 100
Expand Down

0 comments on commit ca4311c

Please sign in to comment.