Skip to content

Commit

Permalink
always accept job if bid filter amount is zero ,even when using diffe…
Browse files Browse the repository at this point in the history
…rent protocols or currencies
  • Loading branch information
riccardobl committed Jun 6, 2024
1 parent d3f3672 commit 8bfc8e4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/NostrConnector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,7 @@ export default class NostrConnector {
if (bidFilter){
if(!job.bid)continue;
const validBidFilters = bidFilter.find((bidFilter:Payment) => {
if (bidFilter.amount==0) return true;
if (bidFilter.amount > job.bid.amount) return false;
if (bidFilter.currency != job.bid.currency) return false;
if (bidFilter.protocol != job.bid.protocol) return false;
Expand Down

0 comments on commit 8bfc8e4

Please sign in to comment.