{"action":"closed","number":16,"pull_request":{"url":"https://api.github.com/repos/tokenbrowser/token-app-js/pulls/16","id":123321299,"html_url":"https://github.com/tokenbrowser/token-app-js/pull/16","diff_url":"https://github.com/tokenbrowser/token-app-js/pull/16.diff","patch_url":"https://github.com/tokenbrowser/token-app-js/pull/16.patch","issue_url":"https://api.github.com/repos/tokenbrowser/token-app-js/issues/16","number":16,"state":"closed","locked":false,"title":"Feature/get balance","user":{"login":"tristan","id":1412,"avatar_url":"https://avatars2.githubusercontent.com/u/1412?v=3","gravatar_id":"","url":"https://api.github.com/users/tristan","html_url":"https://github.com/tristan","followers_url":"https://api.github.com/users/tristan/followers","following_url":"https://api.github.com/users/tristan/following{/other_user}","gists_url":"https://api.github.com/users/tristan/gists{/gist_id}","starred_url":"https://api.github.com/users/tristan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tristan/subscriptions","organizations_url":"https://api.github.com/users/tristan/orgs","repos_url":"https://api.github.com/users/tristan/repos","events_url":"https://api.github.com/users/tristan/events{/privacy}","received_events_url":"https://api.github.com/users/tristan/received_events","type":"User","site_admin":false},"body":"requires: https://github.com/tokenbrowser/token-headless-client/pull/11\r\n\r\n**Logging enhancements:**\r\n```\r\n[I: 2017-06-02T13:00:52.597Z] ⇒  Received 'Message' from @user50672\r\n[I: 2017-06-02T13:00:52.597Z] ⇒  hello\r\n\r\n[I: 2017-06-02T13:00:52.753Z] ⇐  Sent 'Message' to @user50672\r\n[I: 2017-06-02T13:00:52.753Z] ⇐  I have no money. Send me some!\r\n```\r\n\r\n**Payments Updates from ethereum service**\r\n```\r\n[I: 2017-06-02T13:01:21.904Z] ⇒  Payment Update\r\n[I: 2017-06-02T13:01:21.904Z] ⇒  Received From: @user50672\r\n[I: 2017-06-02T13:01:21.904Z] ⇒  Status:        unconfirmed\r\n[I: 2017-06-02T13:01:21.908Z] ⇒  Value (USD):   $7.41\r\n[I: 2017-06-02T13:01:21.908Z] ⇒  Value (ETH):   0.03303274\r\n\r\n[I: 2017-06-02T13:01:30.644Z] ⇒  Payment Update\r\n[I: 2017-06-02T13:01:30.644Z] ⇒  Received From: @user50672\r\n[I: 2017-06-02T13:01:30.644Z] ⇒  Status:        confirmed\r\n[I: 2017-06-02T13:01:30.645Z] ⇒  Value (USD):   $7.41\r\n[I: 2017-06-02T13:01:30.645Z] ⇒  Value (ETH):   0.03303274\r\n```\r\n\r\nNote: any `SOFA:Payment` sent through signal will now be completely ignored.\r\n\r\n**ability to get balance in different fiat amounts**\r\n```\r\nsession.balance().then((balance) => {\r\n    console.log(balance);\r\n}\r\n// Outputs 1 (defaults to ether)\r\nsession.balance('wei').then((balance) => {\r\n    console.log(balance);\r\n}\r\n// Outputs 1000000000000000000\r\nsession.balance('USD').then((balance) => {\r\n    console.log(balance);\r\n}\r\n// Outputs 224.55\r\n\r\n// can also get balance for other addresses\r\nsession.balance(\"0x1234567890123456789012345678901234567890\", 'USD').then((balance) => {\r\n    console.log(balance);\r\n}\r\n\r\n```\r\n\r\n**Session object contains a reference to the user it's connected to**\r\n```\r\n> session.user;\r\n{ custom: { avatar: 'https://token-id-service-development.herokuapp.com/identicon/0x808e070a5184d892f0eedb1d40dc50cd6c18b0eb.png' },\r\n  username: 'user50672',\r\n  location: null,\r\n  payment_address: '0x0a67d66e41d90a46f80b3ddfdb69bf4c5e42ebb4',\r\n  about: null,\r\n  token_id: '0x808e070a5184d892f0eedb1d40dc50cd6c18b0eb',\r\n  is_app: false,\r\n  reputation_score: null,\r\n  review_count: 0,\r\n  avatar: 'https://token-id-service-development.herokuapp.com/identicon/0x808e070a5184d892f0eedb1d40dc50cd6c18b0eb.png',\r\n  name: null }\r\n```\r\n\r\n**Updated `onPayment` function in `bot.js` to show examples of how to deal with payments of different states**\r\n\r\n**sqlite support**\r\n\r\n```\r\nDATABASE_URL=sqlite:///tokenbot.sqlite.db  # filename can be whatever\r\n```\r\n\r\n**optional environment args for logging**:\r\n```\r\n- ENABLE_LOG_TIMESTAMPS=1     // adds timestamp to the logging output (default is off)\r\n- LOG_LEVEL=DEBUG         // change log level (default is INFO)\r\n```","created_at":"2017-05-31T16:58:34Z","updated_at":"2017-06-02T15:30:16Z","closed_at":"2017-06-02T15:30:15Z","merged_at":"2017-06-02T15:30:15Z","merge_commit_sha":"d1a141db4a729ce1af2b77b2769c0d6f70dd0ca9","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/tokenbrowser/token-app-js/pulls/16/commits","review_comments_url":"https://api.github.com/repos/tokenbrowser/token-app-js/pulls/16/comments","review_comment_url":"https://api.github.com/repos/tokenbrowser/token-app-js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tokenbrowser/token-app-js/issues/16/comments","statuses_url":"https://api.github.com/repos/tokenbrowser/token-app-js/statuses/d1a141db4a729ce1af2b77b2769c0d6f70dd0ca9","head":{"label":"tokenbrowser:feature/get_balance","ref":"feature/get_balance","sha":"d1a141db4a729ce1af2b77b2769c0d6f70dd0ca9","user":{"login":"tokenbrowser","id":23038587,"avatar_url":"https://avatars3.githubusercontent.com/u/23038587?v=3","gravatar_id":"","url":"https://api.github.com/users/tokenbrowser","html_url":"https://github.com/tokenbrowser","followers_url":"https://api.github.com/users/tokenbrowser/followers","following_url":"https://api.github.com/users/tokenbrowser/following{/other_user}","gists_url":"https://api.github.com/users/tokenbrowser/gists{/gist_id}","starred_url":"https://api.github.com/users/tokenbrowser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tokenbrowser/subscriptions","organizations_url":"https://api.github.com/users/tokenbrowser/orgs","repos_url":"https://api.github.com/users/tokenbrowser/repos","events_url":"https://api.github.com/users/tokenbrowser/events{/privacy}","received_events_url":"https://api.github.com/users/tokenbrowser/received_events","type":"Organization","site_admin":false},"repo":{"id":80844241,"name":"token-app-js","full_name":"tokenbrowser/token-app-js","owner":{"login":"tokenbrowser","id":23038587,"avatar_url":"https://avatars3.githubusercontent.com/u/23038587?v=3","gravatar_id":"","url":"https://api.github.com/users/tokenbrowser","html_url":"https://github.com/tokenbrowser","followers_url":"https://api.github.com/users/tokenbrowser/followers","following_url":"https://api.github.com/users/tokenbrowser/following{/other_user}","gists_url":"https://api.github.com/users/tokenbrowser/gists{/gist_id}","starred_url":"https://api.github.com/users/tokenbrowser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tokenbrowser/subscriptions","organizations_url":"https://api.github.com/users/tokenbrowser/orgs","repos_url":"https://api.github.com/users/tokenbrowser/repos","events_url":"https://api.github.com/users/tokenbrowser/events{/privacy}","received_events_url":"https://api.github.com/users/tokenbrowser/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tokenbrowser/token-app-js","description":"Foundation for building a Javascript app for Token (Chat Bot / Web View) with configurations for Docker and Heroku","fork":false,"url":"https://api.github.com/repos/tokenbrowser/token-app-js","forks_url":"https://api.github.com/repos/tokenbrowser/token-app-js/forks","keys_url":"https://api.github.com/repos/tokenbrowser/token-app-js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tokenbrowser/token-app-js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tokenbrowser/token-app-js/teams","hooks_url":"https://api.github.com/repos/tokenbrowser/token-app-js/hooks","issue_events_url":"https://api.github.com/repos/tokenbrowser/token-app-js/issues/events{/number}","events_url":"https://api.github.com/repos/tokenbrowser/token-app-js/events","assignees_url":"https://api.github.com/repos/tokenbrowser/token-app-js/assignees{/user}","branches_url":"https://api.github.com/repos/tokenbrowser/token-app-js/branches{/branch}","tags_url":"https://api.github.com/repos/tokenbrowser/token-app-js/tags","blobs_url":"https://api.github.com/repos/tokenbrowser/token-app-js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tokenbrowser/token-app-js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tokenbrowser/token-app-js/git/refs{/sha}","trees_url":"https://api.github.com/repos/tokenbrowser/token-app-js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tokenbrowser/token-app-js/statuses/{sha}","languages_url":"https://api.github.com/repos/tokenbrowser/token-app-js/languages","stargazers_url":"https://api.github.com/repos/tokenbrowser/token-app-js/stargazers","contributors_url":"https://api.github.com/repos/tokenbrowser/token-app-js/contributors","subscribers_url":"https://api.github.com/repos/tokenbrowser/token-app-js/subscribers","subscription_url":"https://api.github.com/repos/tokenbrowser/token-app-js/subscription","commits_url":"https://api.github.com/repos/tokenbrowser/token-app-js/commits{/sha}","git_commits_url":"https://api.github.com/repos/tokenbrowser/token-app-js/git/commits{/sha}","comments_url":"https://api.github.com/repos/tokenbrowser/token-app-js/comments{/number}","issue_comment_url":"https://api.github.com/repos/tokenbrowser/token-app-js/issues/comments{/number}","contents_url":"https://api.github.com/repos/tokenbrowser/token-app-js/contents/{+path}","compare_url":"https://api.github.com/repos/tokenbrowser/token-app-js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tokenbrowser/token-app-js/merges","archive_url":"https://api.github.com/repos/tokenbrowser/token-app-js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tokenbrowser/token-app-js/downloads","issues_url":"https://api.github.com/repos/tokenbrowser/token-app-js/issues{/number}","pulls_url":"https://api.github.com/repos/tokenbrowser/token-app-js/pulls{/number}","milestones_url":"https://api.github.com/repos/tokenbrowser/token-app-js/milestones{/number}","notifications_url":"https://api.github.com/repos/tokenbrowser/token-app-js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tokenbrowser/token-app-js/labels{/name}","releases_url":"https://api.github.com/repos/tokenbrowser/token-app-js/releases{/id}","deployments_url":"https://api.github.com/repos/tokenbrowser/token-app-js/deployments","created_at":"2017-02-03T15:57:45Z","updated_at":"2017-05-31T16:03:08Z","pushed_at":"2017-06-02T15:30:15Z","git_url":"git://github.com/tokenbrowser/token-app-js.git","ssh_url":"git@github.com:tokenbrowser/token-app-js.git","clone_url":"https://github.com/tokenbrowser/token-app-js.git","svn_url":"https://github.com/tokenbrowser/token-app-js","homepage":"","size":26805,"stargazers_count":47,"watchers_count":47,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":56,"mirror_url":null,"open_issues_count":3,"forks":56,"open_issues":3,"watchers":47,"default_branch":"master"}},"base":{"label":"tokenbrowser:v0.1.3-dev","ref":"v0.1.3-dev","sha":"71134918fbffd8462743b9c7e8c975fc5a82cb5b","user":{"login":"tokenbrowser","id":23038587,"avatar_url":"https://avatars3.githubusercontent.com/u/23038587?v=3","gravatar_id":"","url":"https://api.github.com/users/tokenbrowser","html_url":"https://github.com/tokenbrowser","followers_url":"https://api.github.com/users/tokenbrowser/followers","following_url":"https://api.github.com/users/tokenbrowser/following{/other_user}","gists_url":"https://api.github.com/users/tokenbrowser/gists{/gist_id}","starred_url":"https://api.github.com/users/tokenbrowser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tokenbrowser/subscriptions","organizations_url":"https://api.github.com/users/tokenbrowser/orgs","repos_url":"https://api.github.com/users/tokenbrowser/repos","events_url":"https://api.github.com/users/tokenbrowser/events{/privacy}","received_events_url":"https://api.github.com/users/tokenbrowser/received_events","type":"Organization","site_admin":false},"repo":{"id":80844241,"name":"token-app-js","full_name":"tokenbrowser/token-app-js","owner":{"login":"tokenbrowser","id":23038587,"avatar_url":"https://avatars3.githubusercontent.com/u/23038587?v=3","gravatar_id":"","url":"https://api.github.com/users/tokenbrowser","html_url":"https://github.com/tokenbrowser","followers_url":"https://api.github.com/users/tokenbrowser/followers","following_url":"https://api.github.com/users/tokenbrowser/following{/other_user}","gists_url":"https://api.github.com/users/tokenbrowser/gists{/gist_id}","starred_url":"https://api.github.com/users/tokenbrowser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tokenbrowser/subscriptions","organizations_url":"https://api.github.com/users/tokenbrowser/orgs","repos_url":"https://api.github.com/users/tokenbrowser/repos","events_url":"https://api.github.com/users/tokenbrowser/events{/privacy}","received_events_url":"https://api.github.com/users/tokenbrowser/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tokenbrowser/token-app-js","description":"Foundation for building a Javascript app for Token (Chat Bot / Web View) with configurations for Docker and Heroku","fork":false,"url":"https://api.github.com/repos/tokenbrowser/token-app-js","forks_url":"https://api.github.com/repos/tokenbrowser/token-app-js/forks","keys_url":"https://api.github.com/repos/tokenbrowser/token-app-js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tokenbrowser/token-app-js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tokenbrowser/token-app-js/teams","hooks_url":"https://api.github.com/repos/tokenbrowser/token-app-js/hooks","issue_events_url":"https://api.github.com/repos/tokenbrowser/token-app-js/issues/events{/number}","events_url":"https://api.github.com/repos/tokenbrowser/token-app-js/events","assignees_url":"https://api.github.com/repos/tokenbrowser/token-app-js/assignees{/user}","branches_url":"https://api.github.com/repos/tokenbrowser/token-app-js/branches{/branch}","tags_url":"https://api.github.com/repos/tokenbrowser/token-app-js/tags","blobs_url":"https://api.github.com/repos/tokenbrowser/token-app-js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tokenbrowser/token-app-js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tokenbrowser/token-app-js/git/refs{/sha}","trees_url":"https://api.github.com/repos/tokenbrowser/token-app-js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tokenbrowser/token-app-js/statuses/{sha}","languages_url":"https://api.github.com/repos/tokenbrowser/token-app-js/languages","stargazers_url":"https://api.github.com/repos/tokenbrowser/token-app-js/stargazers","contributors_url":"https://api.github.com/repos/tokenbrowser/token-app-js/contributors","subscribers_url":"https://api.github.com/repos/tokenbrowser/token-app-js/subscribers","subscription_url":"https://api.github.com/repos/tokenbrowser/token-app-js/subscription","commits_url":"https://api.github.com/repos/tokenbrowser/token-app-js/commits{/sha}","git_commits_url":"https://api.github.com/repos/tokenbrowser/token-app-js/git/commits{/sha}","comments_url":"https://api.github.com/repos/tokenbrowser/token-app-js/comments{/number}","issue_comment_url":"https://api.github.com/repos/tokenbrowser/token-app-js/issues/comments{/number}","contents_url":"https://api.github.com/repos/tokenbrowser/token-app-js/contents/{+path}","compare_url":"https://api.github.com/repos/tokenbrowser/token-app-js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tokenbrowser/token-app-js/merges","archive_url":"https://api.github.com/repos/tokenbrowser/token-app-js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tokenbrowser/token-app-js/downloads","issues_url":"https://api.github.com/repos/tokenbrowser/token-app-js/issues{/number}","pulls_url":"https://api.github.com/repos/tokenbrowser/token-app-js/pulls{/number}","milestones_url":"https://api.github.com/repos/tokenbrowser/token-app-js/milestones{/number}","notifications_url":"https://api.github.com/repos/tokenbrowser/token-app-js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tokenbrowser/token-app-js/labels{/name}","releases_url":"https://api.github.com/repos/tokenbrowser/token-app-js/releases{/id}","deployments_url":"https://api.github.com/repos/tokenbrowser/token-app-js/deployments","created_at":"2017-02-03T15:57:45Z","updated_at":"2017-05-31T16:03:08Z","pushed_at":"2017-06-02T15:30:15Z","git_url":"git://github.com/tokenbrowser/token-app-js.git","ssh_url":"git@github.com:tokenbrowser/token-app-js.git","clone_url":"https://github.com/tokenbrowser/token-app-js.git","svn_url":"https://github.com/tokenbrowser/token-app-js","homepage":"","size":26805,"stargazers_count":47,"watchers_count":47,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":56,"mirror_url":null,"open_issues_count":3,"forks":56,"open_issues":3,"watchers":47,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tokenbrowser/token-app-js/pulls/16"},"html":{"href":"https://github.com/tokenbrowser/token-app-js/pull/16"},"issue":{"href":"https://api.github.com/repos/tokenbrowser/token-app-js/issues/16"},"comments":{"href":"https://api.github.com/repos/tokenbrowser/token-app-js/issues/16/comments"},"review_comments":{"href":"https://api.github.com/repos/tokenbrowser/token-app-js/pulls/16/comments"},"review_comment":{"href":"https://api.github.com/repos/tokenbrowser/token-app-js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tokenbrowser/token-app-js/pulls/16/commits"},"statuses":{"href":"https://api.github.com/repos/tokenbrowser/token-app-js/statuses/d1a141db4a729ce1af2b77b2769c0d6f70dd0ca9"}},"merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"faymontage","id":7949897,"avatar_url":"https://avatars1.githubusercontent.com/u/7949897?v=3","gravatar_id":"","url":"https://api.github.com/users/faymontage","html_url":"https://github.com/faymontage","followers_url":"https://api.github.com/users/faymontage/followers","following_url":"https://api.github.com/users/faymontage/following{/other_user}","gists_url":"https://api.github.com/users/faymontage/gists{/gist_id}","starred_url":"https://api.github.com/users/faymontage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/faymontage/subscriptions","organizations_url":"https://api.github.com/users/faymontage/orgs","repos_url":"https://api.github.com/users/faymontage/repos","events_url":"https://api.github.com/users/faymontage/events{/privacy}","received_events_url":"https://api.github.com/users/faymontage/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":10,"additions":765,"deletions":194,"changed_files":19}}
{"actor":{"display_login":"faymontage"}}