Bitcoin Forum
May 21, 2024, 09:13:55 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Electrum / Re: Removing a transaction from Electrum on: March 28, 2024, 03:04:43 AM
Wish there's an advanced mode in Electrum which would give the user more liberty to mess around with the wallet.

you may want to ask @Abdussamad since he is more familiar with this types of commands but you should be able to use the following command in your console tab to remove a transaction from your wallet file without needing to manually opening it and messing the JSON up:
Code:
wallet.remove_transaction(txid)

if you understand python more than me this is the source code: https://github.com/spesmilo/electrum/blob/52f8aafb604d05487a0612f65bacb966c0d0f569/electrum/wallet_db.py#L924
this is a test vector: https://github.com/spesmilo/electrum/blob/52f8aafb604d05487a0612f65bacb966c0d0f569/electrum/tests/test_wallet_vertical.py#L2359-L2406

This is the thing that ended up working for me. You have to disconnect from the electrum server, run the command below, and then close and reopen the wallet. This worked for me on v4.5.4

Code:
txid="<txid-here>"
wallet.db.remove_txi(txid)
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!