fix: when decrypting file, have better error messages #17

Merged
b merged 11 commits from issue-11 into main 2024-05-14 15:09:01 +00:00
2 changed files with 1 additions and 17 deletions
Showing only changes of commit 2221b22285 - Show all commits

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,