chore: media server protocol fix, removed npub cash

This commit is contained in:
Davinci 2024-05-13 10:11:39 +02:00
parent 1fbc2414fe
commit 2221b22285
2 changed files with 1 additions and 17 deletions

View File

@ -34,7 +34,7 @@ export class ApiController {
const endpointUrl = 'v1/media' const endpointUrl = 'v1/media'
const tags = [ 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'], ['method', 'POST'],
['payload', this.hashString('{}')] ['payload', this.hashString('{}')]
] ]

View File

@ -83,10 +83,6 @@ export const ProfilePage = () => {
metadataState as VerifiedEvent metadataState as VerifiedEvent
) )
if (metadataContent) { if (metadataContent) {
if (!metadataContent.lud16 || metadataContent.lud16.length < 1) {
metadataContent.lud16 = getLud16()
}
setProfileMetadata(metadataContent) setProfileMetadata(metadataContent)
setIsLoading(false) setIsLoading(false)
} }
@ -107,10 +103,6 @@ export const ProfilePage = () => {
const metadataContent = const metadataContent =
metadataController.extractProfileMetadataContent(metadataEvent) metadataController.extractProfileMetadataContent(metadataEvent)
if (metadataContent) { if (metadataContent) {
if (!metadataContent.lud16 || metadataContent.lud16.length < 1) {
metadataContent.lud16 = getLud16()
}
setProfileMetadata(metadataContent) setProfileMetadata(metadataContent)
} }
} }
@ -122,14 +114,6 @@ export const ProfilePage = () => {
} }
}, [isUsersOwnProfile, metadataState, pubkey, metadataController]) }, [isUsersOwnProfile, metadataState, pubkey, metadataController])
const getLud16 = () => {
let lud16 = ''
if (npub) lud16 = `${npub}@npub.cash`
return lud16
}
const editItem = ( const editItem = (
key: keyof ProfileMetadata, key: keyof ProfileMetadata,
label: string, label: string,