parent
cef692b7ec
commit
6d60a68674
11
src/index.ts
11
src/index.ts
|
@ -10,9 +10,10 @@ import {
|
||||||
resolverEmptyResponse,
|
resolverEmptyResponse,
|
||||||
ResolverOptions,
|
ResolverOptions,
|
||||||
resolveSuccess,
|
resolveSuccess,
|
||||||
} from "@lumeweb/resolver-common";
|
ensureUniqueRecords,
|
||||||
import { getTld } from "@lumeweb/resolver-common";
|
DNSRecord,
|
||||||
import { DNSRecord } from "@lumeweb/resolver-common";
|
getTld,
|
||||||
|
} from "@lumeweb/libresolver";
|
||||||
|
|
||||||
const HIP5_EXTENSIONS = ["eth", "_eth"];
|
const HIP5_EXTENSIONS = ["eth", "_eth"];
|
||||||
|
|
||||||
|
@ -120,9 +121,7 @@ export default class Handshake extends AbstractResolverModule {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
records = [
|
records = ensureUniqueRecords(records);
|
||||||
...new Set(records.map((item: DNSRecord) => JSON.stringify(item))),
|
|
||||||
].map((item) => JSON.parse(item));
|
|
||||||
|
|
||||||
if (0 < records.length) {
|
if (0 < records.length) {
|
||||||
return resolveSuccess(records);
|
return resolveSuccess(records);
|
||||||
|
|
Loading…
Reference in New Issue