1
0

payment_identifier: factor out bip21 functions to bip21.py to break cyclic dependencies,

parse bolt11 only once, store invoice internally instead of bolt11 string
add is_onchain method to indicate if payment identifier can be paid onchain
This commit is contained in:
Sander van Grieken
2023-07-08 12:16:43 +02:00
parent 7f766f6dfb
commit f980bd97b5
11 changed files with 174 additions and 156 deletions

View File

@@ -57,7 +57,8 @@ from electrum.i18n import _
from electrum.util import (format_time, UserCancelled, profiler, bfh, InvalidPassword,
UserFacingException, get_new_wallet_name, send_exception_to_crash_reporter,
AddTransactionException, os_chmod)
from electrum.payment_identifier import BITCOIN_BIP21_URI_SCHEME, PaymentIdentifier
from electrum.bip21 import BITCOIN_BIP21_URI_SCHEME
from electrum.payment_identifier import PaymentIdentifier
from electrum.invoices import PR_PAID, Invoice
from electrum.transaction import (Transaction, PartialTxInput,
PartialTransaction, PartialTxOutput)