diff --git a/shared/utils.py b/shared/utils.py index d5cbce2f..6a91dc4c 100644 --- a/shared/utils.py +++ b/shared/utils.py @@ -489,13 +489,10 @@ def word_wrap(ln, w): # special handling for lines w/ payment address in them # - add same marker to newly split lines addr = ln[1:] - if version.has_qwerty: - # - do line break in middle, on mod4 boundry - # - will not work if addresses are > 2 lines long (34*2 chars) - aw = ((len(addr) // 2) + 3) & ~3 - else: - # - simply 3 4-char groups on Mk4 - aw = 12 + # - 3 4-char groups on Mk4 + # - 6 4-char groups on Q + aw = 24 if version.has_qwerty else 12 + pos = 0 while pos < len(addr): yield OUT_CTRL_ADDRESS + addr[pos:pos+aw] @@ -518,9 +515,6 @@ def word_wrap(ln, w): # not clear when this would happen? final bit?? left = left + ' ' + ln ln = '' - else: - if ln and ln[0] == ' ' and version.has_qwerty: - ln = " " + ln yield left