Improvement on DecodeQR bugfix

This commit is contained in:
kdmukai
2022-03-27 19:12:42 -05:00
parent 39aa8afd13
commit e8ed183ae7
2 changed files with 1 additions and 5 deletions
-4
View File
@@ -143,10 +143,6 @@ class URDecoder:
def expected_part_count(self):
return self.fountain_decoder.expected_part_count()
@property
def total_segments(self):
return self.expected_part_count()
def received_part_indexes(self):
return self.fountain_decoder.received_part_indexes
+1 -1
View File
@@ -212,7 +212,7 @@ class DecodeQR:
if not self.decoder:
return 0
if self.qr_type in [QRType.PSBT__UR2, QRType.OUTPUT__UR, QRType.ACCOUNT__UR]:
if self.qr_type in [QRType.PSBT__UR2, QRType.OUTPUT__UR, QRType.ACCOUNT__UR, QRType.BYTES__UR]:
return int(self.decoder.estimated_percent_complete() * 100)
elif self.qr_type in [QRType.PSBT__SPECTER]: