Compare commits

...

3 Commits

Author SHA1 Message Date
k00b 11ac605cd9 fix clicking on p2p in satistics 2024-08-14 12:59:27 -05:00
k00b 71b639be5d reduce p2p max 2024-08-14 12:11:08 -05:00
ekzyis 56d55027ab
Fix freebie comment edits like a post (#1298) 2024-08-14 09:31:52 -05:00
3 changed files with 8 additions and 3 deletions

View File

@ -1288,9 +1288,12 @@ export const updateItem = async (parent, { sub: subName, forward, ...item }, { m
item.url = removeTracking(item.url)
}
// prevent editing a bio like a regular item
if (old.bio) {
// prevent editing a bio like a regular item
item = { id: Number(item.id), text: item.text, title: `@${user.name}'s bio`, userId: me.id }
} else if (old.parentId) {
// prevent editing a comment like a post
item = { id: Number(item.id), text: item.text, userId: me.id }
} else {
item = { subName, userId: me.id, ...item }
item.forwardUsers = await getForwardUsers(models, forward)

View File

@ -131,9 +131,11 @@ function Detail ({ fact }) {
try {
zap = JSON.parse(fact.description)
} catch { }
const pathRoot = fact.type === 'p2p' ? 'withdrawal' : fact.type
return (
<div className='px-3'>
<Link className={satusClass(fact.status)} href={`/${fact.type}s/${fact.id}`}>
<Link className={satusClass(fact.status)} href={`/${pathRoot}s/${fact.id}`}>
{(!fact.bolt11 && <span className='d-block text-muted fw-bold fst-italic'>invoice deleted</span>) ||
(zap && <span className='d-block'>nostr zap{zap.content && `: ${zap.content}`}</span>) ||
(fact.description && <span className='d-block'>{fact.description}</span>)}

View File

@ -3,7 +3,7 @@ import { estimateRouteFee } from '../api/lnd'
import { toPositiveNumber } from '@/lib/validate'
const MIN_OUTGOING_MSATS = BigInt(900) // the minimum msats we'll allow for the outgoing invoice
const MAX_OUTGOING_MSATS = BigInt(9_000_000_000) // the maximum msats we'll allow for the outgoing invoice
const MAX_OUTGOING_MSATS = BigInt(900_000_000) // the maximum msats we'll allow for the outgoing invoice
const MAX_EXPIRATION_INCOMING_MSECS = 900_000 // the maximum expiration time we'll allow for the incoming invoice
const INCOMING_EXPIRATION_BUFFER_MSECS = 300_000 // the buffer enforce for the incoming invoice expiration
const MAX_OUTGOING_CLTV_DELTA = 500 // the maximum cltv delta we'll allow for the outgoing invoice