Skip to content

Commit

Permalink
commands: require wallet password for lnpay command
Browse files Browse the repository at this point in the history
  • Loading branch information
accumulator committed Oct 8, 2024
1 parent db865f6 commit 63a601c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions electrum/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -1159,8 +1159,10 @@ async def decode_invoice(self, invoice: str):
invoice = Invoice.from_bech32(invoice)
return invoice.to_debug_json()

@command('wnl')
async def lnpay(self, invoice, timeout=120, wallet: Abstract_Wallet = None):
@command('wnpl')
async def lnpay(self, invoice, timeout=120, password=None, wallet: Abstract_Wallet = None):
if wallet.has_password():
wallet.check_password(password)
lnworker = wallet.lnworker
lnaddr = lnworker._check_invoice(invoice)
payment_hash = lnaddr.paymenthash
Expand Down

0 comments on commit 63a601c

Please sign in to comment.