<p>It is a bug in the off-chain code. In step 3 in your example, wallet 3 bids under the minimum. This throws an error which triggers a bug that causes all subsequent bids from wallet 3 to be ignored.</p>
<p>It happens on <a href="https://github.com/input-output-hk/plutus-pioneer-program/blob/main/code/week01/src/Week01/EnglishAuction.hs#L280" rel="noreferrer">lines 280-281</a> when the error is thrown.</p>
<p>If you replace those 2 lines with this, it should work:</p>
<pre><code>if (bpBid &lt; minBid d) 
  then logError @P.String $ printf &quot;bid lower than minimal bid %d&quot; (minBid d)
  else do 
</code></pre>
<p>Credit to @kindofdev for showing me the fix.</p>

CC BY-SA 4.0
2022-01-18T01:42:48.023Z
2022-01-18T01:42:48.023Z
Travis
<p>if you set up the english auction with three wallets and do the following:</p>
<ol>
<li>Wallet 1 min bid 10</li>
<li>Wallet 2 bids 15</li>
<li>wallet 3 bids 9</li>
<li>wallet 3 bids 20</li>
<li>wallet 1 closes
It will got to wallet 2 and wallet three's second bid never shows up. Is this a bug or intended?</li>
</ol>

<plutus-pioneer-program><plutus-playground>
Q&A English Auction- if a wallets under bids then provides a valid bid, why doesn't it count the second good bid?
# Q&A English Auction- if a wallets under bids then provides a valid bid, why doesn't it count the second good bid?

(Asked by: username_0 on 2022-01-18)

if you set up the english auction with three wallets and do the following:

1. Wallet 1 min bid 10
2. Wallet 2 bids 15
3. wallet 3 bids 9
4. wallet 3 bids 20
5. wallet 1 closes
   It will got to wallet 2 and wallet three's second bid never shows up. Is this a bug or intended?

**Tags:** plutus-pioneer-program, plutus-playground

---

## 1 answers

### Answer by username_1 on 2022-01-18. Score: 8 | Accepted answer

It is a bug in the off-chain code. In step 3 in your example, wallet 3 bids under the minimum. This throws an error which triggers a bug that causes all subsequent bids from wallet 3 to be ignored.
It happens on lines 280-281 when the error is thrown.
If you replace those 2 lines with this, it should work:
if (bpBid < minBid d) 
  then logError @P.String $ printf "bid lower than minimal bid %d" (minBid d)
  else do 

Credit to @kindofdev for showing me the fix.


---

