spesmilo/electrum — pull request #573 by dabura667 (2014-02-17 18:28:55+00:00)
Title: Separate Offline Wallet Updating feature.

I took the offline wallet updating feature and removed it from mandatory embedding in transaction, and made it into its own file to save and transfer to offline wallet via USB.

I implemented the following safety measures.

1. It now is able to be saved on the unsigned transaction menu when you access as watch only wallet.
2. It can be loaded into your offline wallet via the toolbar, but only if you are NOT watch only AND there is no connection to the internet (offline mode).
3. When updating, it checks the first chars of the first address in the accounts, if they do not match, it won't let you update.

Some questions I have:

1. Could I hide a toolbar menu item under conditions? (such as is not watch only and is not online)
2. Is my method of encoding and decoding ok? I tested it, and it seems to work well, but it could be just not showing overt signs of a bug... I checked the decoded string against the original string and it said it was good.

The file is lightly encrypted in base64... I don't know why, but I was embarrassed about the way I made the string, so I hide it with base64... :dancer:

I am sorry if this code is too sloppy. If you would include this into master, I would be very happy. I spent hours making this presentable for the main branch and it would mean a lot to me. But if you don't think the code is good enough yet, I would appreciate any feedback.

I also would like to ask if anyone has any advice, or if you think of any possible errors or problems that could be caused by this, please let me know, and I will try to find a solution.