Allow bids of 0 value and fix interpretation of bids with 0 value #170
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Builds on top of #165 and together closes #163.
Requires handshake-org/hsd#477 and SHOULD require handshake-org/hsd#479
This improves the input checking for bid and disguise values.
Users have tried sending bids with values like
0.00000000000001
, not getting an error, and then not realizing their bid value was actually0
in this case. Users could also send0
bids using CLI commands. These 0-value bids were misinterpreted by Bob as being falsey, leading to unexpected UI behavior.This PR requires that bid and disguise values match a regex (6 decimal places max) and max value check.
It allows Bob users to send bids of
0
value but ONLY if there is a non-zero LOCKUP value. This is a bit of an easter-egg and I'm ok with that. (The "place bid" button won't enable unless a disguise is added). We can also try to anticipate the user's strategy and add a warning or other type of message...?It is CRITICAL that handshake-org/hsd#479 is included in Bob, otherwise users sending extremely low value lockups will experience their bids not relaying between peers and very likely never confirmed.