Skip to content

Commit 1f40a3b

Browse files
moneymanolisk9ert
andauthored
Bugfix: Jade displaying wrong multisig addresses for descriptors using multi() (#2366)
* condition on is_sorted in jade's display_multisig_address * fix overlay for address confirmation --------- Co-authored-by: k9ert <[email protected]>
1 parent 23ad119 commit 1f40a3b

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

src/cryptoadvance/specter/devices/hwi/jade.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -556,10 +556,11 @@ def display_multisig_address(
556556
paths.append(parse_path(path))
557557

558558
# sort origins, signers and paths according to origins (like in _get_multisig_name)
559-
signer_origins, signers, paths = [
560-
list(a) for a in zip(*sorted(zip(signer_origins, signers, paths)))
561-
]
562-
559+
# But, only sort if sorted_multi is used (and thus the order of xpubs is not relevant)
560+
if multisig.is_sorted:
561+
signer_origins, signers, paths = [
562+
list(a) for a in zip(*sorted(zip(signer_origins, signers, paths)))
563+
]
563564
# Get a deterministic name for this multisig wallet
564565
script_variant = self._convertAddrType(addr_type, multisig=True)
565566
multisig_name = self._get_multisig_name(
@@ -572,7 +573,7 @@ def display_multisig_address(
572573
self._network(),
573574
multisig_name,
574575
script_variant,
575-
True, # always use sorted
576+
multisig.is_sorted,
576577
multisig.thresh,
577578
signers,
578579
)

src/cryptoadvance/specter/templates/includes/hwi/components/wallet.jinja

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{% if wallet is defined %}
22

3-
<div id="hwi_display_address" class="flex-center flex-column hidden" data-style="overflow-wrap: break-word;">
3+
<div id="hwi_display_address" class="flex-center flex-column hidden p-4 bg-dark-800" data-style="overflow-wrap: break-word;">
44
<h2>{{ _("Confirm Address") }}</h2><br>
55
<div>
66
{{ _("Please confirm address matches on your ")}}<span id="hwi_device_name">{{ _('device')}}</span><br><br>
77
{{ _("Expected address") }}:<br><span id="expected_address"></span>
88
</div>
9-
<div class="flex-center">
10-
<img src="{{ url_for('static', filename='img/loader_boxes.svg') }}"/>
9+
<div class="flex justify-center mt-4 ">
10+
<img src="{{ url_for('static', filename='img/loader_boxes.svg') }}" class="w-16 h-16"/>
1111
</div>
1212
</div>
1313

0 commit comments

Comments
 (0)