This commit is contained in:
Nick Klockenga
2022-01-22 17:07:19 -05:00
parent afc3d9c9d2
commit d094de9854
3 changed files with 7 additions and 3 deletions
+3 -2
View File
@@ -66,8 +66,10 @@ class EncodeQR:
self.encoder = UREncodePSBTQR(self.psbt, self.qr_density)
elif self.qr_type == QRType.SEEDSSQR:
self.encoder = SeedSSQR(self.seed_phrase, self.wordlist)
elif self.qr_type == QRType.XPUBQR:
elif self.qr_type == QRType.URXPUBQR:
self.encoder = URXPubQR(self.seed_phrase, self.passphrase, self.derivation, self.network, self.qr_density, self.wordlist)
elif self.qr_type == QRType.XPUBQR:
self.encoder = XPubQR(self.seed_phrase, self.passphrase, self.derivation, self.network, self.wordlist)
elif self.qr_type == QRType.SPECTERXPUBQR:
self.encoder = SpecterXPubQR(self.seed_phrase, self.passphrase, self.derivation, self.network, self.qr_density, self.wordlist)
else:
@@ -229,7 +231,6 @@ class XPubQR:
raise Exception('Wordlist Required')
version = bip32.detect_version(self.derivation, default="xpub", network=NETWORKS[network])
print(self.derivation)
self.seed = Seed(mnemonic=self.seed_phrase, passphrase=self.passphrase, wordlist=self.wordlist)
self.root = bip32.HDKey.from_seed(self.seed.seed, version=NETWORKS[network]["xprv"])
self.fingerprint = self.root.child(0).fingerprint
+1
View File
@@ -17,6 +17,7 @@ class QRType(IntEnum):
SEED4LETTERMNEMONIC = 9
XPUBQR = 20
SPECTERXPUBQR = 21
URXPUBQR = 22
BITCOINADDRESSQR = 30
SPECTERWALLETQR = 40
URWALLETQR = 41
+3 -1
View File
@@ -203,8 +203,10 @@ class Settings(Singleton):
def getXPubType(software):
if software == "Specter Desktop":
return QRType.SPECTERXPUBQR
else:
elif software == "Blue Wallet":
return QRType.XPUBQR
else:
return QRType.URXPUBQR
@property
def qr_density_name(self):