Fix type in redeemCode function