Merge pull request #51 from v0l/snort-nip5
Activate snort.social NIP-5 service
This commit is contained in:
commit
568f110675
@ -68,10 +68,17 @@ export default function Nip5Service(props: Nip05ServiceProps) {
|
||||
}, [props]);
|
||||
|
||||
useEffect(() => {
|
||||
if (handle.length === 0) {
|
||||
setAvailabilityResponse(undefined);
|
||||
}
|
||||
setError(undefined);
|
||||
setAvailabilityResponse(undefined);
|
||||
if (handle && domain) {
|
||||
if(handle.length < (domainConfig?.length[0] ?? 2)) {
|
||||
setAvailabilityResponse({ available: false, why: "TOO_SHORT" });
|
||||
return;
|
||||
}
|
||||
if(handle.length > (domainConfig?.length[1] ?? 20)) {
|
||||
setAvailabilityResponse({ available: false, why: "TOO_LONG" });
|
||||
return;
|
||||
}
|
||||
let rx = new RegExp(domainConfig?.regex[0] ?? "", domainConfig?.regex[1] ?? "");
|
||||
if (!rx.test(handle)) {
|
||||
setAvailabilityResponse({ available: false, why: "REGEX" });
|
||||
|
@ -4,12 +4,13 @@ import './Verification.css'
|
||||
|
||||
export default function VerificationPage() {
|
||||
const services = [
|
||||
/*{
|
||||
{
|
||||
name: "Snort",
|
||||
service: "https://api.snort.social/api/v1/n5sp",
|
||||
link: "https://snort.social/",
|
||||
supportLink: "https://snort.social/help",
|
||||
about: <>Our very own NIP-05 verification service, help support the development of this site and get a shiny special badge on our site!</>
|
||||
},*/
|
||||
},
|
||||
{
|
||||
name: "Nostr Plebs",
|
||||
service: "https://nostrplebs.com/api/v1",
|
||||
|
Loading…
x
Reference in New Issue
Block a user