Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow bids of 0 value and fix interpretation of bids with 0 value #170

Merged
merged 2 commits into from Sep 4, 2020

Conversation

pinheadmz
Copy link
Contributor

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 actually 0 in this case. Users could also send 0 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.

@pinheadmz
Copy link
Contributor Author

rebase to: aa0ecbb

address #170 (comment)

@chikeichan chikeichan added this to In progress in v0.5.0 via automation Jul 31, 2020
@chikeichan chikeichan changed the base branch from master to rc-0.5.0 July 31, 2020 20:48
@chikeichan chikeichan removed this from In progress in v0.5.0 Jul 31, 2020
@chikeichan chikeichan changed the base branch from rc-0.5.0 to master July 31, 2020 21:01
@chikeichan chikeichan added this to To do in Triage Jul 31, 2020
@pinheadmz
Copy link
Contributor Author

handshake-org/hsd#479 is merged into hsd master, so this PR is unblocked as long as Bob pulls the latest hsd

@mslipper mslipper changed the base branch from master to rc-0.5.0 September 4, 2020 16:23
@mslipper mslipper merged commit 7866f3f into kyokan:rc-0.5.0 Sep 4, 2020
Triage automation moved this from To do to Done Sep 4, 2020
pinheadmz added a commit to pinheadmz/bob-wallet that referenced this pull request Oct 8, 2020
…okan#170)

* Allow bids of 0 and improve input checking for bid and disguise

* Parse bids with value of 0 as defined in history and bids list
@pinheadmz pinheadmz deleted the bidzero1 branch July 1, 2022 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Triage
  
Done
Development

Successfully merging this pull request may close these issues.

Issues with bids of 0 value
2 participants