add min ada to both stake input and output
This commit is contained in:
parent
14a8b9eece
commit
13225cb447
1 changed files with 6 additions and 5 deletions
|
|
@ -331,7 +331,12 @@ voteOnProposal params =
|
||||||
stakeInput =
|
stakeInput =
|
||||||
TxOut
|
TxOut
|
||||||
{ txOutAddress = stakeAddress
|
{ txOutAddress = stakeAddress
|
||||||
, txOutValue = sst <> Value.assetClassValue (untag stake.gtClassRef) params.voteCount
|
, txOutValue =
|
||||||
|
mconcat
|
||||||
|
[ sst
|
||||||
|
, Value.assetClassValue (untag stake.gtClassRef) params.voteCount
|
||||||
|
, minAda
|
||||||
|
]
|
||||||
, txOutDatumHash = Just $ toDatumHash stakeInputDatum
|
, txOutDatumHash = Just $ toDatumHash stakeInputDatum
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -374,10 +379,6 @@ voteOnProposal params =
|
||||||
stakeOutput =
|
stakeOutput =
|
||||||
stakeInput
|
stakeInput
|
||||||
{ txOutDatumHash = Just $ toDatumHash stakeOutputDatum
|
{ txOutDatumHash = Just $ toDatumHash stakeOutputDatum
|
||||||
-- We won't include the minimum Ada in the output value
|
|
||||||
-- due to how we check the output value in the stake validator.
|
|
||||||
-- The implementation is correct though, it should work in a
|
|
||||||
-- real on-chain environment.
|
|
||||||
}
|
}
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue