Closed xmonader closed 1 year ago
Can I get more information? When should we do the pre-check for balance?
Sorry, I had to document the issue and forgot to elaborate more.
As a farmer I would assume as soon as my farmerbot starts, that all is fine and functional, but apparently if the linked account does have enough tokens it won't be able to manage the farm.
That's why I believe maybe it's the best to probably exit during start with a decent message for the user to top up the account
We can maybe make the calls to change the power state free of any fee?
Sorry, I had to document the issue and forgot to elaborate more.
As a farmer I would assume as soon as my farmerbot starts, that all is fine and functional, but apparently if the linked account does have enough tokens it won't be able to manage the farm.
That's why I believe maybe it's the best to probably exit during start with a decent message for the user to top up the account
You mean if the account does not have enough tokens? Yes true the farmer won't be able to manage the farm but I fear adding the check at startup is not enough... What if the user has just enough for a couple of calls. Then after a couple of days it will fail. So we end up with the same issue. So either we check before every call and return a proper message or take the approach @DylanVerstraete proposes. I prefer the latter.
Actually I just had a discussion with Lee. Making the transaction free (no fee) would not solve the problem as there is still balance required to submit the transaction. That fee is then reimbursed after the call. @xmonader what solution would work for you then? Adding the check at startup or before every call to change the power state?
IMHO, I believe we should add both, one to ensure the farmer is already not mislead into a having functional farmerbot even if it was just the start (and also while booting we show them a clear message they need to make sure to keep their account funded), and for every call and show a proper message that they need to fund the associated account (address). The farmer didn't understand that he needed to do that from the error message, so I believe there's some area of improvements there
Sure I'll add the check.
From the threefold chat