spesmilo / electrum

Electrum Bitcoin Wallet
https://electrum.org
MIT License
7.31k stars 3.04k forks source link

Labels do not stick on transactions/addresses/coins #3317

Open anduck opened 6 years ago

anduck commented 6 years ago

Labeling transactions/coins is not saved. Address labels are saved properly.

Python 3.6.3, Electrum 3.0.1 / 3.0.2 at least. Other users have reported same problem while others have reported address and transaction labels to work (on Linux.) Apparently for some both work occasionally.

anduck commented 6 years ago

For me it works now when labeling it from "History" page. When labeling on "Coins" page, it won't save it.

SomberNight commented 6 years ago

Re editing the label in the Coins tab:

Letting the user double-click edit labels here looks unintended to me. E.g. when right-clicking the label, the option is not offered, unlike in other tabs.

Given only unspent TXOs are displayed here, I think in the overwhelming majority of cases, for one tx, a wallet would only have one item (UTXO) in the Coins tab. Hence I think it is unnecessary to have separate labels for coins, and to allow the user to edit them here. The code looks to intend to simply display the label of the corresponding tx here, which I think is fine.

In my view, we should just disable double-click editing, in this case.

Note that if a user had previously set labels for coins (which, as in the OP, were not actually displayed), then the wallet file would have these stored. :/ Not sure if this warrants a new storage version upgrade (to clean them).

storage file example:

"labels": {
        "31494e7e9f42f4bd736769b07cc602e2a1019617b2c72a03ec945b667aada78f": "tx1",
        "31494e7e9f42f4bd736769b07cc602e2a1019617b2c72a03ec945b667aada78f:0": "coin1",
        "tb1q63yw5n7hwkalupn5jvu3e53zu4jjp38nk9v8dl": "addr1",
        "tb1qyx52j39zmfszvc59aqf4evrv7492axu2wvs09l": "addr2"
},
SomberNight commented 6 years ago

Has this been resolved? What about the intermittent problems with transaction labels not getting persisted?

3318 only disabled setting labels for UTXOs ("coins").

ecdsa commented 6 years ago

I dont think it has

anduck commented 6 years ago

Whoops, I thought the commit solved this. Also, would it make sense to have editable labels on transactions and addresses and then show read-only transaction and address labels on Coins page?

SomberNight commented 6 years ago

Was this related to https://github.com/spesmilo/electrum/issues/3217 ? (labels not persisting due to electrum crashing on app exit; I believe this was mentioned in the original IRC conversation) Has the issue now been resolved?