From bf817107113045a90da1b16d314f8c510ee27ead Mon Sep 17 00:00:00 2001 From: atticusofsparta Date: Thu, 27 Jun 2024 19:33:22 -0600 Subject: [PATCH 1/2] fix(info): add data to info so sdk can read --- src/main.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main.lua b/src/main.lua index 30d065db..f7c1f3ac 100644 --- a/src/main.lua +++ b/src/main.lua @@ -952,6 +952,7 @@ Handlers.add(ActionMap.Info, Handlers.utils.hasMatchingTag("Action", ActionMap.I Target = msg.From, Action = "Info-Notice", Tags = { Name = Name, Ticker = Ticker, Logo = Logo, Denomination = tostring(Denomination) }, + Data = json.encode({ Name = Name, Ticker = Ticker, Logo = Logo, Denomination = Denomination }), }) end) From 5d1d626daa0377471cc9e197d06cf9b9e2e55256 Mon Sep 17 00:00:00 2001 From: atticusofsparta Date: Thu, 27 Jun 2024 19:35:07 -0600 Subject: [PATCH 2/2] chore(test): test token info returns in data --- test/arns.test.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/arns.test.js b/test/arns.test.js index e6b37d62..a077a629 100644 --- a/test/arns.test.js +++ b/test/arns.test.js @@ -21,6 +21,14 @@ describe('ArNS', async () => { ); } + it('should get token info', async () => { + const result = await handle({ + Tags: [{ name: 'Action', value: 'Info' }], + }); + const tokenInfo = JSON.parse(result.Messages[0].Data); + assert(tokenInfo); + }); + it('should buy a record', async () => { const buyRecordResult = await handle({ Tags: [