wallet: fix wallet.make_unsigned_transaction method signature
- "fee_policy" arg is actually mandatory
- and fix test/stdio guis following fee_policy/config split
follow-up 840243e029
This commit is contained in:
@@ -13,6 +13,7 @@ from electrum.util import format_satoshis, EventListener, event_listener
|
||||
from electrum.bitcoin import is_address, COIN
|
||||
from electrum.transaction import PartialTxOutput
|
||||
from electrum.network import TxBroadcastError, BestEffortRequestFailed
|
||||
from electrum.fee_policy import FixedFeePolicy
|
||||
|
||||
_ = lambda x:x # i18n
|
||||
|
||||
@@ -33,7 +34,7 @@ class ElectrumGui(BaseElectrumGui, EventListener):
|
||||
password = getpass.getpass('Password:', stream=None)
|
||||
storage.decrypt(password)
|
||||
|
||||
db = WalletDB(storage.read(), storage=storage, manual_upgrades=False)
|
||||
db = WalletDB(storage.read(), storage=storage, upgrade=True)
|
||||
|
||||
self.done = 0
|
||||
self.last_balance = ""
|
||||
@@ -214,7 +215,7 @@ class ElectrumGui(BaseElectrumGui, EventListener):
|
||||
tx = self.wallet.create_transaction(
|
||||
outputs=[PartialTxOutput.from_address_and_value(self.str_recipient, amount)],
|
||||
password=password,
|
||||
fee=fee,
|
||||
fee_policy=FixedFeePolicy(fee),
|
||||
)
|
||||
except Exception as e:
|
||||
print(repr(e))
|
||||
|
||||
@@ -26,6 +26,7 @@ from electrum.storage import WalletStorage
|
||||
from electrum.network import NetworkParameters, TxBroadcastError, BestEffortRequestFailed, ProxySettings
|
||||
from electrum.interface import ServerAddr
|
||||
from electrum.invoices import Invoice
|
||||
from electrum.fee_policy import FeePolicy
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from electrum.daemon import Daemon
|
||||
@@ -688,11 +689,12 @@ class ElectrumGui(BaseElectrumGui, EventListener):
|
||||
return
|
||||
else:
|
||||
password = None
|
||||
fee_policy = FeePolicy(self.config.FEE_POLICY)
|
||||
try:
|
||||
tx = self.wallet.create_transaction(
|
||||
outputs=invoice.outputs,
|
||||
password=password,
|
||||
fee=None,
|
||||
fee_policy=fee_policy,
|
||||
)
|
||||
except Exception as e:
|
||||
self.show_message(repr(e))
|
||||
|
||||
@@ -1821,12 +1821,12 @@ class Abstract_Wallet(ABC, Logger, EventListener):
|
||||
coins: Sequence[PartialTxInput],
|
||||
outputs: List[PartialTxOutput],
|
||||
inputs: Optional[List[PartialTxInput]] = None,
|
||||
fee_policy: FeePolicy = None,
|
||||
fee_policy: FeePolicy,
|
||||
change_addr: str = None,
|
||||
is_sweep: bool = False, # used by Wallet_2fa subclass
|
||||
rbf: bool = True,
|
||||
BIP69_sort: Optional[bool] = True,
|
||||
base_tx: Optional[PartialTransaction] = None,
|
||||
base_tx: Optional[Transaction] = None,
|
||||
send_change_to_lightning: bool = False,
|
||||
merge_duplicate_outputs: bool = False,
|
||||
) -> PartialTransaction:
|
||||
@@ -3069,7 +3069,7 @@ class Abstract_Wallet(ABC, Logger, EventListener):
|
||||
self,
|
||||
outputs,
|
||||
*,
|
||||
fee_policy: FeePolicy=None,
|
||||
fee_policy: FeePolicy,
|
||||
change_addr=None,
|
||||
domain_addr=None,
|
||||
domain_coins=None,
|
||||
|
||||
Reference in New Issue
Block a user