This commit is contained in:
Vlad Stan 2024-11-06 11:50:21 +02:00 committed by GitHub
parent 83c94e94db
commit 0fc26d096f
52 changed files with 6684 additions and 3120 deletions

View file

@ -23,7 +23,7 @@ function imgSizeFit(img, maxWidth = 1024, maxHeight = 768) {
maxWidth / img.naturalWidth,
maxHeight / img.naturalHeight
)
return { width: img.naturalWidth * ratio, height: img.naturalHeight * ratio }
return {width: img.naturalWidth * ratio, height: img.naturalHeight * ratio}
}
async function hash(string) {
@ -125,7 +125,7 @@ function isValidImageUrl(string) {
function isValidKey(key, prefix = 'n') {
try {
if (key && key.startsWith(prefix)) {
let { _, data } = NostrTools.nip19.decode(key)
let {_, data} = NostrTools.nip19.decode(key)
key = data
}
return isValidKeyHex(key)
@ -143,4 +143,4 @@ function formatCurrency(value, currency) {
style: 'currency',
currency: currency
}).format(value)
}
}