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 82bf20c5c1
commit e3143629fd

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'.