@tradetrust-tt/dnsprove 2.14.0 → 2.14.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.test.ts +15 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tradetrust-tt/dnsprove",
3
- "version": "2.14.0",
3
+ "version": "2.14.1",
4
4
  "description": "Helper utility for retrieving OpenAttestations document store address records from DNS",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
package/src/index.test.ts CHANGED
@@ -338,10 +338,24 @@ describe("getDocumentStoreRecords for Astron", () => {
338
338
  addr: "0x0D5da59B93e8AC9b1781CE5694fbcE626586F4c9",
339
339
  dnssec: false,
340
340
  },
341
+ {
342
+ type: "openatts",
343
+ net: "ethereum",
344
+ netId: "1338",
345
+ addr: "0x94FD21A026E29E0686583b8be71Cb28a8ca1A8d4",
346
+ dnssec: false,
347
+ },
341
348
  ];
342
349
 
343
350
  test("it should work with astronlayer2.bitfactory.cn", async () => {
344
- const records = await getDocumentStoreRecords("astronlayer2.bitfactory.cn");
351
+ const records = (await getDocumentStoreRecords("astronlayer2.bitfactory.cn")).sort((a, b) => {
352
+ if (a.netId < b.netId) return -1;
353
+ if (a.netId > b.netId) return 1;
354
+ if (a.addr < b.addr) return -1;
355
+ if (a.addr > b.addr) return 1;
356
+ return 0;
357
+ });
358
+
345
359
  expect(records).toStrictEqual(sampleDnsTextRecord);
346
360
  });
347
361
  });