I am trying to update a mapping of the owner's token count when the owner burns a token.
mapping (address => uint) public ownerTokenCount; //# of tokens in wallet
It gets updated here:
_mintToken(owner) {
userTokenCount(owner) = userTokenCount(owner) + 1
_mint;
}
It should update again here but it is not.
_burntoken(owner){
(require userTokenCount(owner) >0); // this throws
userTokenCount(owner) = userTokenCount(owner) - 1;
_burn;
}