From 127f651a46e1b2ff2636217ad9841fccb4c67e9e Mon Sep 17 00:00:00 2001 From: scgbckbone Date: Wed, 12 Feb 2025 10:02:40 +0100 Subject: [PATCH] fix: multisg address display (cherry picked from commit 7e6be45e2de10f04c4f6e896e0f7a152e46e7728) --- shared/utils.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/shared/utils.py b/shared/utils.py index e7821c4c..9759bc6e 100644 --- a/shared/utils.py +++ b/shared/utils.py @@ -503,13 +503,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]