Skip to content

Commit

Permalink
lower amt
Browse files Browse the repository at this point in the history
  • Loading branch information
benthecarman committed Dec 19, 2024
1 parent 479dcbd commit 34f19a7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ async fn lnurlw_callback_handler(
.and_then(|x| HeaderValue::to_str(x).ok())
.unwrap_or("Unknown");

if state.payments.get_total_payments(x_forwarded_for).await > MAX_SEND_AMOUNT * 10 {
if state.payments.get_total_payments(x_forwarded_for).await > MAX_SEND_AMOUNT {
return Err(Json(json!({"status": "ERROR", "reason": "Incorrect k1"})));
}

Expand Down
2 changes: 1 addition & 1 deletion src/nostr_dms.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ async fn handle_event(event: Event, state: AppState) -> anyhow::Result<()> {
.payments
.get_total_payments(&event.pubkey.to_string())
.await
> MAX_SEND_AMOUNT * 10
> MAX_SEND_AMOUNT
{
return Err(anyhow::anyhow!("Too many payments"));
}
Expand Down
2 changes: 1 addition & 1 deletion src/payments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,6 @@ impl PaymentsByIp {
total += tracker.sum_payments();
}
}
total >= MAX_SEND_AMOUNT * 10 || addr_amt >= MAX_SEND_AMOUNT
total >= MAX_SEND_AMOUNT || addr_amt >= MAX_SEND_AMOUNT
}
}

0 comments on commit 34f19a7

Please sign in to comment.