do not store lnurl comments below amount threshold (#493)

This commit is contained in:
callebtc
2023-11-23 11:59:35 -03:00
committed by GitHub
parent 8b2fb73fe8
commit 0be3d26e56
+4
View File
@@ -267,6 +267,10 @@ func (w Lnurl) serveLNURLpSecond(username string, amount_msat int64, comment str
Reason: fmt.Sprintf("Comment too long (max: %d characters).", CommentAllowed)},
}, fmt.Errorf("comment too long")
}
// get rid of LNURL spam
if amount_msat < 21_000 {
comment = ""
}
user, tx := db.FindUser(w.database, username)
if tx.Error != nil {
return &lnurl.LNURLPayValues{