{"action":"created","comment":{"url":"https://api.github.com/repos/ripple/ripple-rest/pulls/comments/23632840","id":23632840,"diff_hunk":"@@ -428,6 +428,42 @@ function getAccountPayments(request, response, next) {\n     transactions.getAccountTransactions(options, response, callback);\n   };\n \n+  function attachDate(transactions, callback) {\n+    var ledgerRequests = {};\n+    var ledgerData = {};\n+\n+    async.each(transactions, function(transaction, next) {\n+      // Prevent duplicate ledger requests\n+      if (ledgerRequests[transaction.ledger_index] instanceof ripple.Request) {\n+        return next(null);\n+      }\n+\n+      ledgerRequests[transaction.ledger_index] = remote.requestLedger({\n+        ledger_index: transaction.ledger_index\n+      }, function (err, data) {\n+        if (err) {\n+          return next(err);\n+        }\n+\n+        ledgerData[transaction.ledger_index] = data.ledger;\n+\n+        next(null);\n+      });\n+    }, function (err) {\n+      if (err) {\n+        return callback(err);\n+      }\n+\n+      _.each(transactions, function (transaction) {","path":"api/payments.js","position":30,"original_position":30,"commit_id":"b558424b165321617effa966bbb3f9f63345f91c","original_commit_id":"b558424b165321617effa966bbb3f9f63345f91c","user":{"login":"lumberj","id":1812196,"avatar_url":"https://avatars.githubusercontent.com/u/1812196?v=3","gravatar_id":"","url":"https://api.github.com/users/lumberj","html_url":"https://github.com/lumberj","followers_url":"https://api.github.com/users/lumberj/followers","following_url":"https://api.github.com/users/lumberj/following{/other_user}","gists_url":"https://api.github.com/users/lumberj/gists{/gist_id}","starred_url":"https://api.github.com/users/lumberj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lumberj/subscriptions","organizations_url":"https://api.github.com/users/lumberj/orgs","repos_url":"https://api.github.com/users/lumberj/repos","events_url":"https://api.github.com/users/lumberj/events{/privacy}","received_events_url":"https://api.github.com/users/lumberj/received_events","type":"User","site_admin":false},"body":"Maybe create inner functions instead of using anonymous functions here? It would be easier to parse visually. I had a hard time tracking where the commas and closing `}`","created_at":"2015-01-27T19:04:03Z","updated_at":"2015-01-27T19:04:03Z","html_url":"https://github.com/ripple/ripple-rest/pull/275#discussion_r23632840","pull_request_url":"https://api.github.com/repos/ripple/ripple-rest/pulls/275","_links":{"self":{"href":"https://api.github.com/repos/ripple/ripple-rest/pulls/comments/23632840"},"html":{"href":"https://github.com/ripple/ripple-rest/pull/275#discussion_r23632840"},"pull_request":{"href":"https://api.github.com/repos/ripple/ripple-rest/pulls/275"}}},"pull_request":{"url":"https://api.github.com/repos/ripple/ripple-rest/pulls/275","id":28068223,"html_url":"https://github.com/ripple/ripple-rest/pull/275","diff_url":"https://github.com/ripple/ripple-rest/pull/275.diff","patch_url":"https://github.com/ripple/ripple-rest/pull/275.patch","issue_url":"https://api.github.com/repos/ripple/ripple-rest/issues/275","number":275,"state":"open","locked":false,"title":"[TEST] update tests against latest lib","user":{"login":"boxbag","id":719745,"avatar_url":"https://avatars.githubusercontent.com/u/719745?v=3","gravatar_id":"","url":"https://api.github.com/users/boxbag","html_url":"https://github.com/boxbag","followers_url":"https://api.github.com/users/boxbag/followers","following_url":"https://api.github.com/users/boxbag/following{/other_user}","gists_url":"https://api.github.com/users/boxbag/gists{/gist_id}","starred_url":"https://api.github.com/users/boxbag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boxbag/subscriptions","organizations_url":"https://api.github.com/users/boxbag/orgs","repos_url":"https://api.github.com/users/boxbag/repos","events_url":"https://api.github.com/users/boxbag/events{/privacy}","received_events_url":"https://api.github.com/users/boxbag/received_events","type":"User","site_admin":false},"body":null,"created_at":"2015-01-26T22:57:27Z","updated_at":"2015-01-27T19:04:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ecb7ff6576e979849f9446d68810bd65f68370fc","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ripple/ripple-rest/pulls/275/commits","review_comments_url":"https://api.github.com/repos/ripple/ripple-rest/pulls/275/comments","review_comment_url":"https://api.github.com/repos/ripple/ripple-rest/pulls/comments/{number}","comments_url":"https://api.github.com/repos/ripple/ripple-rest/issues/275/comments","statuses_url":"https://api.github.com/repos/ripple/ripple-rest/statuses/b558424b165321617effa966bbb3f9f63345f91c","head":{"label":"boxbag:update-tests","ref":"update-tests","sha":"b558424b165321617effa966bbb3f9f63345f91c","user":{"login":"boxbag","id":719745,"avatar_url":"https://avatars.githubusercontent.com/u/719745?v=3","gravatar_id":"","url":"https://api.github.com/users/boxbag","html_url":"https://github.com/boxbag","followers_url":"https://api.github.com/users/boxbag/followers","following_url":"https://api.github.com/users/boxbag/following{/other_user}","gists_url":"https://api.github.com/users/boxbag/gists{/gist_id}","starred_url":"https://api.github.com/users/boxbag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boxbag/subscriptions","organizations_url":"https://api.github.com/users/boxbag/orgs","repos_url":"https://api.github.com/users/boxbag/repos","events_url":"https://api.github.com/users/boxbag/events{/privacy}","received_events_url":"https://api.github.com/users/boxbag/received_events","type":"User","site_admin":false},"repo":{"id":25267876,"name":"ripple-rest","full_name":"boxbag/ripple-rest","owner":{"login":"boxbag","id":719745,"avatar_url":"https://avatars.githubusercontent.com/u/719745?v=3","gravatar_id":"","url":"https://api.github.com/users/boxbag","html_url":"https://github.com/boxbag","followers_url":"https://api.github.com/users/boxbag/followers","following_url":"https://api.github.com/users/boxbag/following{/other_user}","gists_url":"https://api.github.com/users/boxbag/gists{/gist_id}","starred_url":"https://api.github.com/users/boxbag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boxbag/subscriptions","organizations_url":"https://api.github.com/users/boxbag/orgs","repos_url":"https://api.github.com/users/boxbag/repos","events_url":"https://api.github.com/users/boxbag/events{/privacy}","received_events_url":"https://api.github.com/users/boxbag/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/boxbag/ripple-rest","description":"A RESTful API for submitting payments and monitoring accounts on the Ripple Network","fork":true,"url":"https://api.github.com/repos/boxbag/ripple-rest","forks_url":"https://api.github.com/repos/boxbag/ripple-rest/forks","keys_url":"https://api.github.com/repos/boxbag/ripple-rest/keys{/key_id}","collaborators_url":"https://api.github.com/repos/boxbag/ripple-rest/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/boxbag/ripple-rest/teams","hooks_url":"https://api.github.com/repos/boxbag/ripple-rest/hooks","issue_events_url":"https://api.github.com/repos/boxbag/ripple-rest/issues/events{/number}","events_url":"https://api.github.com/repos/boxbag/ripple-rest/events","assignees_url":"https://api.github.com/repos/boxbag/ripple-rest/assignees{/user}","branches_url":"https://api.github.com/repos/boxbag/ripple-rest/branches{/branch}","tags_url":"https://api.github.com/repos/boxbag/ripple-rest/tags","blobs_url":"https://api.github.com/repos/boxbag/ripple-rest/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/boxbag/ripple-rest/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/boxbag/ripple-rest/git/refs{/sha}","trees_url":"https://api.github.com/repos/boxbag/ripple-rest/git/trees{/sha}","statuses_url":"https://api.github.com/repos/boxbag/ripple-rest/statuses/{sha}","languages_url":"https://api.github.com/repos/boxbag/ripple-rest/languages","stargazers_url":"https://api.github.com/repos/boxbag/ripple-rest/stargazers","contributors_url":"https://api.github.com/repos/boxbag/ripple-rest/contributors","subscribers_url":"https://api.github.com/repos/boxbag/ripple-rest/subscribers","subscription_url":"https://api.github.com/repos/boxbag/ripple-rest/subscription","commits_url":"https://api.github.com/repos/boxbag/ripple-rest/commits{/sha}","git_commits_url":"https://api.github.com/repos/boxbag/ripple-rest/git/commits{/sha}","comments_url":"https://api.github.com/repos/boxbag/ripple-rest/comments{/number}","issue_comment_url":"https://api.github.com/repos/boxbag/ripple-rest/issues/comments/{number}","contents_url":"https://api.github.com/repos/boxbag/ripple-rest/contents/{+path}","compare_url":"https://api.github.com/repos/boxbag/ripple-rest/compare/{base}...{head}","merges_url":"https://api.github.com/repos/boxbag/ripple-rest/merges","archive_url":"https://api.github.com/repos/boxbag/ripple-rest/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/boxbag/ripple-rest/downloads","issues_url":"https://api.github.com/repos/boxbag/ripple-rest/issues{/number}","pulls_url":"https://api.github.com/repos/boxbag/ripple-rest/pulls{/number}","milestones_url":"https://api.github.com/repos/boxbag/ripple-rest/milestones{/number}","notifications_url":"https://api.github.com/repos/boxbag/ripple-rest/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/boxbag/ripple-rest/labels{/name}","releases_url":"https://api.github.com/repos/boxbag/ripple-rest/releases{/id}","created_at":"2014-10-15T18:30:50Z","updated_at":"2015-01-27T18:43:48Z","pushed_at":"2015-01-27T18:45:00Z","git_url":"git://github.com/boxbag/ripple-rest.git","ssh_url":"git@github.com:boxbag/ripple-rest.git","clone_url":"https://github.com/boxbag/ripple-rest.git","svn_url":"https://github.com/boxbag/ripple-rest","homepage":"","size":2298,"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":"d727acbbb9c56d2db8f826913725e57c45136019","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":16561603,"name":"ripple-rest","full_name":"ripple/ripple-rest","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-rest","description":"A RESTful API for submitting payments and monitoring accounts on the Ripple Network","fork":false,"url":"https://api.github.com/repos/ripple/ripple-rest","forks_url":"https://api.github.com/repos/ripple/ripple-rest/forks","keys_url":"https://api.github.com/repos/ripple/ripple-rest/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ripple/ripple-rest/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ripple/ripple-rest/teams","hooks_url":"https://api.github.com/repos/ripple/ripple-rest/hooks","issue_events_url":"https://api.github.com/repos/ripple/ripple-rest/issues/events{/number}","events_url":"https://api.github.com/repos/ripple/ripple-rest/events","assignees_url":"https://api.github.com/repos/ripple/ripple-rest/assignees{/user}","branches_url":"https://api.github.com/repos/ripple/ripple-rest/branches{/branch}","tags_url":"https://api.github.com/repos/ripple/ripple-rest/tags","blobs_url":"https://api.github.com/repos/ripple/ripple-rest/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ripple/ripple-rest/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ripple/ripple-rest/git/refs{/sha}","trees_url":"https://api.github.com/repos/ripple/ripple-rest/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ripple/ripple-rest/statuses/{sha}","languages_url":"https://api.github.com/repos/ripple/ripple-rest/languages","stargazers_url":"https://api.github.com/repos/ripple/ripple-rest/stargazers","contributors_url":"https://api.github.com/repos/ripple/ripple-rest/contributors","subscribers_url":"https://api.github.com/repos/ripple/ripple-rest/subscribers","subscription_url":"https://api.github.com/repos/ripple/ripple-rest/subscription","commits_url":"https://api.github.com/repos/ripple/ripple-rest/commits{/sha}","git_commits_url":"https://api.github.com/repos/ripple/ripple-rest/git/commits{/sha}","comments_url":"https://api.github.com/repos/ripple/ripple-rest/comments{/number}","issue_comment_url":"https://api.github.com/repos/ripple/ripple-rest/issues/comments/{number}","contents_url":"https://api.github.com/repos/ripple/ripple-rest/contents/{+path}","compare_url":"https://api.github.com/repos/ripple/ripple-rest/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ripple/ripple-rest/merges","archive_url":"https://api.github.com/repos/ripple/ripple-rest/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ripple/ripple-rest/downloads","issues_url":"https://api.github.com/repos/ripple/ripple-rest/issues{/number}","pulls_url":"https://api.github.com/repos/ripple/ripple-rest/pulls{/number}","milestones_url":"https://api.github.com/repos/ripple/ripple-rest/milestones{/number}","notifications_url":"https://api.github.com/repos/ripple/ripple-rest/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ripple/ripple-rest/labels{/name}","releases_url":"https://api.github.com/repos/ripple/ripple-rest/releases{/id}","created_at":"2014-02-05T22:52:44Z","updated_at":"2015-01-27T18:23:28Z","pushed_at":"2015-01-27T18:23:28Z","git_url":"git://github.com/ripple/ripple-rest.git","ssh_url":"git@github.com:ripple/ripple-rest.git","clone_url":"https://github.com/ripple/ripple-rest.git","svn_url":"https://github.com/ripple/ripple-rest","homepage":"","size":5152,"stargazers_count":52,"watchers_count":52,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":58,"mirror_url":null,"open_issues_count":14,"forks":58,"open_issues":14,"watchers":52,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/ripple/ripple-rest/pulls/275"},"html":{"href":"https://github.com/ripple/ripple-rest/pull/275"},"issue":{"href":"https://api.github.com/repos/ripple/ripple-rest/issues/275"},"comments":{"href":"https://api.github.com/repos/ripple/ripple-rest/issues/275/comments"},"review_comments":{"href":"https://api.github.com/repos/ripple/ripple-rest/pulls/275/comments"},"review_comment":{"href":"https://api.github.com/repos/ripple/ripple-rest/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/ripple/ripple-rest/pulls/275/commits"},"statuses":{"href":"https://api.github.com/repos/ripple/ripple-rest/statuses/b558424b165321617effa966bbb3f9f63345f91c"}}}}