avoid #>>>
This commit is contained in:
parent
aff8658790
commit
90c1e6b076
2 changed files with 9 additions and 8 deletions
|
|
@ -52,7 +52,7 @@ import Plutarch.Api.V2 (
|
|||
PValidator,
|
||||
)
|
||||
import Plutarch.Extra.AssetClass (passetClass, passetClassValueOf)
|
||||
import Plutarch.Extra.Category (PCategory (pidentity), PSemigroupoid ((#>>>)))
|
||||
import Plutarch.Extra.Category (PCategory (pidentity))
|
||||
import Plutarch.Extra.Comonad (pextract)
|
||||
import Plutarch.Extra.Field (pletAll, pletAllC)
|
||||
import "liqwid-plutarch-extra" Plutarch.Extra.List (pfindJust)
|
||||
|
|
@ -324,7 +324,7 @@ proposalValidator as maximumCosigners =
|
|||
plam $
|
||||
let stakeInputs =
|
||||
pmapMaybe
|
||||
# (pfield @"resolved" #>>> getStakeDatum)
|
||||
# plam ((getStakeDatum #) . (pfield @"resolved" #))
|
||||
# pfromData txInfoF.inputs
|
||||
|
||||
ctx = pcon $ PStakeInputsContext stakeInputs
|
||||
|
|
|
|||
|
|
@ -83,7 +83,6 @@ import Plutarch.Extra.AssetClass (
|
|||
passetClassValueOf,
|
||||
pvalueOf,
|
||||
)
|
||||
import Plutarch.Extra.Category (PSemigroupoid ((#>>>)))
|
||||
import Plutarch.Extra.Field (pletAll)
|
||||
import Plutarch.Extra.Functor (PFunctor (pfmap))
|
||||
import "liqwid-plutarch-extra" Plutarch.Extra.List (pfindJust)
|
||||
|
|
@ -319,7 +318,7 @@ mkStakeValidator
|
|||
stakeInputDatums <-
|
||||
pletC $
|
||||
pmapMaybe
|
||||
# ((pfield @"resolved") #>>> getStakeDatum)
|
||||
# plam ((getStakeDatum #) . (pfield @"resolved" #))
|
||||
# pfromData txInfoF.inputs
|
||||
|
||||
--------------------------------------------------------------------------
|
||||
|
|
@ -335,14 +334,16 @@ mkStakeValidator
|
|||
pguardC "All input stakes have the same owner or delegate" $
|
||||
let allHaveSameOwner =
|
||||
pall
|
||||
# ( (pfield @"owner")
|
||||
#>>> plam (#== firstStakeInputDatumF.owner)
|
||||
# plam
|
||||
( (#== firstStakeInputDatumF.owner)
|
||||
. (pfield @"owner" #)
|
||||
)
|
||||
# restOfStakeInputDatums
|
||||
allHaveSameDelegate =
|
||||
pall
|
||||
# ( (pfield @"delegatedTo")
|
||||
#>>> plam (#== firstStakeInputDatumF.delegatedTo)
|
||||
# plam
|
||||
( (#== firstStakeInputDatumF.delegatedTo)
|
||||
. (pfield @"delegatedTo" #)
|
||||
)
|
||||
# restOfStakeInputDatums
|
||||
in allHaveSameOwner #|| allHaveSameDelegate
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue