hermeznetwork/cli-bidding

Simple BID undefined variables `maxBid` and `minBid`

Closed this issue · 1 comments

maxBid and minBid parameters are used for multibid. However, the code uses them in the simple bid scenario and returns an error.

  if(command === "BID" || command === "MULTIBID") {
    // Create Permit Signature
    const nonce = await HezContract.nonces(wallet.getAddress());
    const deadline = ethers.constants.MaxUint256;

    amountUnits = amount
    bidAmountUnits = bidAmount
    let maxBidUnits = maxBid
    let minBidUnits = minBid
    if (units == "ether") {
      amountUnits = ethers.utils.parseEther(amount);
      bidAmountUnits = ethers.utils.parseEther(bidAmount);
      maxBidUnits = ethers.utils.parseEther(maxBid);
      minBidUnits = ethers.utils.parseEther(minBid);
    }

fixed in: 1380bc3