-
Notifications
You must be signed in to change notification settings - Fork 14
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
multi: Add accountless ticket purchasing #22
base: master
Are you sure you want to change the base?
Conversation
pydecred/vsp.py
Outdated
@@ -140,6 +150,8 @@ def __init__(self, url, apiKey): | |||
# The signingAddress (also called a votingAddress in other contexts) is | |||
# the P2SH 1-of-2 multi-sig address that spends SSTX outputs. | |||
self.signingAddress = None | |||
self.isAccountless = isAccountless | |||
self.ID = ID |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using an incremented id to track pools, rather than the api key, as accountless has none
""" | ||
self.app.appWindow.pop(self) | ||
self.poolScreen.isAccountless = True | ||
self.poolScreen.refreshAccountless() | ||
self.app.appWindow.stack(self.poolScreen) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these click events are tricky, wasn't sure how to pass a variable, so made a separate event for accountless, though seems wasteful
if len(self.stakePools) > 0: | ||
pool.ID = max([p.ID for p in self.stakePools]) + 1 | ||
self.stakePools = [pool] + [p for p in self.stakePools if p.ID != | ||
pool.ID] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Separated add and set because accountless should have different data to set each time we buy a ticket whenever we start to derive a new address for every ticket.
b13d838
to
349da8c
Compare
When connecting to dcrdata, pull down the current agendas for use when voting.
Add a screen to show current agendas and a dropdown menu to choose how to vote.
Save a reference to the drowdown in the function that fires when activated. Move agendasInfo back to dcrdata blockchain.
If a vsp has APIVersionsSupported 3 allow accountless ticket purchasing for that pool.
349da8c
to
a302fec
Compare
depends on #7, #18
closes #16
Together with the api/purchaseticket endpoint, allows for ticket purchases without creating an account.
see: decred/dcrstakepool#515
pr 515 there is currently running on my testnet vsp at www.dcrstakedinner.com, that vsp has also been hardcoded into the list of vsp's
Right now, the same address is used for every request, but we could easily use a new one for every ticket, which would make tracking user tickets much more difficult.
screens