Skip to content

Handle passing an account when posting sendupdate#1

Closed
wi-ski wants to merge 3 commits intopinheadmz:reveal1from
wi-ski:account-aware-sendupdate
Closed

Handle passing an account when posting sendupdate#1
wi-ski wants to merge 3 commits intopinheadmz:reveal1from
wi-ski:account-aware-sendupdate

Conversation

@wi-ski
Copy link
Copy Markdown

@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
Copy Markdown
Owner

added at handshake-org@d952bcb

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

wi-ski commented Aug 9, 2019

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

@pinheadmz
Copy link
Copy Markdown
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