{"action":"created","issue":{"url":"https://api.github.com/repos/OpenZeppelin/openzeppelin-solidity/issues/1217","repository_url":"https://api.github.com/repos/OpenZeppelin/openzeppelin-solidity","labels_url":"https://api.github.com/repos/OpenZeppelin/openzeppelin-solidity/issues/1217/labels{/name}","comments_url":"https://api.github.com/repos/OpenZeppelin/openzeppelin-solidity/issues/1217/comments","events_url":"https://api.github.com/repos/OpenZeppelin/openzeppelin-solidity/issues/1217/events","html_url":"https://github.com/OpenZeppelin/openzeppelin-solidity/issues/1217","id":351686927,"node_id":"MDU6SXNzdWUzNTE2ODY5Mjc=","number":1217,"title":"_burn and _burnfrom does not work when trying to burn whole balance","user":{"login":"alphasignal","id":33187623,"node_id":"MDQ6VXNlcjMzMTg3NjIz","avatar_url":"https://avatars3.githubusercontent.com/u/33187623?v=4","gravatar_id":"","url":"https://api.github.com/users/alphasignal","html_url":"https://github.com/alphasignal","followers_url":"https://api.github.com/users/alphasignal/followers","following_url":"https://api.github.com/users/alphasignal/following{/other_user}","gists_url":"https://api.github.com/users/alphasignal/gists{/gist_id}","starred_url":"https://api.github.com/users/alphasignal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphasignal/subscriptions","organizations_url":"https://api.github.com/users/alphasignal/orgs","repos_url":"https://api.github.com/users/alphasignal/repos","events_url":"https://api.github.com/users/alphasignal/events{/privacy}","received_events_url":"https://api.github.com/users/alphasignal/received_events","type":"User","site_admin":false},"labels":[{"id":1000207718,"node_id":"MDU6TGFiZWwxMDAwMjA3NzE4","url":"https://api.github.com/repos/OpenZeppelin/openzeppelin-solidity/labels/area:contracts","name":"area:contracts","color":"1d76db","default":false},{"id":417782817,"node_id":"MDU6TGFiZWw0MTc3ODI4MTc=","url":"https://api.github.com/repos/OpenZeppelin/openzeppelin-solidity/labels/bug","name":"bug","color":"b60205","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-08-17T18:00:47Z","updated_at":"2018-08-17T18:16:12Z","closed_at":null,"author_association":"NONE","body":"## 🎉 Description\r\n_burn and _burnfrom in StandardToken.sol do not allow whole balance from an account to be burn.\r\n\r\n- [ x] 🐛 This is a bug report.\r\n- [ ] 📈 This is a feature request.\r\n\r\n\r\n## 💻 Environment\r\n\r\nNext, we need to know what your environment looks like.\r\n\r\n- Which version of OpenZeppelin are you using?\r\nImporting directly from github using:\r\n import \"github.com/OpenZeppelin/zeppelin-solidity/contracts/token/ERC20/StandardToken.sol\";\r\n\r\n- What network are you deploying to? Ganache? Ropsten?\r\nRemixed JVM.\r\n\r\n- How are you deploying your OpenZeppelin-backed contracts? truffle? Remix? Let us know!\r\nRemix.\r\n\r\n## 📝 Details\r\n\r\nWhen I have a balance of 500 tokens in ERC20 compliant token using StandardToken.sol, _burn and _burn from do not allow to withdraw the whole balance due to the following line:\r\nrequire(balances[_account] > _amount);\r\n\r\n## 🔢 Code To Reproduce Issue [ Good To Have ]\r\n\r\n\r\n## 👍 Other Information\r\nFix for the problem...\r\n\r\nLine 181 needs to be changed to:\r\nrequire(balances[_account] >= _amount);\r\n\r\nLine 196 needs to be changed to:\r\nrequire(allowed[_account][msg.sender] >= _amount);\r\n"},"comment":{"url":"https://api.github.com/repos/OpenZeppelin/openzeppelin-solidity/issues/comments/413948097","html_url":"https://github.com/OpenZeppelin/openzeppelin-solidity/issues/1217#issuecomment-413948097","issue_url":"https://api.github.com/repos/OpenZeppelin/openzeppelin-solidity/issues/1217","id":413948097,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMzk0ODA5Nw==","user":{"login":"frangio","id":481465,"node_id":"MDQ6VXNlcjQ4MTQ2NQ==","avatar_url":"https://avatars1.githubusercontent.com/u/481465?v=4","gravatar_id":"","url":"https://api.github.com/users/frangio","html_url":"https://github.com/frangio","followers_url":"https://api.github.com/users/frangio/followers","following_url":"https://api.github.com/users/frangio/following{/other_user}","gists_url":"https://api.github.com/users/frangio/gists{/gist_id}","starred_url":"https://api.github.com/users/frangio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frangio/subscriptions","organizations_url":"https://api.github.com/users/frangio/orgs","repos_url":"https://api.github.com/users/frangio/repos","events_url":"https://api.github.com/users/frangio/events{/privacy}","received_events_url":"https://api.github.com/users/frangio/received_events","type":"User","site_admin":false},"created_at":"2018-08-17T18:16:12Z","updated_at":"2018-08-17T18:16:12Z","author_association":"MEMBER","body":"Otherwise you can install the [`openzeppelin-solidity`](https://www.npmjs.com/package/openzeppelin-solidity) npm package."}}
{"actor":{"display_login":"frangio"}}