Browse Source

electrum: fix typos

master
xiaolou86 2 years ago
parent
commit
50e5b0efd1
No known key found for this signature in database
GPG Key ID: 810DA5D43DB01224
  1. 2
      electrum/gui/qt/qrreader/qtmultimedia/camera_dialog.py
  2. 2
      electrum/gui/qt/rate_limiter.py
  3. 2
      electrum/gui/qt/send_tab.py
  4. 4
      electrum/lnchannel.py
  5. 4
      electrum/lnpeer.py
  6. 2
      electrum/payment_identifier.py
  7. 2
      electrum/plugins/coldcard/qt.py
  8. 2
      electrum/sql_db.py

2
electrum/gui/qt/qrreader/qtmultimedia/camera_dialog.py

@ -147,7 +147,7 @@ class QrReaderCameraDialog(Logger, MessageBoxMixin, QDialog):
self.image_effect = ImageGraphicsEffect(self, self.crop_blur_effect)
# Note these should stay as queued connections becasue we use the idiom
# Note these should stay as queued connections because we use the idiom
# self.reject() and self.accept() in this class to kill the scan --
# and we do it from within callback functions. If you don't use
# queued connections here, bad things can happen.

2
electrum/gui/qt/rate_limiter.py

@ -17,7 +17,7 @@ _logger = get_logger(__name__)
class RateLimiter(Logger):
''' Manages the state of a @rate_limited decorated function, collating
multiple invocations. This class is not intented to be used directly. Instead,
multiple invocations. This class is not intended to be used directly. Instead,
use the @rate_limited decorator (for instance methods).
This state instance gets inserted into the instance attributes of the target
object wherever a @rate_limited decorator appears.

2
electrum/gui/qt/send_tab.py

@ -788,7 +788,7 @@ class SendTab(QWidget, MessageBoxMixin, Logger):
self.logger.debug(f'merchant notify error: {pi.get_error()}')
else:
self.logger.debug(f'merchant notify result: {pi.merchant_ack_status}: {pi.merchant_ack_message}')
# TODO: show user? if we broadcasted the tx succesfully, do we care?
# TODO: show user? if we broadcasted the tx successfully, do we care?
# BitPay complains with a NAK if tx is RbF
def toggle_paytomany(self):

4
electrum/lnchannel.py

@ -1622,7 +1622,7 @@ class Channel(AbstractChannel):
# in the latter case, the result does not depend on peer_state
ret = []
if not self.is_closed() and self.peer_state == PeerState.GOOD:
# If there are unsettled HTLCs, althought is possible to cooperatively close,
# If there are unsettled HTLCs, although is possible to cooperatively close,
# we choose not to expose that option in the GUI, because it is very likely
# that HTLCs will take a long time to settle (submarine swap, or stuck payment),
# and the close dialog would be taking a very long time to finish
@ -1657,7 +1657,7 @@ class Channel(AbstractChannel):
continue
if htlc.cltv_abs - recv_htlc_deadline_delta > local_height:
continue
# Do not force-close if we just sent fullfill_htlc and have not received revack yet
# Do not force-close if we just sent fulfill_htlc and have not received revack yet
if htlc_id in self.htlc_settle_time and now() - self.htlc_settle_time[htlc_id] < 30:
continue
htlcs_we_could_reclaim[(RECEIVED, htlc_id)] = htlc

4
electrum/lnpeer.py

@ -2252,7 +2252,7 @@ class Peer(Logger):
if not (their_scriptpubkey == their_upfront_scriptpubkey):
await self.send_warning(
chan.channel_id,
"remote didn't use upfront shutdown script it commited to in channel opening",
"remote didn't use upfront shutdown script it committed to in channel opening",
close_connection=True)
else:
# BOLT-02 restrict the scriptpubkey to some templates:
@ -2298,7 +2298,7 @@ class Peer(Logger):
await asyncio.sleep(0.1)
self.send_message('shutdown', channel_id=chan.channel_id, len=len(scriptpubkey), scriptpubkey=scriptpubkey)
chan.set_state(ChannelState.SHUTDOWN)
# can fullfill or fail htlcs. cannot add htlcs, because state != OPEN
# can fulfill or fail htlcs. cannot add htlcs, because state != OPEN
chan.set_can_send_ctx_updates(True)
def get_shutdown_fee_range(self, chan, closing_tx, is_local):

2
electrum/payment_identifier.py

@ -64,7 +64,7 @@ class PaymentIdentifierState(IntEnum):
# and supply a refund address (bip70)
MERCHANT_ACK = 6 # PI notified merchant. nothing to be done.
ERROR = 50 # generic error
NOT_FOUND = 51 # PI contains a recognized destination format, but resolve step was unsuccesful
NOT_FOUND = 51 # PI contains a recognized destination format, but resolve step was unsuccessful
MERCHANT_ERROR = 52 # PI failed notifying the merchant after broadcasting onchain TX
INVALID_AMOUNT = 53 # Specified amount not accepted

2
electrum/plugins/coldcard/qt.py

@ -256,7 +256,7 @@ class CKCCSettingsDialog(WindowModalDialog):
# append the firmware header a second time
result = dev.send_recv(CCProtocolPacker.upload(size, size+FW_HEADER_SIZE, hdr))
# make it reboot into bootlaoder which might install it
# make it reboot into bootloader which might install it
dev.send_recv(CCProtocolPacker.reboot())
self.thread.add(doit)

2
electrum/sql_db.py

@ -60,7 +60,7 @@ class SqlDB(Logger):
if not future.cancelled():
self.asyncio_loop.call_soon_threadsafe(future.set_result, result)
# note: in sweepstore session.commit() is called inside
# the sql-decorated methods, so commiting to disk is awaited
# the sql-decorated methods, so committing to disk is awaited
if self.commit_interval:
i = (i + 1) % self.commit_interval
if i == 0:

Loading…
Cancel
Save