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

Add plumbing to the wallet plugin to accept configuration for primary wallet #9

Merged
merged 3 commits into from
Oct 24, 2019

Conversation

0xhaven
Copy link

@0xhaven 0xhaven commented Oct 16, 2019

No description provided.

@0xhaven 0xhaven self-assigned this Oct 16, 2019
lib/wallet/walletdb.js Outdated Show resolved Hide resolved
Copy link

@turbomaze turbomaze left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To clarify -- by passing this config option to a wallet, if no primary wallet exists yet, then it will create one with the provided options? Can you document the shape of getWalletOptions?

@0xhaven
Copy link
Author

0xhaven commented Oct 18, 2019

@turbomaze It should be the standard options you pass anytime you create a wallet. https://sourcegraph.com/github.com/handshake-org/hsd/-/blob/lib/wallet/wallet.js#L91-152

It will only create the primary wallet if you pass id: 'primary'

@turbomaze
Copy link

turbomaze commented Oct 18, 2019

@turbomaze It should be the standard options you pass anytime you create a wallet. https://sourcegraph.com/github.com/handshake-org/hsd/-/blob/lib/wallet/wallet.js#L91-152

It will only create the primary wallet if you pass id: 'primary'

Can you explain this somewhere in the code since this custom option doesn't have an example in https://github.com/handshake-org/hsd/blob/master/etc/sample.conf (which is where the rest of the option examples live)

@jacobhaven

@0xhaven 0xhaven force-pushed the jacob/ch407/wallet-restore branch 2 times, most recently from 01708e9 to 37b5a96 Compare October 24, 2019 01:22
turbomaze
turbomaze previously approved these changes Oct 24, 2019
Copy link
Author

@0xhaven 0xhaven left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a dumb restriction:
Screen Shot 2019-10-24 at 10 37 49

lib/wallet/walletdb.js Outdated Show resolved Hide resolved
@0xhaven 0xhaven merged commit 10b0c0b into master Oct 24, 2019
@0xhaven 0xhaven deleted the jacob/ch407/wallet-restore branch October 24, 2019 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants