Skip to content

Commit

Permalink
Improvement on DecodeQR bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
kdmukai committed Mar 28, 2022
1 parent 39aa8af commit e8ed183
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions src/seedsigner/helpers/ur2/ur_decoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,6 @@ def expected_type(self):

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
Expand Down
2 changes: 1 addition & 1 deletion src/seedsigner/models/decode_qr.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def get_percent_complete(self) -> int:
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]:
Expand Down

0 comments on commit e8ed183

Please sign in to comment.