fix: when decrypting file, have better error messages #17
@ -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('{}')]
|
||||||
]
|
]
|
||||||
|
@ -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,
|
||||||
|
Loading…
Reference in New Issue
Block a user