mirror of
https://github.com/cryptoadvance/specter-desktop.git
synced 2026-08-13 12:33:29 +02:00
* Tests passing UI flow not yet tested * UI fixes, test suite fixes * blackify cleanup * blackify reformat in tests * Update src/cryptoadvance/specter/cli/cli_noded.py Co-authored-by: Kim Neunert <kneunert@gmail.com> * Update descriptor.py * Update src/cryptoadvance/specter/util/descriptor.py Co-authored-by: Stepan Snigirev <snigirev.stepan@gmail.com> * Corrected wallet type determination * Adding Jade and SeedSigner to DeviceTypes * Removing test suite artifacts * differentiate p2sh vs p2pkh Co-authored-by: Kim Neunert <kneunert@gmail.com> Co-authored-by: Stepan Snigirev <snigirev.stepan@gmail.com>
12 lines
411 B
Python
12 lines
411 B
Python
"""
|
|
Utility functions for common test suite tasks
|
|
"""
|
|
|
|
|
|
def spend_utxo(device, wallet, utxo):
|
|
inputs = [{"txid": utxo["txid"], "vout": utxo["vout"]}]
|
|
outputs = {wallet.getnewaddress(): 0.0001}
|
|
tx = wallet.rpc.createrawtransaction(inputs, outputs)
|
|
txF = wallet.rpc.fundrawtransaction(tx)
|
|
txFS = device.sign_raw_tx(txF["hex"], wallet)
|
|
txid = wallet.rpc.sendrawtransaction(txFS["hex"])
|