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

@@ -5,7 +5,6 @@ from kivy.lang import Builder
from kivy.factory import Factory
from kivy.uix.popup import Popup
from electrum.util import bh2u
from electrum.logging import Logger
from electrum.lnutil import LOCAL, REMOTE, format_short_channel_id
from electrum.lnchannel import AbstractChannel, Channel, ChannelState, ChanCloseOption
@@ -465,8 +464,8 @@ class ChannelDetailsPopup(Popup, Logger):
self.app = app
self.chan = chan
self.title = _('Channel details')
self.node_id = bh2u(chan.node_id)
self.channel_id = bh2u(chan.channel_id)
self.node_id = chan.node_id.hex()
self.channel_id = chan.channel_id.hex()
self.funding_txid = chan.funding_outpoint.txid
self.short_id = format_short_channel_id(chan.short_channel_id)
self.capacity = self.app.format_amount_and_units(chan.get_capacity())

View File

@@ -6,7 +6,6 @@ from kivy.factory import Factory
from electrum.gui import messages
from electrum.gui.kivy.i18n import _
from electrum.lnaddr import lndecode
from electrum.util import bh2u
from electrum.bitcoin import COIN
import electrum.simple_config as config
from electrum.logging import Logger
@@ -150,7 +149,7 @@ class LightningOpenChannelDialog(Factory.Popup, Logger):
if not fee:
fee = config.FEERATE_FALLBACK_STATIC_FEE
self.amount = self.app.format_amount_and_units(self.lnaddr.amount * COIN + fee * 2) # FIXME magic number?!
self.pubkey = bh2u(self.lnaddr.pubkey.serialize())
self.pubkey = self.lnaddr.pubkey.serialize().hex()
if self.msg:
self.app.show_info(self.msg)