{"action":"created","issue":{"url":"https://api.github.com/repos/ethers-io/ethers.js/issues/372","repository_url":"https://api.github.com/repos/ethers-io/ethers.js","labels_url":"https://api.github.com/repos/ethers-io/ethers.js/issues/372/labels{/name}","comments_url":"https://api.github.com/repos/ethers-io/ethers.js/issues/372/comments","events_url":"https://api.github.com/repos/ethers-io/ethers.js/issues/372/events","html_url":"https://github.com/ethers-io/ethers.js/issues/372","id":389552010,"node_id":"MDU6SXNzdWUzODk1NTIwMTA=","number":372,"title":"Contract methods /w Metamask do not resolve Tx object until mined","user":{"login":"sudoryan","id":23408540,"node_id":"MDQ6VXNlcjIzNDA4NTQw","avatar_url":"https://avatars0.githubusercontent.com/u/23408540?v=4","gravatar_id":"","url":"https://api.github.com/users/sudoryan","html_url":"https://github.com/sudoryan","followers_url":"https://api.github.com/users/sudoryan/followers","following_url":"https://api.github.com/users/sudoryan/following{/other_user}","gists_url":"https://api.github.com/users/sudoryan/gists{/gist_id}","starred_url":"https://api.github.com/users/sudoryan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sudoryan/subscriptions","organizations_url":"https://api.github.com/users/sudoryan/orgs","repos_url":"https://api.github.com/users/sudoryan/repos","events_url":"https://api.github.com/users/sudoryan/events{/privacy}","received_events_url":"https://api.github.com/users/sudoryan/received_events","type":"User","site_admin":false},"labels":[{"id":409075433,"node_id":"MDU6TGFiZWw0MDkwNzU0MzM=","url":"https://api.github.com/repos/ethers-io/ethers.js/labels/investigate","name":"investigate","color":"e99695","default":false},{"id":858787404,"node_id":"MDU6TGFiZWw4NTg3ODc0MDQ=","url":"https://api.github.com/repos/ethers-io/ethers.js/labels/on-deck","name":"on-deck","color":"1bd691","default":false}],"state":"open","locked":false,"assignee":{"login":"ricmoo","id":975687,"node_id":"MDQ6VXNlcjk3NTY4Nw==","avatar_url":"https://avatars3.githubusercontent.com/u/975687?v=4","gravatar_id":"","url":"https://api.github.com/users/ricmoo","html_url":"https://github.com/ricmoo","followers_url":"https://api.github.com/users/ricmoo/followers","following_url":"https://api.github.com/users/ricmoo/following{/other_user}","gists_url":"https://api.github.com/users/ricmoo/gists{/gist_id}","starred_url":"https://api.github.com/users/ricmoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ricmoo/subscriptions","organizations_url":"https://api.github.com/users/ricmoo/orgs","repos_url":"https://api.github.com/users/ricmoo/repos","events_url":"https://api.github.com/users/ricmoo/events{/privacy}","received_events_url":"https://api.github.com/users/ricmoo/received_events","type":"User","site_admin":false},"assignees":[{"login":"ricmoo","id":975687,"node_id":"MDQ6VXNlcjk3NTY4Nw==","avatar_url":"https://avatars3.githubusercontent.com/u/975687?v=4","gravatar_id":"","url":"https://api.github.com/users/ricmoo","html_url":"https://github.com/ricmoo","followers_url":"https://api.github.com/users/ricmoo/followers","following_url":"https://api.github.com/users/ricmoo/following{/other_user}","gists_url":"https://api.github.com/users/ricmoo/gists{/gist_id}","starred_url":"https://api.github.com/users/ricmoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ricmoo/subscriptions","organizations_url":"https://api.github.com/users/ricmoo/orgs","repos_url":"https://api.github.com/users/ricmoo/repos","events_url":"https://api.github.com/users/ricmoo/events{/privacy}","received_events_url":"https://api.github.com/users/ricmoo/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2018-12-11T00:58:53Z","updated_at":"2018-12-14T21:57:53Z","closed_at":null,"author_association":"NONE","body":"According to the [docs](https://docs.ethers.io/ethers.js/html/api-contract.html?highlight=nonce#connecting-to-existing-contracts), contract methods sends are supposed to resolve to a tx object when the transaction is sent. This isn't the case when using Metamask web3 provider where the contract method only resolves once mined. \r\n\r\n```javascript\r\nconst provider = new ethers.providers.Web3Provider(window.web3.currentProvider);\r\nconst signer = provider.getSigner()\r\nconst contractWithSigner = contract.connect(signer);\r\n\r\ncontractWithSigner.fn().then(tx => console.log(tx.hash)); // not resolved until mined\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/ethers-io/ethers.js/issues/comments/447491236","html_url":"https://github.com/ethers-io/ethers.js/issues/372#issuecomment-447491236","issue_url":"https://api.github.com/repos/ethers-io/ethers.js/issues/372","id":447491236,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NzQ5MTIzNg==","user":{"login":"sudoryan","id":23408540,"node_id":"MDQ6VXNlcjIzNDA4NTQw","avatar_url":"https://avatars0.githubusercontent.com/u/23408540?v=4","gravatar_id":"","url":"https://api.github.com/users/sudoryan","html_url":"https://github.com/sudoryan","followers_url":"https://api.github.com/users/sudoryan/followers","following_url":"https://api.github.com/users/sudoryan/following{/other_user}","gists_url":"https://api.github.com/users/sudoryan/gists{/gist_id}","starred_url":"https://api.github.com/users/sudoryan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sudoryan/subscriptions","organizations_url":"https://api.github.com/users/sudoryan/orgs","repos_url":"https://api.github.com/users/sudoryan/repos","events_url":"https://api.github.com/users/sudoryan/events{/privacy}","received_events_url":"https://api.github.com/users/sudoryan/received_events","type":"User","site_admin":false},"created_at":"2018-12-14T21:57:53Z","updated_at":"2018-12-14T21:57:53Z","author_association":"NONE","body":"It's weird, when it works - it works. When it doesn't - it doesn't. Right now I can't get it working I've sent 10+ transactions and they don't return the hash. I tried restarting browser, relogging metamask, clearing cache unable to get it working."}}
{"actor":{"display_login":"sudoryan"}}