From 2221b22285def582b924ba63c851e1b4695d7443 Mon Sep 17 00:00:00 2001 From: Davinci Date: Mon, 13 May 2024 10:11:39 +0200 Subject: [PATCH] chore: media server protocol fix, removed npub cash --- src/controllers/ApiController.ts | 2 +- src/pages/profile/index.tsx | 16 ---------------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/src/controllers/ApiController.ts b/src/controllers/ApiController.ts index 83fd0c7..e2cdace 100644 --- a/src/controllers/ApiController.ts +++ b/src/controllers/ApiController.ts @@ -34,7 +34,7 @@ export class ApiController { const endpointUrl = 'v1/media' const tags = [ - ['u', `${mediaUrl}/${endpointUrl}`.replace('https', 'http')], //nostrcheck api, gets http protocol because it is inside a docker container in localhost + ['u', `${mediaUrl}/${endpointUrl}`], ['method', 'POST'], ['payload', this.hashString('{}')] ] diff --git a/src/pages/profile/index.tsx b/src/pages/profile/index.tsx index d444a60..18927b0 100644 --- a/src/pages/profile/index.tsx +++ b/src/pages/profile/index.tsx @@ -83,10 +83,6 @@ export const ProfilePage = () => { metadataState as VerifiedEvent ) if (metadataContent) { - if (!metadataContent.lud16 || metadataContent.lud16.length < 1) { - metadataContent.lud16 = getLud16() - } - setProfileMetadata(metadataContent) setIsLoading(false) } @@ -107,10 +103,6 @@ export const ProfilePage = () => { const metadataContent = metadataController.extractProfileMetadataContent(metadataEvent) if (metadataContent) { - if (!metadataContent.lud16 || metadataContent.lud16.length < 1) { - metadataContent.lud16 = getLud16() - } - setProfileMetadata(metadataContent) } } @@ -122,14 +114,6 @@ export const ProfilePage = () => { } }, [isUsersOwnProfile, metadataState, pubkey, metadataController]) - const getLud16 = () => { - let lud16 = '' - - if (npub) lud16 = `${npub}@npub.cash` - - return lud16 - } - const editItem = ( key: keyof ProfileMetadata, label: string,