-
Notifications
You must be signed in to change notification settings - Fork 189
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
Update encode_qr.py - Fixes #582 #610
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ | |
from seedsigner.models.settings import SettingsConstants | ||
|
||
from urtypes.crypto import PSBT as UR_PSBT | ||
from urtypes.crypto import Account, HDKey, Output, Keypath, PathComponent, SCRIPT_EXPRESSION_TAG_MAP | ||
from urtypes.crypto import Account, HDKey, Output, Keypath, PathComponent, SCRIPT_EXPRESSION_TAG_MAP, CoinInfo | ||
|
||
|
||
|
||
|
@@ -344,11 +344,13 @@ def derivation_to_keypath(path: str) -> list: | |
return Keypath(arr, self.root.my_fingerprint, len(arr)) | ||
|
||
origin = derivation_to_keypath(self.derivation) | ||
self.use_info = None if self.network == "M" else CoinInfo(type=None, network=1) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. An explanatory comment would help here and/or a reference to Issue #582. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You are right. Done on commit 0496eea bellow. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @fedebuyito I meant in the code itself: origin = derivation_to_keypath(self.derivation)
# For testnet we need to... blah blah... because... blah blah...
self.use_info = None if self.network == "M" else CoinInfo(type=None, network=1) It's not urgent, but since this PR is already merged, can you add that code comment and submit that change as its own PR? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
||
self.ur_hdkey = HDKey({ 'key': self.xpub.key.serialize(), | ||
'chain_code': self.xpub.chain_code, | ||
'origin': origin, | ||
'parent_fingerprint': self.xpub.fingerprint}) | ||
'parent_fingerprint': self.xpub.fingerprint, | ||
'use_info': self.use_info }) | ||
|
||
ur_outputs = [] | ||
|
||
|
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.
Should always use the constants instead of hard-coded strings.