Skip to content

Commit

Permalink
fix:ensures PascalCase on State handler
Browse files Browse the repository at this point in the history
  • Loading branch information
vilenarios committed Jun 24, 2024
1 parent 09e2985 commit 480ea3b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
20 changes: 10 additions & 10 deletions src/common/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -376,16 +376,16 @@ function ant.init()
)
Handlers.add(camel(ActionMap.State), utils.hasMatchingTag("Action", ActionMap.State), function(msg)
local state = {
records = Records,
controllers = Controllers,
balances = Balances,
owner = Owner,
name = Name,
ticker = Ticker,
logo = Logo,
denomination = Denomination,
totalSupply = TotalSupply,
initialized = Initialized,
Records = Records,
Controllers = Controllers,
Balances = Balances,
Owner = Owner,
Name = Name,
Ticker = Ticker,
Logo = Logo,
Denomination = Denomination,
TotalSupply = TotalSupply,
Initialized = Initialized,
}
ao.send({ Target = msg.From, Action = "State-Notice", Data = json.encode(state) })
end)
Expand Down
12 changes: 6 additions & 6 deletions test/info.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@ describe('aos Info', async () => {

const state = JSON.parse(result.Messages[0].Data);
assert(state);
assert(state.balances);
assert(state.records);
assert(state.controllers);
assert(state.owner);
assert(state.ticker);
assert(state.name);
assert(state.Balances);
assert(state.Records);
assert(state.Controllers);
assert(state.Owner);
assert(state.Ticker);
assert(state.Name);
});
});

0 comments on commit 480ea3b

Please sign in to comment.