1
0

wallet: towards killing create_transaction: rm "sign" arg

This commit is contained in:
SomberNight
2025-03-14 16:44:46 +00:00
parent fddd4275aa
commit 3c3778db9c
8 changed files with 45 additions and 41 deletions

View File

@@ -73,6 +73,7 @@ class TestWalletPaymentRequests(ElectrumTestCase):
wallet2 = self.create_wallet2() # type: Standard_Wallet
outputs = [PartialTxOutput.from_address_and_value(pr.get_address(), pr.get_amount_sat())]
tx = wallet2.create_transaction(outputs=outputs, fee_policy=FixedFeePolicy(5000))
wallet2.sign_transaction(tx, password=None)
wallet1.adb.receive_tx_callback(tx, TX_HEIGHT_UNCONFIRMED)
self.assertEqual(PR_UNCONFIRMED, wallet1.get_invoice_status(pr))
# tx gets mined
@@ -103,6 +104,7 @@ class TestWalletPaymentRequests(ElectrumTestCase):
wallet2 = self.create_wallet2() # type: Standard_Wallet
outputs = [PartialTxOutput.from_address_and_value(pr.get_address(), pr.get_amount_sat())]
tx = wallet2.create_transaction(outputs=outputs, fee_policy=FixedFeePolicy(5000))
wallet2.sign_transaction(tx, password=None)
wallet1.adb.receive_tx_callback(tx, TX_HEIGHT_UNCONFIRMED)
self.assertEqual(PR_UNCONFIRMED, wallet1.get_invoice_status(pr))
# tx gets mined
@@ -133,6 +135,7 @@ class TestWalletPaymentRequests(ElectrumTestCase):
wallet2 = self.create_wallet2() # type: Standard_Wallet
outputs = [PartialTxOutput.from_address_and_value(pr.get_address(), pr.get_amount_sat())]
tx = wallet2.create_transaction(outputs=outputs, fee_policy=FixedFeePolicy(5000))
wallet2.sign_transaction(tx, password=None)
wallet1.adb.receive_tx_callback(tx, TX_HEIGHT_UNCONFIRMED)
self.assertEqual(PR_UNCONFIRMED, wallet1.get_invoice_status(pr))
# tx mined in the past (before invoice creation)
@@ -202,6 +205,7 @@ class TestWalletPaymentRequests(ElectrumTestCase):
wallet2 = self.create_wallet2() # type: Standard_Wallet
outputs = [PartialTxOutput.from_address_and_value(pr2.get_address(), pr2.get_amount_sat())]
tx = wallet2.create_transaction(outputs=outputs, fee_policy=FixedFeePolicy(5000))
wallet2.sign_transaction(tx, password=None)
wallet1.adb.receive_tx_callback(tx, TX_HEIGHT_UNCONFIRMED)
self.assertEqual(PR_UNCONFIRMED, wallet1.get_invoice_status(pr2))
self.assertEqual(pr2, wallet1.get_request_by_addr(addr1))