From b0e476a81cebd769519cba7e0e58bdf9ba96c987 Mon Sep 17 00:00:00 2001 From: Hongrui Fang Date: Mon, 28 Nov 2022 22:19:44 +0800 Subject: [PATCH] fix delegatee auth check --- agora/Agora/Stake/Scripts.hs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/agora/Agora/Stake/Scripts.hs b/agora/Agora/Stake/Scripts.hs index 7c3d9c7..270eea3 100644 --- a/agora/Agora/Stake/Scripts.hs +++ b/agora/Agora/Stake/Scripts.hs @@ -414,13 +414,16 @@ mkStakeValidator impl sstSymbol pstClass gtClass = # firstStakeInputDatumF.owner delegateSignsTransaction = - ( authCheckHelperF.allOwnByOrDelegatedToTheFirstOwner - #|| authCheckHelperF.allOwnByOrDelegatedToTheFirstDelegatee + ( authCheckHelperF.allOwnByOrDelegatedToTheFirstDelegatee + #&& pmaybeData + # pconstant False + # plam ((authorizedBy #) . pfromData) + # pfromData firstStakeInputDatumF.delegatedTo ) - #&& pmaybeData - # pconstant False - # plam ((authorizedBy #) . pfromData) - # pfromData firstStakeInputDatumF.delegatedTo + #|| ( authCheckHelperF.allOwnByOrDelegatedToTheFirstOwner + #&& authorizedBy + # firstStakeInputDatumF.owner + ) signedBy = pif