{"action":"closed","issue":{"url":"https://api.github.com/repos/exonum/cryptocurrency/issues/34","repository_url":"https://api.github.com/repos/exonum/cryptocurrency","labels_url":"https://api.github.com/repos/exonum/cryptocurrency/issues/34/labels{/name}","comments_url":"https://api.github.com/repos/exonum/cryptocurrency/issues/34/comments","events_url":"https://api.github.com/repos/exonum/cryptocurrency/issues/34/events","html_url":"https://github.com/exonum/cryptocurrency/issues/34","id":260767295,"number":34,"title":"Wallet should stay immutable","user":{"login":"vldm","id":8759725,"avatar_url":"https://avatars2.githubusercontent.com/u/8759725?v=4","gravatar_id":"","url":"https://api.github.com/users/vldm","html_url":"https://github.com/vldm","followers_url":"https://api.github.com/users/vldm/followers","following_url":"https://api.github.com/users/vldm/following{/other_user}","gists_url":"https://api.github.com/users/vldm/gists{/gist_id}","starred_url":"https://api.github.com/users/vldm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vldm/subscriptions","organizations_url":"https://api.github.com/users/vldm/orgs","repos_url":"https://api.github.com/users/vldm/repos","events_url":"https://api.github.com/users/vldm/events{/privacy}","received_events_url":"https://api.github.com/users/vldm/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-09-26T20:56:20Z","updated_at":"2017-09-27T12:03:52Z","closed_at":"2017-09-27T12:03:52Z","author_association":"CONTRIBUTOR","body":"In tutorial we have:\r\n```\r\n    pub fn increase(&mut self, amount: u64) {\r\n        let balance = self.balance() + amount;\r\n        Field::write(&balance, &mut self.raw, 40, 48);\r\n    }\r\n\r\n    pub fn decrease(&mut self, amount: u64) {\r\n        let balance = self.balance() - amount;\r\n        Field::write(&balance, &mut self.raw, 40, 48);\r\n  }\r\n```\r\n\r\nThis is conceptual wrong in general case. Of course its clear to change fixed sized type, but for DST, this rule isn't clear. That why `Field::write` is not a good choice for tutorial, we should rewrite it, to create a new `Wallet` each time."}}
{"actor":{"display_login":"DenisKolodin"}}