Skip to content

Commit

Permalink
fix(tokengating): update broadcast example
Browse files Browse the repository at this point in the history
  • Loading branch information
bliotti committed May 30, 2024
1 parent eacf291 commit 8b16ae8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/tutorials/begin/tokengating.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ Handlers.add(
"Broadcast",
Handlers.utils.hasMatchingTag("Action", "Broadcast"),
function(m)
-- Set Balances to 0 if it doesn't exist.
if not Balances then Balances = { [ao.id] = 0 } end
if Balances[m.From] == nil or tonumber(Balances[m.From]) < 1 then
print("UNAUTH REQ: " .. m.From)
return
Expand Down

0 comments on commit 8b16ae8

Please sign in to comment.