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

Import script watch only #2423

Merged
merged 4 commits into from Mar 5, 2020
Merged

Conversation

vctt94
Copy link
Member

@vctt94 vctt94 commented Feb 19, 2020

This PR adds the ability to watching only wallets import scripts.

It is a work towards #1491

@vctt94 vctt94 mentioned this pull request Feb 20, 2020
Copy link
Member

@matheusd matheusd left a comment

Choose a reason for hiding this comment

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

Only one issue but otherwise, nice work! It even works for API keys and not just scripts...

Comment on lines 58 to 61
// watch only wallets are not redeemable of their scripts, therefore we
// don't require them to be redeemable.
const isRequireRedeem = isWatchingOnly ? false : true;
request.setRequireRedeemable(isRequireRedeem);
Copy link
Member

Choose a reason for hiding this comment

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

This isn't true. The "redeemable" part checks whether one of the addresses of the multisig belogs to the wallet, irrespective of whether the wallet has the private keys for that address or not.

So I think this should remain true even for watching only wallets since it ensures the corresponding (cold) wallet will have the keys for at least one of the pubkeys in the script.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, you are right. Fixed

@alexlyp alexlyp merged commit c6c7372 into decred:master Mar 5, 2020
@vctt94 vctt94 deleted the import-script-watch-only branch April 16, 2020 15:30
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.

None yet

3 participants