make sure all stakes are burnt while destroying stakes

This commit is contained in:
Hongrui Fang 2022-10-24 23:41:39 +08:00
parent cbab587604
commit 3fef9d221c
No known key found for this signature in database
GPG key ID: F10AB2CCE24113DD

View file

@ -351,9 +351,12 @@ pdestroy = phoistAcyclic $
pguardC "Owner signs this transaction" $
pisSignedBy # pconstant False # ctx
pguardC "Stake unlocked" $
pguardC "All stakes unlocked" $
pnot #$ pany # pstakeLocked # ctxF.stakeInputDatums
pguardC "All stakes burnt" $
pnull # ctxF.stakeOutputDatums
pure $ pconstant ()
{- | Default implementation of 'Agora.Stake.DepositWithdraw'.