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

Handle passing an account when posting sendupdate #1

Closed
wants to merge 3 commits into from

Conversation

wi-ski
Copy link

@wi-ski wi-ski commented Aug 5, 2019

Context

Originally, issue handshake-org#231 brought up a similar issue surrounding sendReveal and specifying accounts. This work aims to extend handshake-org#233

It raises an exception when passed an account that does not match the would-be coin's owner:
https://github.com/pinheadmz/hsd/pull/1/files#diff-10775d9a238b8247721a7dc0600d5a8aR2360

Todo

  • Tests.

pinheadmz and others added 3 commits August 1, 2019 14:02
Adds new method hasCoinByAccount(acct, hash, index) to txdb which
returns true if the coin (hash, index) is owned by account (number).
Adds this check to wallet.makeReveal() to prevent BIDs from other
wallet accounts being included as inputs to a new REVEAL TX from a
specific account.
@pinheadmz
Copy link
Owner

added at handshake-org@d952bcb

@pinheadmz pinheadmz closed this Aug 6, 2019
@wi-ski
Copy link
Author

wi-ski commented Aug 9, 2019

lol. Dang man, I was hoping to get that contributor badge.

@pinheadmz
Copy link
Owner

Yeah sorry man. I wanted to fix the if (null) and add a test. I owe you a 🍺 (oh no, I mean a 🥃!)
Plenty of other ways to get that contributor badge!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants