Skip to content

Commit

Permalink
fix(balance): fix tag check for balance (#285)
Browse files Browse the repository at this point in the history
  • Loading branch information
dtfiedler authored Dec 18, 2024
2 parents 54d3f5e + 9b19c7d commit e69a144
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1840,17 +1840,17 @@ addEventingHandler(ActionMap.Balances, Handlers.utils.hasMatchingTag("Action", A
end)

addEventingHandler(ActionMap.Balance, Handlers.utils.hasMatchingTag("Action", ActionMap.Balance), function(msg)
local target = msg.Tags.Target or msg.Tags.Address or msg.From
local target = msg.Tags.Target or msg.Tags.Address or msg.Tags.Recipient or msg.From
local balance = balances.getBalance(target)

-- must adhere to token.lua spec for arconnect compatibility
Send(msg, {
Target = msg.From,
Action = "Balance-Notice",
Account = msg.Tags.Address or msg.Tags.Recipient or msg.From,
Data = balance,
Balance = tostring(balance),
Ticker = Ticker,
Address = target,
})
end)

Expand Down

0 comments on commit e69a144

Please sign in to comment.