1
0

util: kill bh2u

no longer useful, and the name is so confusing...
This commit is contained in:
SomberNight
2023-02-17 11:35:03 +00:00
parent 1ce37c8bb1
commit 373db76ac9
52 changed files with 151 additions and 168 deletions

View File

@@ -12,7 +12,6 @@ from electrum.gui.qt.util import (WindowModalDialog, WWLabel, Buttons, CancelBut
OkButton, CloseButton, getOpenFileName)
from electrum.i18n import _
from electrum.plugin import hook
from electrum.util import bh2u
from ..hw_wallet.qt import QtHandlerBase, QtPluginBase
from ..hw_wallet.plugin import only_hook_if_libraries_available
@@ -221,7 +220,7 @@ class SettingsDialog(WindowModalDialog):
self.features = features
set_label_enabled()
if features.bootloader_hash:
bl_hash = bh2u(features.bootloader_hash)
bl_hash = features.bootloader_hash.hex()
bl_hash = "\n".join([bl_hash[:32], bl_hash[32:]])
else:
bl_hash = "N/A"

View File

@@ -3,7 +3,7 @@ import traceback
import sys
from typing import NamedTuple, Any, Optional, Dict, Union, List, Tuple, TYPE_CHECKING
from electrum.util import bfh, bh2u, versiontuple, UserCancelled, UserFacingException
from electrum.util import bfh, versiontuple, UserCancelled, UserFacingException
from electrum.bip32 import BIP32Node
from electrum import constants
from electrum.i18n import _
@@ -301,7 +301,7 @@ class SafeTPlugin(HW_PluginBase):
signatures = client.sign_tx(self.get_coin_name(), inputs, outputs,
lock_time=tx.locktime, version=tx.version)[0]
sighash = Sighash.to_sigbytes(Sighash.ALL).hex()
signatures = [(bh2u(x) + sighash) for x in signatures]
signatures = [(x.hex() + sighash) for x in signatures]
tx.update_signatures(signatures)
@runs_in_hwd_thread