I'm trying to implement lock and withdraw of an NFT, but when I tried to check the signer on-chain with the function:
signer :: PubKeyHash
signer = case txInfoSignatories (scriptContextTxInfo ctx) of
[pkh] -> pkh
_ -> traceError "Signer could not be found."
It gets always signer could not be found. Why it is not found? It worked on playground until today, but I don't know if there were some updates on plutus.