OpenBazaar/openbazaar-go

ETH Response from estimate fee is inconsistent

jjeffryes opened this issue · 4 comments

Sometimes when I do this call
http://localhost:4302/wallet/estimatefee/TETH?feeLevel=ECONOMIC&amount=130570359439592

The server responds with:

{
    "success": false,
    "reason": "ERROR_INSUFFICIENT_FUNDS"
}

And other times, with no other changes, I get

{
    "amount": "53000000000000",
    "currency": {
        "code": "TETH",
        "currencyType": "crypto",
        "divisibility": 18,
        "name": "Testnet Ethereum"
    }
}

The wallet had $0.27 worth of TETH in it at the time, the payment was $0.03.

This seems to happen roughly 50% of the time, but I can confirm it does not happen consistently every other time. The pattern I saw was status 400, 200, 400, 200, 400, 200, 400, 400, 200.

Later with $0.18 in the wallet, a purchase of $0.03 consistently returned the insufficient funds error.

The core issue here is that the price for the listing is far too low and we need to plan for a way to handle this better as far as communicating to the client is concerned.

closing too low price