{"action":"created","issue":{"url":"https://api.github.com/repos/ethereum/browser-solidity/issues/342","repository_url":"https://api.github.com/repos/ethereum/browser-solidity","labels_url":"https://api.github.com/repos/ethereum/browser-solidity/issues/342/labels{/name}","comments_url":"https://api.github.com/repos/ethereum/browser-solidity/issues/342/comments","events_url":"https://api.github.com/repos/ethereum/browser-solidity/issues/342/events","html_url":"https://github.com/ethereum/browser-solidity/issues/342","id":191347548,"number":342,"title":"Invalid address error when using injected provider","user":{"login":"flyswatter","id":542863,"avatar_url":"https://avatars.githubusercontent.com/u/542863?v=3","gravatar_id":"","url":"https://api.github.com/users/flyswatter","html_url":"https://github.com/flyswatter","followers_url":"https://api.github.com/users/flyswatter/followers","following_url":"https://api.github.com/users/flyswatter/following{/other_user}","gists_url":"https://api.github.com/users/flyswatter/gists{/gist_id}","starred_url":"https://api.github.com/users/flyswatter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flyswatter/subscriptions","organizations_url":"https://api.github.com/users/flyswatter/orgs","repos_url":"https://api.github.com/users/flyswatter/repos","events_url":"https://api.github.com/users/flyswatter/events{/privacy}","received_events_url":"https://api.github.com/users/flyswatter/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2016-11-23T18:22:12Z","updated_at":"2016-12-12T02:08:57Z","closed_at":"2016-12-05T08:10:50Z","body":"Over at MetaMask, we had [an issue submitted](https://github.com/MetaMask/metamask-plugin/issues/880) by @drcode regarding MetaMask/browser-solidity compatibility, and I could use your help to track down.\r\n\r\nThe error thrown is `Uncaught Error: invalid address(…)`, thrown from browser-solidity when the payload has an `undefined` `from` field.\r\n\r\nFor some reason it seems that browser-solidity is no longer successfully building its transaction parameters using the currently injected selected address at `web3.eth.accounts[0]` or `web3.eth.coinbase`.\r\n\r\nIn the `Method.prototype.buildCall` function, you can see this line:\r\n```\r\nvar payload = method.toPayload(Array.prototype.slice.call(arguments));\r\n```\r\n\r\nThe input arguments are very minimal, and the resulting `payload` value lacks a defined sender:\r\n```javascript\r\n{from: undefined, to: undefined, data: \"0x606060405234610000575b33600060006101000a8154817000816000905550600101610594565b5090565b50505b5056\", value: \"0x0\", gas: 449552}\r\n```\r\n\r\nThis makes it look like the `method.toPayload()` method is failing to pull out the current address from the injected `web3`.\r\n\r\nUnfortunately, when I did [a search of this repository](https://github.com/ethereum/browser-solidity/search?utf8=%E2%9C%93&q=toPayload), I saw no `toPayload` reference anywhere, so now I'm confused.\r\n\r\nThis *seems to be* a browser-solidity bug to me right now, but without the original source code to search & reference, it will be hard for me to track down.  Any clues?"},"comment":{"url":"https://api.github.com/repos/ethereum/browser-solidity/issues/comments/266328108","html_url":"https://github.com/ethereum/browser-solidity/issues/342#issuecomment-266328108","issue_url":"https://api.github.com/repos/ethereum/browser-solidity/issues/342","id":266328108,"user":{"login":"megachucky","id":813987,"avatar_url":"https://avatars.githubusercontent.com/u/813987?v=3","gravatar_id":"","url":"https://api.github.com/users/megachucky","html_url":"https://github.com/megachucky","followers_url":"https://api.github.com/users/megachucky/followers","following_url":"https://api.github.com/users/megachucky/following{/other_user}","gists_url":"https://api.github.com/users/megachucky/gists{/gist_id}","starred_url":"https://api.github.com/users/megachucky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/megachucky/subscriptions","organizations_url":"https://api.github.com/users/megachucky/orgs","repos_url":"https://api.github.com/users/megachucky/repos","events_url":"https://api.github.com/users/megachucky/events{/privacy}","received_events_url":"https://api.github.com/users/megachucky/received_events","type":"User","site_admin":false},"created_at":"2016-12-12T02:08:57Z","updated_at":"2016-12-12T02:08:57Z","body":"So do I understand correctly that this issue is fixed now? \r\n\r\nI still have the same issue when I use the Solidity Browser web UI... "}}
{"actor":{"display_login":"megachucky"}}