{"action":"created","comment":{"url":"https://api.github.com/repos/bitpay/bitcore-wallet-service/pulls/comments/24583876","id":24583876,"diff_hunk":"@@ -13,8 +13,10 @@ function TxProposal(opts) {\n   opts = opts || {};\n \n   this.version = VERSION;\n-  this.createdOn = Math.floor(Date.now() / 1000);\n-  this.id = ('000000000000' + this.createdOn).slice(-12) + Uuid.v4();\n+\n+  var now = Date.now();\n+  this.createdOn = Math.floor(now / 1000);\n+  this.id = ('00000000000000' + now).slice(-14) + Uuid.v4();","path":"lib/model/txproposal.js","position":9,"original_position":9,"commit_id":"0d36c3481b1e8a4b5ceab257bd341a79f231536e","original_commit_id":"0d36c3481b1e8a4b5ceab257bd341a79f231536e","user":{"login":"maraoz","id":287189,"avatar_url":"https://avatars.githubusercontent.com/u/287189?v=3","gravatar_id":"","url":"https://api.github.com/users/maraoz","html_url":"https://github.com/maraoz","followers_url":"https://api.github.com/users/maraoz/followers","following_url":"https://api.github.com/users/maraoz/following{/other_user}","gists_url":"https://api.github.com/users/maraoz/gists{/gist_id}","starred_url":"https://api.github.com/users/maraoz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maraoz/subscriptions","organizations_url":"https://api.github.com/users/maraoz/orgs","repos_url":"https://api.github.com/users/maraoz/repos","events_url":"https://api.github.com/users/maraoz/events{/privacy}","received_events_url":"https://api.github.com/users/maraoz/received_events","type":"User","site_admin":false},"body":"I would extract this to:\r\n```\r\nvar zeroPad = function(x, length) {\r\n  return (Array(length).join('0') + x).slice(-length);\r\n};\r\n```\r\nfor clarity","created_at":"2015-02-12T14:29:34Z","updated_at":"2015-02-12T14:29:34Z","html_url":"https://github.com/bitpay/bitcore-wallet-service/pull/2#discussion_r24583876","pull_request_url":"https://api.github.com/repos/bitpay/bitcore-wallet-service/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/bitpay/bitcore-wallet-service/pulls/comments/24583876"},"html":{"href":"https://github.com/bitpay/bitcore-wallet-service/pull/2#discussion_r24583876"},"pull_request":{"href":"https://api.github.com/repos/bitpay/bitcore-wallet-service/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/bitpay/bitcore-wallet-service/pulls/2","id":29118371,"html_url":"https://github.com/bitpay/bitcore-wallet-service/pull/2","diff_url":"https://github.com/bitpay/bitcore-wallet-service/pull/2.diff","patch_url":"https://github.com/bitpay/bitcore-wallet-service/pull/2.patch","issue_url":"https://api.github.com/repos/bitpay/bitcore-wallet-service/issues/2","number":2,"state":"open","locked":false,"title":"Feat/notifications","user":{"login":"matiu","id":98844,"avatar_url":"https://avatars.githubusercontent.com/u/98844?v=3","gravatar_id":"","url":"https://api.github.com/users/matiu","html_url":"https://github.com/matiu","followers_url":"https://api.github.com/users/matiu/followers","following_url":"https://api.github.com/users/matiu/following{/other_user}","gists_url":"https://api.github.com/users/matiu/gists{/gist_id}","starred_url":"https://api.github.com/users/matiu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matiu/subscriptions","organizations_url":"https://api.github.com/users/matiu/orgs","repos_url":"https://api.github.com/users/matiu/repos","events_url":"https://api.github.com/users/matiu/events{/privacy}","received_events_url":"https://api.github.com/users/matiu/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-02-11T19:03:02Z","updated_at":"2015-02-12T14:29:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"507099f9b2848abe3fcd3091b28b524c457f59c1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/bitpay/bitcore-wallet-service/pulls/2/commits","review_comments_url":"https://api.github.com/repos/bitpay/bitcore-wallet-service/pulls/2/comments","review_comment_url":"https://api.github.com/repos/bitpay/bitcore-wallet-service/pulls/comments/{number}","comments_url":"https://api.github.com/repos/bitpay/bitcore-wallet-service/issues/2/comments","statuses_url":"https://api.github.com/repos/bitpay/bitcore-wallet-service/statuses/0d36c3481b1e8a4b5ceab257bd341a79f231536e","head":{"label":"matiu:feat/notifications2","ref":"feat/notifications2","sha":"0d36c3481b1e8a4b5ceab257bd341a79f231536e","user":{"login":"matiu","id":98844,"avatar_url":"https://avatars.githubusercontent.com/u/98844?v=3","gravatar_id":"","url":"https://api.github.com/users/matiu","html_url":"https://github.com/matiu","followers_url":"https://api.github.com/users/matiu/followers","following_url":"https://api.github.com/users/matiu/following{/other_user}","gists_url":"https://api.github.com/users/matiu/gists{/gist_id}","starred_url":"https://api.github.com/users/matiu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matiu/subscriptions","organizations_url":"https://api.github.com/users/matiu/orgs","repos_url":"https://api.github.com/users/matiu/repos","events_url":"https://api.github.com/users/matiu/events{/privacy}","received_events_url":"https://api.github.com/users/matiu/received_events","type":"User","site_admin":false},"repo":{"id":29918987,"name":"copay-server","full_name":"matiu/copay-server","owner":{"login":"matiu","id":98844,"avatar_url":"https://avatars.githubusercontent.com/u/98844?v=3","gravatar_id":"","url":"https://api.github.com/users/matiu","html_url":"https://github.com/matiu","followers_url":"https://api.github.com/users/matiu/followers","following_url":"https://api.github.com/users/matiu/following{/other_user}","gists_url":"https://api.github.com/users/matiu/gists{/gist_id}","starred_url":"https://api.github.com/users/matiu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matiu/subscriptions","organizations_url":"https://api.github.com/users/matiu/orgs","repos_url":"https://api.github.com/users/matiu/repos","events_url":"https://api.github.com/users/matiu/events{/privacy}","received_events_url":"https://api.github.com/users/matiu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/matiu/copay-server","description":"Copay server","fork":true,"url":"https://api.github.com/repos/matiu/copay-server","forks_url":"https://api.github.com/repos/matiu/copay-server/forks","keys_url":"https://api.github.com/repos/matiu/copay-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/matiu/copay-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/matiu/copay-server/teams","hooks_url":"https://api.github.com/repos/matiu/copay-server/hooks","issue_events_url":"https://api.github.com/repos/matiu/copay-server/issues/events{/number}","events_url":"https://api.github.com/repos/matiu/copay-server/events","assignees_url":"https://api.github.com/repos/matiu/copay-server/assignees{/user}","branches_url":"https://api.github.com/repos/matiu/copay-server/branches{/branch}","tags_url":"https://api.github.com/repos/matiu/copay-server/tags","blobs_url":"https://api.github.com/repos/matiu/copay-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/matiu/copay-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/matiu/copay-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/matiu/copay-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/matiu/copay-server/statuses/{sha}","languages_url":"https://api.github.com/repos/matiu/copay-server/languages","stargazers_url":"https://api.github.com/repos/matiu/copay-server/stargazers","contributors_url":"https://api.github.com/repos/matiu/copay-server/contributors","subscribers_url":"https://api.github.com/repos/matiu/copay-server/subscribers","subscription_url":"https://api.github.com/repos/matiu/copay-server/subscription","commits_url":"https://api.github.com/repos/matiu/copay-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/matiu/copay-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/matiu/copay-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/matiu/copay-server/issues/comments/{number}","contents_url":"https://api.github.com/repos/matiu/copay-server/contents/{+path}","compare_url":"https://api.github.com/repos/matiu/copay-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/matiu/copay-server/merges","archive_url":"https://api.github.com/repos/matiu/copay-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/matiu/copay-server/downloads","issues_url":"https://api.github.com/repos/matiu/copay-server/issues{/number}","pulls_url":"https://api.github.com/repos/matiu/copay-server/pulls{/number}","milestones_url":"https://api.github.com/repos/matiu/copay-server/milestones{/number}","notifications_url":"https://api.github.com/repos/matiu/copay-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/matiu/copay-server/labels{/name}","releases_url":"https://api.github.com/repos/matiu/copay-server/releases{/id}","created_at":"2015-01-27T15:01:27Z","updated_at":"2015-02-02T20:55:57Z","pushed_at":"2015-02-12T13:57:18Z","git_url":"git://github.com/matiu/copay-server.git","ssh_url":"git@github.com:matiu/copay-server.git","clone_url":"https://github.com/matiu/copay-server.git","svn_url":"https://github.com/matiu/copay-server","homepage":null,"size":548,"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":"master"}},"base":{"label":"bitpay:master","ref":"master","sha":"cecb1a703bed419927030bc2d6380143aa71684c","user":{"login":"bitpay","id":2554930,"avatar_url":"https://avatars.githubusercontent.com/u/2554930?v=3","gravatar_id":"","url":"https://api.github.com/users/bitpay","html_url":"https://github.com/bitpay","followers_url":"https://api.github.com/users/bitpay/followers","following_url":"https://api.github.com/users/bitpay/following{/other_user}","gists_url":"https://api.github.com/users/bitpay/gists{/gist_id}","starred_url":"https://api.github.com/users/bitpay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitpay/subscriptions","organizations_url":"https://api.github.com/users/bitpay/orgs","repos_url":"https://api.github.com/users/bitpay/repos","events_url":"https://api.github.com/users/bitpay/events{/privacy}","received_events_url":"https://api.github.com/users/bitpay/received_events","type":"Organization","site_admin":false},"repo":{"id":30662924,"name":"bitcore-wallet-service","full_name":"bitpay/bitcore-wallet-service","owner":{"login":"bitpay","id":2554930,"avatar_url":"https://avatars.githubusercontent.com/u/2554930?v=3","gravatar_id":"","url":"https://api.github.com/users/bitpay","html_url":"https://github.com/bitpay","followers_url":"https://api.github.com/users/bitpay/followers","following_url":"https://api.github.com/users/bitpay/following{/other_user}","gists_url":"https://api.github.com/users/bitpay/gists{/gist_id}","starred_url":"https://api.github.com/users/bitpay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitpay/subscriptions","organizations_url":"https://api.github.com/users/bitpay/orgs","repos_url":"https://api.github.com/users/bitpay/repos","events_url":"https://api.github.com/users/bitpay/events{/privacy}","received_events_url":"https://api.github.com/users/bitpay/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bitpay/bitcore-wallet-service","description":"Copay server","fork":true,"url":"https://api.github.com/repos/bitpay/bitcore-wallet-service","forks_url":"https://api.github.com/repos/bitpay/bitcore-wallet-service/forks","keys_url":"https://api.github.com/repos/bitpay/bitcore-wallet-service/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bitpay/bitcore-wallet-service/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bitpay/bitcore-wallet-service/teams","hooks_url":"https://api.github.com/repos/bitpay/bitcore-wallet-service/hooks","issue_events_url":"https://api.github.com/repos/bitpay/bitcore-wallet-service/issues/events{/number}","events_url":"https://api.github.com/repos/bitpay/bitcore-wallet-service/events","assignees_url":"https://api.github.com/repos/bitpay/bitcore-wallet-service/assignees{/user}","branches_url":"https://api.github.com/repos/bitpay/bitcore-wallet-service/branches{/branch}","tags_url":"https://api.github.com/repos/bitpay/bitcore-wallet-service/tags","blobs_url":"https://api.github.com/repos/bitpay/bitcore-wallet-service/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bitpay/bitcore-wallet-service/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bitpay/bitcore-wallet-service/git/refs{/sha}","trees_url":"https://api.github.com/repos/bitpay/bitcore-wallet-service/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bitpay/bitcore-wallet-service/statuses/{sha}","languages_url":"https://api.github.com/repos/bitpay/bitcore-wallet-service/languages","stargazers_url":"https://api.github.com/repos/bitpay/bitcore-wallet-service/stargazers","contributors_url":"https://api.github.com/repos/bitpay/bitcore-wallet-service/contributors","subscribers_url":"https://api.github.com/repos/bitpay/bitcore-wallet-service/subscribers","subscription_url":"https://api.github.com/repos/bitpay/bitcore-wallet-service/subscription","commits_url":"https://api.github.com/repos/bitpay/bitcore-wallet-service/commits{/sha}","git_commits_url":"https://api.github.com/repos/bitpay/bitcore-wallet-service/git/commits{/sha}","comments_url":"https://api.github.com/repos/bitpay/bitcore-wallet-service/comments{/number}","issue_comment_url":"https://api.github.com/repos/bitpay/bitcore-wallet-service/issues/comments/{number}","contents_url":"https://api.github.com/repos/bitpay/bitcore-wallet-service/contents/{+path}","compare_url":"https://api.github.com/repos/bitpay/bitcore-wallet-service/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bitpay/bitcore-wallet-service/merges","archive_url":"https://api.github.com/repos/bitpay/bitcore-wallet-service/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bitpay/bitcore-wallet-service/downloads","issues_url":"https://api.github.com/repos/bitpay/bitcore-wallet-service/issues{/number}","pulls_url":"https://api.github.com/repos/bitpay/bitcore-wallet-service/pulls{/number}","milestones_url":"https://api.github.com/repos/bitpay/bitcore-wallet-service/milestones{/number}","notifications_url":"https://api.github.com/repos/bitpay/bitcore-wallet-service/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bitpay/bitcore-wallet-service/labels{/name}","releases_url":"https://api.github.com/repos/bitpay/bitcore-wallet-service/releases{/id}","created_at":"2015-02-11T18:33:39Z","updated_at":"2015-02-11T19:25:26Z","pushed_at":"2015-02-11T19:25:25Z","git_url":"git://github.com/bitpay/bitcore-wallet-service.git","ssh_url":"git@github.com:bitpay/bitcore-wallet-service.git","clone_url":"https://github.com/bitpay/bitcore-wallet-service.git","svn_url":"https://github.com/bitpay/bitcore-wallet-service","homepage":null,"size":957,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bitpay/bitcore-wallet-service/pulls/2"},"html":{"href":"https://github.com/bitpay/bitcore-wallet-service/pull/2"},"issue":{"href":"https://api.github.com/repos/bitpay/bitcore-wallet-service/issues/2"},"comments":{"href":"https://api.github.com/repos/bitpay/bitcore-wallet-service/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/bitpay/bitcore-wallet-service/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/bitpay/bitcore-wallet-service/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/bitpay/bitcore-wallet-service/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/bitpay/bitcore-wallet-service/statuses/0d36c3481b1e8a4b5ceab257bd341a79f231536e"}}}}