spesmilo / electrum

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

[Bug Report] [Android] Labels don't get saved unless app is closed with back button #8979

Open jayb-g opened 3 months ago

jayb-g commented 3 months ago

Current Behavior: If labels are added to certain transactions and app is closed by opening app drawer(swipe up) then labels don't get saved which be seen when you open the app again. It does get saved properly if exited by back button and clicking on yes in the app prompt to close electrum.

Expected behavior: Labels should get saved as and when created regardless of if/how the app is closed.

Steps to reproduce:

  1. Open electrum and label any transaction, exit the app by swipe up from app drawer. Open electrum again to see that it doesn't get saved.
  2. Do the same again but close the app by clicking back button and click yes when prompted by app. Now when electrum is opened again, it shows the newly created label.

OS: AOSP 14 (Latest) Electrum version: 4.5.4.0

pony-montana commented 3 months ago

Sounds very similar to this #8389 maybe could be useful.

jayb-g commented 3 months ago

@pony-montana yes indeed

SomberNight commented 2 months ago

This would be fixed by https://github.com/spesmilo/electrum/pull/8736. There is some (implied) discussion there why it has not been merged yet: it is potentially expensive to rewrite the whole wallet file as part of saving (would need partial writes).