{"action":"created","issue":{"url":"https://api.github.com/repos/magi-project/magi/issues/8","labels_url":"https://api.github.com/repos/magi-project/magi/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/magi-project/magi/issues/8/comments","events_url":"https://api.github.com/repos/magi-project/magi/issues/8/events","html_url":"https://github.com/magi-project/magi/pull/8","id":77932838,"number":8,"title":"Adding timer-based check for wallet updates","user":{"login":"feldenthorne","id":3324949,"avatar_url":"https://avatars.githubusercontent.com/u/3324949?v=3","gravatar_id":"","url":"https://api.github.com/users/feldenthorne","html_url":"https://github.com/feldenthorne","followers_url":"https://api.github.com/users/feldenthorne/followers","following_url":"https://api.github.com/users/feldenthorne/following{/other_user}","gists_url":"https://api.github.com/users/feldenthorne/gists{/gist_id}","starred_url":"https://api.github.com/users/feldenthorne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/feldenthorne/subscriptions","organizations_url":"https://api.github.com/users/feldenthorne/orgs","repos_url":"https://api.github.com/users/feldenthorne/repos","events_url":"https://api.github.com/users/feldenthorne/events{/privacy}","received_events_url":"https://api.github.com/users/feldenthorne/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-05-19T04:51:05Z","updated_at":"2015-09-16T00:19:54Z","closed_at":"2015-09-16T00:14:19Z","pull_request":{"url":"https://api.github.com/repos/magi-project/magi/pulls/8","html_url":"https://github.com/magi-project/magi/pull/8","diff_url":"https://github.com/magi-project/magi/pull/8.diff","patch_url":"https://github.com/magi-project/magi/pull/8.patch"},"body":"**Explanation**\r\nUsers often express interest in a wallet update that would allow the wallet itself to check for future updates. This pull request adds a rudimentary version checking method that displays a clickable link (to the downloads) on the wallet's overview page if an updated version is detected. Screenshots of the visual changes are shown in the attached screenshots.\r\n\r\nThis feature is implemented with a Qtimer and what is essentially Qt's curl method. Roughly every 24 hours (and once when the wallet is started), the wallet requests a small text file containing the current version information from a remote server. If it detects that the wallet's current version is lower than the version in the fetched file, it reveals a Qt Label in the wallet's Overview Page stating that there is an update, what the version number is, and makes the label a clickable link to the wallet download page.\r\n\r\n**Necessary Changes**\r\nIn order to test this update, I needed to store a version text file on a remote server. I chose to use [http://starflakenights.net/crypto/magiversion/version.txt](http://starflakenights.net/crypto/magiversion/version.txt). The version-correct equivalent file should be hosted on the official Magi site or in the GitHub repository for ease of fetching.\r\n\r\nThe URLs for the above [version.txt](http://starflakenights.net/crypto/magiversion/version.txt), the official wallet download link, and the define for the update interval are located in [src/qt/updatecheck.h, lines 16-43](https://github.com/feldenthorne/magi/blob/f0a9df5160e7e5cbc81b9d5627df4a3b258fcbbe/src/qt/updatecheck.h#L16-43). These will need to be changed according to the position of the version file and wallet download locations on the web, as well as the desired update interval.\r\n\r\nFinally, it is somewhat obvious, but using this method for update checking does require the person who uploads binaries to update the version text file as well. In an ideal scenario, the uploader would update the official wallet downloads, then update the version file after the wallets were uploaded (to prevent premature alerts).\r\n\r\n**Questions/Comments**\r\nI realize this is a fairly big change despite being such a small change in terms of code. Please let me know if I need to make changes or fixes, or if it is not a viable solution at all. I will do my best to fix this up for a merge or close the request if it is undesirable to the team.\r\n\r\n**Screenshots**\r\nWhen no updates are detected for the wallet, the following image is displayed:\r\n![Wallet when no updates are detected.](https://cloud.githubusercontent.com/assets/3324949/7695471/fb630c0c-fda4-11e4-86a2-73a0505d227c.png)\r\n\r\nIf an updated version is detected, the wallet displays the update label and the link to the official wallet downloads:\r\n![Wallet when an updated version has been detected.](https://cloud.githubusercontent.com/assets/3324949/7695472/fd1af4f6-fda4-11e4-9ce5-9767add89694.png)\r\n"},"comment":{"url":"https://api.github.com/repos/magi-project/magi/issues/comments/140586056","html_url":"https://github.com/magi-project/magi/pull/8#issuecomment-140586056","issue_url":"https://api.github.com/repos/magi-project/magi/issues/8","id":140586056,"user":{"login":"magi-project","id":8219553,"avatar_url":"https://avatars.githubusercontent.com/u/8219553?v=3","gravatar_id":"","url":"https://api.github.com/users/magi-project","html_url":"https://github.com/magi-project","followers_url":"https://api.github.com/users/magi-project/followers","following_url":"https://api.github.com/users/magi-project/following{/other_user}","gists_url":"https://api.github.com/users/magi-project/gists{/gist_id}","starred_url":"https://api.github.com/users/magi-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magi-project/subscriptions","organizations_url":"https://api.github.com/users/magi-project/orgs","repos_url":"https://api.github.com/users/magi-project/repos","events_url":"https://api.github.com/users/magi-project/events{/privacy}","received_events_url":"https://api.github.com/users/magi-project/received_events","type":"User","site_admin":false},"created_at":"2015-09-16T00:19:54Z","updated_at":"2015-09-16T00:19:54Z","body":"Thanks for the contribution. This is nice. The request has been merged. "}}