{"action":"created","issue":{"url":"https://api.github.com/repos/TrustWallet/trust-wallet-ios/issues/742","repository_url":"https://api.github.com/repos/TrustWallet/trust-wallet-ios","labels_url":"https://api.github.com/repos/TrustWallet/trust-wallet-ios/issues/742/labels{/name}","comments_url":"https://api.github.com/repos/TrustWallet/trust-wallet-ios/issues/742/comments","events_url":"https://api.github.com/repos/TrustWallet/trust-wallet-ios/issues/742/events","html_url":"https://github.com/TrustWallet/trust-wallet-ios/issues/742","id":328844025,"node_id":"MDU6SXNzdWUzMjg4NDQwMjU=","number":742,"title":"No clear way to delegate back to dApp after transaction receipt","user":{"login":"destinatis","id":11956729,"node_id":"MDQ6VXNlcjExOTU2NzI5","avatar_url":"https://avatars1.githubusercontent.com/u/11956729?v=4","gravatar_id":"","url":"https://api.github.com/users/destinatis","html_url":"https://github.com/destinatis","followers_url":"https://api.github.com/users/destinatis/followers","following_url":"https://api.github.com/users/destinatis/following{/other_user}","gists_url":"https://api.github.com/users/destinatis/gists{/gist_id}","starred_url":"https://api.github.com/users/destinatis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/destinatis/subscriptions","organizations_url":"https://api.github.com/users/destinatis/orgs","repos_url":"https://api.github.com/users/destinatis/repos","events_url":"https://api.github.com/users/destinatis/events{/privacy}","received_events_url":"https://api.github.com/users/destinatis/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-06-03T16:56:50Z","updated_at":"2018-06-04T15:52:05Z","closed_at":null,"author_association":"NONE","body":"There seems to be no way to capture callbacks for send events defined in [Web3.js](https://web3js.readthedocs.io/en/1.0/web3-eth-contract.html#methods-mymethod-send) with the wallet on iOS (haven't tested Android). In particular, we need 'confirmation'/'receipt'."},"comment":{"url":"https://api.github.com/repos/TrustWallet/trust-wallet-ios/issues/comments/394405095","html_url":"https://github.com/TrustWallet/trust-wallet-ios/issues/742#issuecomment-394405095","issue_url":"https://api.github.com/repos/TrustWallet/trust-wallet-ios/issues/742","id":394405095,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NDQwNTA5NQ==","user":{"login":"mishfit","id":817064,"node_id":"MDQ6VXNlcjgxNzA2NA==","avatar_url":"https://avatars0.githubusercontent.com/u/817064?v=4","gravatar_id":"","url":"https://api.github.com/users/mishfit","html_url":"https://github.com/mishfit","followers_url":"https://api.github.com/users/mishfit/followers","following_url":"https://api.github.com/users/mishfit/following{/other_user}","gists_url":"https://api.github.com/users/mishfit/gists{/gist_id}","starred_url":"https://api.github.com/users/mishfit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mishfit/subscriptions","organizations_url":"https://api.github.com/users/mishfit/orgs","repos_url":"https://api.github.com/users/mishfit/repos","events_url":"https://api.github.com/users/mishfit/events{/privacy}","received_events_url":"https://api.github.com/users/mishfit/received_events","type":"User","site_admin":false},"created_at":"2018-06-04T15:52:05Z","updated_at":"2018-06-04T15:52:05Z","author_association":"COLLABORATOR","body":"First of all, @destinatis,  it looks like you're attempting to use version 1.0.\r\n\r\nMetaMask, truffle, and Trust wallet are using version 0.23.x.\r\n\r\nThere are PRs for truffle to begin using 1.0 soon, I haven't looked to see where MetaMask is in the process. It is possible to pull the low-level HttpProvider included in Trust's runtime and use your own packaged version of web3 (at whatever version you want) to talk directly to an ethereum node (as in this example from code in the wild):\r\n\r\n```js\r\nimport tc           from 'truffle-contract';\r\nimport Web3         from 'web3';\r\nimport { networks } from '../truffle';\r\nimport config       from '../config';\r\n\r\nconst AirdropCampaignArtifact = require('../../contracts/AirdropCampaign.json'),\r\n      OriginalTokenArtifact   = require('../../contracts/OriginalToken.json')\r\n\r\nlet provider,\r\n    bundledWeb3,\r\n    isInjectedWeb3Provider,\r\n    contracts = {}\r\n\r\nexport default {\r\n  getProvider () {\r\n    if (!provider) {\r\n      if (web3 === undefined) {\r\n        let network;\r\n\r\n        if (config.environment) {\r\n          network = networks[config.environment]\r\n        } else {\r\n          network = Object.values(networks)[0]\r\n        }\r\n\r\n        provider = Web3.providers.HttpProvider(`http://${network.host}:${network.port}`)\r\n      } else {\r\n        isInjectedWeb3Provider = true\r\n        provider = web3.currentProvider\r\n      }\r\n    }\r\n\r\n    return provider\r\n  },\r\n  getWeb3 () {\r\n    if (!bundledWeb3) {\r\n        // *** Look Right Here ***\r\n        // even if web3 is already defined we use the web3 library bundled with the application instead of\r\n        // some unknown version injected by Mist, MetaMask (or something else)\r\n      bundledWeb3 = new Web3(this.getProvider())\r\n    }\r\n\r\n    return bundledWeb3\r\n  },\r\n```"}}
{"actor":{"display_login":"mishfit"}}