countingVote,create,startVoting to execute,create,vote
Let's embrace consistancy between Haskell types and Plutarch types.
This commit is contained in:
parent
014ef050d2
commit
8e9dd16613
7 changed files with 18 additions and 18 deletions
|
|
@ -185,7 +185,7 @@ invalidNewGovernorDatum =
|
|||
GovernorDatum
|
||||
{ proposalThresholds =
|
||||
def
|
||||
{ countVoting = Tagged (-1)
|
||||
{ vote = Tagged (-1)
|
||||
}
|
||||
, nextProposalId = ProposalId 42
|
||||
, proposalTimings = def
|
||||
|
|
|
|||
|
|
@ -532,7 +532,7 @@ advanceProposalSuccess params =
|
|||
outcome0WinningVotes =
|
||||
ProposalVotes $
|
||||
updateMap
|
||||
(\_ -> Just $ untag (def :: ProposalThresholds).countVoting + 1)
|
||||
(\_ -> Just $ untag (def :: ProposalThresholds).vote + 1)
|
||||
(ResultTag 0)
|
||||
emptyVotes'
|
||||
|
||||
|
|
@ -611,7 +611,7 @@ advanceProposalFailureTimeout params =
|
|||
outcome0WinningVotes =
|
||||
ProposalVotes $
|
||||
updateMap
|
||||
(\_ -> Just $ untag (def :: ProposalThresholds).countVoting + 1)
|
||||
(\_ -> Just $ untag (def :: ProposalThresholds).vote + 1)
|
||||
(ResultTag 0)
|
||||
emptyVotes'
|
||||
|
||||
|
|
@ -720,7 +720,7 @@ advanceFinishedPropsoal =
|
|||
outcome0WinningVotes =
|
||||
ProposalVotes $
|
||||
AssocMap.fromList
|
||||
[ (ResultTag 0, untag (def :: ProposalThresholds).countVoting + 1)
|
||||
[ (ResultTag 0, untag (def :: ProposalThresholds).vote + 1)
|
||||
, (ResultTag 1, 0)
|
||||
]
|
||||
|
||||
|
|
|
|||
|
|
@ -189,9 +189,9 @@ proposalValidatorAddress = scriptHashAddress proposalValidatorHash
|
|||
instance Default ProposalThresholds where
|
||||
def =
|
||||
ProposalThresholds
|
||||
{ countVoting = Tagged 1000
|
||||
{ execute = Tagged 1000
|
||||
, create = Tagged 1
|
||||
, startVoting = Tagged 10
|
||||
, vote = Tagged 10
|
||||
}
|
||||
|
||||
authorityToken :: AuthorityToken
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue