{"action":"created","comment":{"url":"https://api.github.com/repos/ripple/ripple-lib/pulls/comments/34110170","id":34110170,"diff_hunk":"@@ -4,6 +4,15 @@ const _ = require('lodash');\n const transactionParser = require('ripple-lib-transactionparser');\n const toTimestamp = require('../../../core/utils').toTimestamp;\n const utils = require('../utils');\n+const BigNumber = require('bignumber.js');\n+\n+function adjustQualityForXRP(quality: string, takerGetsCurrency: string,\n+    takerPaysCurrency: string) {\n+  const shift = (takerGetsCurrency === 'XRP' ? 6 : 0)","path":"src/api/ledger/parse/utils.js","position":8,"original_position":8,"commit_id":"1309b58592ca9ef9224d471a960807f5f19e5132","original_commit_id":"1309b58592ca9ef9224d471a960807f5f19e5132","user":{"login":"sublimator","id":525211,"avatar_url":"https://avatars.githubusercontent.com/u/525211?v=3","gravatar_id":"","url":"https://api.github.com/users/sublimator","html_url":"https://github.com/sublimator","followers_url":"https://api.github.com/users/sublimator/followers","following_url":"https://api.github.com/users/sublimator/following{/other_user}","gists_url":"https://api.github.com/users/sublimator/gists{/gist_id}","starred_url":"https://api.github.com/users/sublimator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sublimator/subscriptions","organizations_url":"https://api.github.com/users/sublimator/orgs","repos_url":"https://api.github.com/users/sublimator/repos","events_url":"https://api.github.com/users/sublimator/events{/privacy}","received_events_url":"https://api.github.com/users/sublimator/received_events","type":"User","site_admin":false},"body":"> The subtraction method looks more readable to me.\r\n\r\nCan't account for taste.\r\n\r\n> logically correct\r\n\r\nActually, it's illegal for both to be XRP, so you can do basically `if (isXRP(gets)) { ... } else if (isXRP(pays)) { ... } else  {...}`","created_at":"2015-07-08T01:51:04Z","updated_at":"2015-07-08T01:51:04Z","html_url":"https://github.com/ripple/ripple-lib/pull/398#discussion_r34110170","pull_request_url":"https://api.github.com/repos/ripple/ripple-lib/pulls/398","_links":{"self":{"href":"https://api.github.com/repos/ripple/ripple-lib/pulls/comments/34110170"},"html":{"href":"https://github.com/ripple/ripple-lib/pull/398#discussion_r34110170"},"pull_request":{"href":"https://api.github.com/repos/ripple/ripple-lib/pulls/398"}}},"pull_request":{"url":"https://api.github.com/repos/ripple/ripple-lib/pulls/398","id":39427824,"html_url":"https://github.com/ripple/ripple-lib/pull/398","diff_url":"https://github.com/ripple/ripple-lib/pull/398.diff","patch_url":"https://github.com/ripple/ripple-lib/pull/398.patch","issue_url":"https://api.github.com/repos/ripple/ripple-lib/issues/398","number":398,"state":"open","locked":false,"title":"Add makerExchangeRate (quality) to orders, and maker to account orders","user":{"login":"clark800","id":1238722,"avatar_url":"https://avatars.githubusercontent.com/u/1238722?v=3","gravatar_id":"","url":"https://api.github.com/users/clark800","html_url":"https://github.com/clark800","followers_url":"https://api.github.com/users/clark800/followers","following_url":"https://api.github.com/users/clark800/following{/other_user}","gists_url":"https://api.github.com/users/clark800/gists{/gist_id}","starred_url":"https://api.github.com/users/clark800/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clark800/subscriptions","organizations_url":"https://api.github.com/users/clark800/orgs","repos_url":"https://api.github.com/users/clark800/repos","events_url":"https://api.github.com/users/clark800/events{/privacy}","received_events_url":"https://api.github.com/users/clark800/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-07-07T23:27:57Z","updated_at":"2015-07-08T01:51:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ab49fb940df03f995aa4ba037106cc8a4cd3065e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ripple/ripple-lib/pulls/398/commits","review_comments_url":"https://api.github.com/repos/ripple/ripple-lib/pulls/398/comments","review_comment_url":"https://api.github.com/repos/ripple/ripple-lib/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ripple/ripple-lib/issues/398/comments","statuses_url":"https://api.github.com/repos/ripple/ripple-lib/statuses/1309b58592ca9ef9224d471a960807f5f19e5132","head":{"label":"clark800:orders","ref":"orders","sha":"1309b58592ca9ef9224d471a960807f5f19e5132","user":{"login":"clark800","id":1238722,"avatar_url":"https://avatars.githubusercontent.com/u/1238722?v=3","gravatar_id":"","url":"https://api.github.com/users/clark800","html_url":"https://github.com/clark800","followers_url":"https://api.github.com/users/clark800/followers","following_url":"https://api.github.com/users/clark800/following{/other_user}","gists_url":"https://api.github.com/users/clark800/gists{/gist_id}","starred_url":"https://api.github.com/users/clark800/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clark800/subscriptions","organizations_url":"https://api.github.com/users/clark800/orgs","repos_url":"https://api.github.com/users/clark800/repos","events_url":"https://api.github.com/users/clark800/events{/privacy}","received_events_url":"https://api.github.com/users/clark800/received_events","type":"User","site_admin":false},"repo":{"id":27850085,"name":"ripple-lib","full_name":"clark800/ripple-lib","owner":{"login":"clark800","id":1238722,"avatar_url":"https://avatars.githubusercontent.com/u/1238722?v=3","gravatar_id":"","url":"https://api.github.com/users/clark800","html_url":"https://github.com/clark800","followers_url":"https://api.github.com/users/clark800/followers","following_url":"https://api.github.com/users/clark800/following{/other_user}","gists_url":"https://api.github.com/users/clark800/gists{/gist_id}","starred_url":"https://api.github.com/users/clark800/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clark800/subscriptions","organizations_url":"https://api.github.com/users/clark800/orgs","repos_url":"https://api.github.com/users/clark800/repos","events_url":"https://api.github.com/users/clark800/events{/privacy}","received_events_url":"https://api.github.com/users/clark800/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/clark800/ripple-lib","description":"A JavaScript API for interacting with Ripple in Node.js and the browser","fork":true,"url":"https://api.github.com/repos/clark800/ripple-lib","forks_url":"https://api.github.com/repos/clark800/ripple-lib/forks","keys_url":"https://api.github.com/repos/clark800/ripple-lib/keys{/key_id}","collaborators_url":"https://api.github.com/repos/clark800/ripple-lib/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/clark800/ripple-lib/teams","hooks_url":"https://api.github.com/repos/clark800/ripple-lib/hooks","issue_events_url":"https://api.github.com/repos/clark800/ripple-lib/issues/events{/number}","events_url":"https://api.github.com/repos/clark800/ripple-lib/events","assignees_url":"https://api.github.com/repos/clark800/ripple-lib/assignees{/user}","branches_url":"https://api.github.com/repos/clark800/ripple-lib/branches{/branch}","tags_url":"https://api.github.com/repos/clark800/ripple-lib/tags","blobs_url":"https://api.github.com/repos/clark800/ripple-lib/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/clark800/ripple-lib/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/clark800/ripple-lib/git/refs{/sha}","trees_url":"https://api.github.com/repos/clark800/ripple-lib/git/trees{/sha}","statuses_url":"https://api.github.com/repos/clark800/ripple-lib/statuses/{sha}","languages_url":"https://api.github.com/repos/clark800/ripple-lib/languages","stargazers_url":"https://api.github.com/repos/clark800/ripple-lib/stargazers","contributors_url":"https://api.github.com/repos/clark800/ripple-lib/contributors","subscribers_url":"https://api.github.com/repos/clark800/ripple-lib/subscribers","subscription_url":"https://api.github.com/repos/clark800/ripple-lib/subscription","commits_url":"https://api.github.com/repos/clark800/ripple-lib/commits{/sha}","git_commits_url":"https://api.github.com/repos/clark800/ripple-lib/git/commits{/sha}","comments_url":"https://api.github.com/repos/clark800/ripple-lib/comments{/number}","issue_comment_url":"https://api.github.com/repos/clark800/ripple-lib/issues/comments{/number}","contents_url":"https://api.github.com/repos/clark800/ripple-lib/contents/{+path}","compare_url":"https://api.github.com/repos/clark800/ripple-lib/compare/{base}...{head}","merges_url":"https://api.github.com/repos/clark800/ripple-lib/merges","archive_url":"https://api.github.com/repos/clark800/ripple-lib/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/clark800/ripple-lib/downloads","issues_url":"https://api.github.com/repos/clark800/ripple-lib/issues{/number}","pulls_url":"https://api.github.com/repos/clark800/ripple-lib/pulls{/number}","milestones_url":"https://api.github.com/repos/clark800/ripple-lib/milestones{/number}","notifications_url":"https://api.github.com/repos/clark800/ripple-lib/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/clark800/ripple-lib/labels{/name}","releases_url":"https://api.github.com/repos/clark800/ripple-lib/releases{/id}","created_at":"2014-12-11T02:21:32Z","updated_at":"2015-04-10T19:57:06Z","pushed_at":"2015-07-08T01:28:50Z","git_url":"git://github.com/clark800/ripple-lib.git","ssh_url":"git@github.com:clark800/ripple-lib.git","clone_url":"https://github.com/clark800/ripple-lib.git","svn_url":"https://github.com/clark800/ripple-lib","homepage":"","size":12290,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"ripple:develop","ref":"develop","sha":"73020fb8aef5382909fa948352a203b7ab02b892","user":{"login":"ripple","id":3165523,"avatar_url":"https://avatars.githubusercontent.com/u/3165523?v=3","gravatar_id":"","url":"https://api.github.com/users/ripple","html_url":"https://github.com/ripple","followers_url":"https://api.github.com/users/ripple/followers","following_url":"https://api.github.com/users/ripple/following{/other_user}","gists_url":"https://api.github.com/users/ripple/gists{/gist_id}","starred_url":"https://api.github.com/users/ripple/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ripple/subscriptions","organizations_url":"https://api.github.com/users/ripple/orgs","repos_url":"https://api.github.com/users/ripple/repos","events_url":"https://api.github.com/users/ripple/events{/privacy}","received_events_url":"https://api.github.com/users/ripple/received_events","type":"Organization","site_admin":false},"repo":{"id":9681561,"name":"ripple-lib","full_name":"ripple/ripple-lib","owner":{"login":"ripple","id":3165523,"avatar_url":"https://avatars.githubusercontent.com/u/3165523?v=3","gravatar_id":"","url":"https://api.github.com/users/ripple","html_url":"https://github.com/ripple","followers_url":"https://api.github.com/users/ripple/followers","following_url":"https://api.github.com/users/ripple/following{/other_user}","gists_url":"https://api.github.com/users/ripple/gists{/gist_id}","starred_url":"https://api.github.com/users/ripple/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ripple/subscriptions","organizations_url":"https://api.github.com/users/ripple/orgs","repos_url":"https://api.github.com/users/ripple/repos","events_url":"https://api.github.com/users/ripple/events{/privacy}","received_events_url":"https://api.github.com/users/ripple/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ripple/ripple-lib","description":"A JavaScript API for interacting with Ripple in Node.js and the browser","fork":false,"url":"https://api.github.com/repos/ripple/ripple-lib","forks_url":"https://api.github.com/repos/ripple/ripple-lib/forks","keys_url":"https://api.github.com/repos/ripple/ripple-lib/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ripple/ripple-lib/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ripple/ripple-lib/teams","hooks_url":"https://api.github.com/repos/ripple/ripple-lib/hooks","issue_events_url":"https://api.github.com/repos/ripple/ripple-lib/issues/events{/number}","events_url":"https://api.github.com/repos/ripple/ripple-lib/events","assignees_url":"https://api.github.com/repos/ripple/ripple-lib/assignees{/user}","branches_url":"https://api.github.com/repos/ripple/ripple-lib/branches{/branch}","tags_url":"https://api.github.com/repos/ripple/ripple-lib/tags","blobs_url":"https://api.github.com/repos/ripple/ripple-lib/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ripple/ripple-lib/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ripple/ripple-lib/git/refs{/sha}","trees_url":"https://api.github.com/repos/ripple/ripple-lib/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ripple/ripple-lib/statuses/{sha}","languages_url":"https://api.github.com/repos/ripple/ripple-lib/languages","stargazers_url":"https://api.github.com/repos/ripple/ripple-lib/stargazers","contributors_url":"https://api.github.com/repos/ripple/ripple-lib/contributors","subscribers_url":"https://api.github.com/repos/ripple/ripple-lib/subscribers","subscription_url":"https://api.github.com/repos/ripple/ripple-lib/subscription","commits_url":"https://api.github.com/repos/ripple/ripple-lib/commits{/sha}","git_commits_url":"https://api.github.com/repos/ripple/ripple-lib/git/commits{/sha}","comments_url":"https://api.github.com/repos/ripple/ripple-lib/comments{/number}","issue_comment_url":"https://api.github.com/repos/ripple/ripple-lib/issues/comments{/number}","contents_url":"https://api.github.com/repos/ripple/ripple-lib/contents/{+path}","compare_url":"https://api.github.com/repos/ripple/ripple-lib/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ripple/ripple-lib/merges","archive_url":"https://api.github.com/repos/ripple/ripple-lib/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ripple/ripple-lib/downloads","issues_url":"https://api.github.com/repos/ripple/ripple-lib/issues{/number}","pulls_url":"https://api.github.com/repos/ripple/ripple-lib/pulls{/number}","milestones_url":"https://api.github.com/repos/ripple/ripple-lib/milestones{/number}","notifications_url":"https://api.github.com/repos/ripple/ripple-lib/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ripple/ripple-lib/labels{/name}","releases_url":"https://api.github.com/repos/ripple/ripple-lib/releases{/id}","created_at":"2013-04-25T21:17:19Z","updated_at":"2015-07-06T16:13:04Z","pushed_at":"2015-07-08T01:28:50Z","git_url":"git://github.com/ripple/ripple-lib.git","ssh_url":"git@github.com:ripple/ripple-lib.git","clone_url":"https://github.com/ripple/ripple-lib.git","svn_url":"https://github.com/ripple/ripple-lib","homepage":"","size":17968,"stargazers_count":413,"watchers_count":413,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":142,"mirror_url":null,"open_issues_count":23,"forks":142,"open_issues":23,"watchers":413,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/ripple/ripple-lib/pulls/398"},"html":{"href":"https://github.com/ripple/ripple-lib/pull/398"},"issue":{"href":"https://api.github.com/repos/ripple/ripple-lib/issues/398"},"comments":{"href":"https://api.github.com/repos/ripple/ripple-lib/issues/398/comments"},"review_comments":{"href":"https://api.github.com/repos/ripple/ripple-lib/pulls/398/comments"},"review_comment":{"href":"https://api.github.com/repos/ripple/ripple-lib/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ripple/ripple-lib/pulls/398/commits"},"statuses":{"href":"https://api.github.com/repos/ripple/ripple-lib/statuses/1309b58592ca9ef9224d471a960807f5f19e5132"}}}}