{"action":"created","comment":{"url":"https://api.github.com/repos/bitpay/copay/pulls/comments/35348555","id":35348555,"diff_hunk":"@@ -53,23 +59,50 @@ angular.module('copayApp.controllers').controller('createController',\n         name: form.walletName.$modelValue,\n         extendedPrivateKey: form.privateKey.$modelValue,\n         myName: $scope.totalCopayers > 1 ? form.myName.$modelValue : null,\n-        networkName: form.isTestnet.$modelValue ? 'testnet' : 'livenet'\n+        networkName: form.isTestnet.$modelValue ? 'testnet' : 'livenet',\n       };\n       self.loading = true;\n \n+      if (form.hwLedger.$modelValue) {\n+        self.ledger = true;\n+        ledger.getXPubKey($scope.externalIndex, function(data) {\n+          self.ledger = false;\n+          $scope.$apply();\n+          if (data.success) {\n+            opts.extendedPublicKey = data.xpubkey;\n+            opts.externalSource = 'ledger';\n+            opts.externalIndex = $scope.externalIndex;\n+            self._create(opts);\n+          } else {\n+            self.loading = false;\n+            $log.debug(data.message);\n+            self.error = data.message;\n+            $scope.$apply();","path":"src/js/controllers/create.js","position":58,"original_position":58,"commit_id":"f6c34981c04323b4dea3e3568ed6813b1c0a6f5d","original_commit_id":"f6c34981c04323b4dea3e3568ed6813b1c0a6f5d","user":{"login":"EricLarch","id":1017848,"avatar_url":"https://avatars.githubusercontent.com/u/1017848?v=3","gravatar_id":"","url":"https://api.github.com/users/EricLarch","html_url":"https://github.com/EricLarch","followers_url":"https://api.github.com/users/EricLarch/followers","following_url":"https://api.github.com/users/EricLarch/following{/other_user}","gists_url":"https://api.github.com/users/EricLarch/gists{/gist_id}","starred_url":"https://api.github.com/users/EricLarch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EricLarch/subscriptions","organizations_url":"https://api.github.com/users/EricLarch/orgs","repos_url":"https://api.github.com/users/EricLarch/repos","events_url":"https://api.github.com/users/EricLarch/events{/privacy}","received_events_url":"https://api.github.com/users/EricLarch/received_events","type":"User","site_admin":false},"body":"It's called twice indeed, but UI elements have been changed meanwhile. I'm not familiar with Angular, so what is the rule to be able to call again $scope.apply() ?","created_at":"2015-07-23T17:35:09Z","updated_at":"2015-07-23T17:35:09Z","html_url":"https://github.com/bitpay/copay/pull/3011#discussion_r35348555","pull_request_url":"https://api.github.com/repos/bitpay/copay/pulls/3011","_links":{"self":{"href":"https://api.github.com/repos/bitpay/copay/pulls/comments/35348555"},"html":{"href":"https://github.com/bitpay/copay/pull/3011#discussion_r35348555"},"pull_request":{"href":"https://api.github.com/repos/bitpay/copay/pulls/3011"}}},"pull_request":{"url":"https://api.github.com/repos/bitpay/copay/pulls/3011","id":40235890,"html_url":"https://github.com/bitpay/copay/pull/3011","diff_url":"https://github.com/bitpay/copay/pull/3011.diff","patch_url":"https://github.com/bitpay/copay/pull/3011.patch","issue_url":"https://api.github.com/repos/bitpay/copay/issues/3011","number":3011,"state":"open","locked":false,"title":"Ledger hardware wallet support","user":{"login":"EricLarch","id":1017848,"avatar_url":"https://avatars.githubusercontent.com/u/1017848?v=3","gravatar_id":"","url":"https://api.github.com/users/EricLarch","html_url":"https://github.com/EricLarch","followers_url":"https://api.github.com/users/EricLarch/followers","following_url":"https://api.github.com/users/EricLarch/following{/other_user}","gists_url":"https://api.github.com/users/EricLarch/gists{/gist_id}","starred_url":"https://api.github.com/users/EricLarch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EricLarch/subscriptions","organizations_url":"https://api.github.com/users/EricLarch/orgs","repos_url":"https://api.github.com/users/EricLarch/repos","events_url":"https://api.github.com/users/EricLarch/events{/privacy}","received_events_url":"https://api.github.com/users/EricLarch/received_events","type":"User","site_admin":false},"body":"Add support for Ledger hardware wallet.\r\n\r\nRequires to merge https://github.com/bitpay/bitcore-wallet-client/pull/92","created_at":"2015-07-17T14:24:06Z","updated_at":"2015-07-23T17:35:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8be7cc9c45fc5d3090ea9e02cc127e06c4a55863","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/bitpay/copay/pulls/3011/commits","review_comments_url":"https://api.github.com/repos/bitpay/copay/pulls/3011/comments","review_comment_url":"https://api.github.com/repos/bitpay/copay/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bitpay/copay/issues/3011/comments","statuses_url":"https://api.github.com/repos/bitpay/copay/statuses/f6c34981c04323b4dea3e3568ed6813b1c0a6f5d","head":{"label":"LedgerHQ:ledger-support","ref":"ledger-support","sha":"f6c34981c04323b4dea3e3568ed6813b1c0a6f5d","user":{"login":"LedgerHQ","id":9784193,"avatar_url":"https://avatars.githubusercontent.com/u/9784193?v=3","gravatar_id":"","url":"https://api.github.com/users/LedgerHQ","html_url":"https://github.com/LedgerHQ","followers_url":"https://api.github.com/users/LedgerHQ/followers","following_url":"https://api.github.com/users/LedgerHQ/following{/other_user}","gists_url":"https://api.github.com/users/LedgerHQ/gists{/gist_id}","starred_url":"https://api.github.com/users/LedgerHQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LedgerHQ/subscriptions","organizations_url":"https://api.github.com/users/LedgerHQ/orgs","repos_url":"https://api.github.com/users/LedgerHQ/repos","events_url":"https://api.github.com/users/LedgerHQ/events{/privacy}","received_events_url":"https://api.github.com/users/LedgerHQ/received_events","type":"Organization","site_admin":false},"repo":{"id":39139867,"name":"copay","full_name":"LedgerHQ/copay","owner":{"login":"LedgerHQ","id":9784193,"avatar_url":"https://avatars.githubusercontent.com/u/9784193?v=3","gravatar_id":"","url":"https://api.github.com/users/LedgerHQ","html_url":"https://github.com/LedgerHQ","followers_url":"https://api.github.com/users/LedgerHQ/followers","following_url":"https://api.github.com/users/LedgerHQ/following{/other_user}","gists_url":"https://api.github.com/users/LedgerHQ/gists{/gist_id}","starred_url":"https://api.github.com/users/LedgerHQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LedgerHQ/subscriptions","organizations_url":"https://api.github.com/users/LedgerHQ/orgs","repos_url":"https://api.github.com/users/LedgerHQ/repos","events_url":"https://api.github.com/users/LedgerHQ/events{/privacy}","received_events_url":"https://api.github.com/users/LedgerHQ/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/LedgerHQ/copay","description":"A multisignature wallet.","fork":true,"url":"https://api.github.com/repos/LedgerHQ/copay","forks_url":"https://api.github.com/repos/LedgerHQ/copay/forks","keys_url":"https://api.github.com/repos/LedgerHQ/copay/keys{/key_id}","collaborators_url":"https://api.github.com/repos/LedgerHQ/copay/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/LedgerHQ/copay/teams","hooks_url":"https://api.github.com/repos/LedgerHQ/copay/hooks","issue_events_url":"https://api.github.com/repos/LedgerHQ/copay/issues/events{/number}","events_url":"https://api.github.com/repos/LedgerHQ/copay/events","assignees_url":"https://api.github.com/repos/LedgerHQ/copay/assignees{/user}","branches_url":"https://api.github.com/repos/LedgerHQ/copay/branches{/branch}","tags_url":"https://api.github.com/repos/LedgerHQ/copay/tags","blobs_url":"https://api.github.com/repos/LedgerHQ/copay/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/LedgerHQ/copay/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/LedgerHQ/copay/git/refs{/sha}","trees_url":"https://api.github.com/repos/LedgerHQ/copay/git/trees{/sha}","statuses_url":"https://api.github.com/repos/LedgerHQ/copay/statuses/{sha}","languages_url":"https://api.github.com/repos/LedgerHQ/copay/languages","stargazers_url":"https://api.github.com/repos/LedgerHQ/copay/stargazers","contributors_url":"https://api.github.com/repos/LedgerHQ/copay/contributors","subscribers_url":"https://api.github.com/repos/LedgerHQ/copay/subscribers","subscription_url":"https://api.github.com/repos/LedgerHQ/copay/subscription","commits_url":"https://api.github.com/repos/LedgerHQ/copay/commits{/sha}","git_commits_url":"https://api.github.com/repos/LedgerHQ/copay/git/commits{/sha}","comments_url":"https://api.github.com/repos/LedgerHQ/copay/comments{/number}","issue_comment_url":"https://api.github.com/repos/LedgerHQ/copay/issues/comments{/number}","contents_url":"https://api.github.com/repos/LedgerHQ/copay/contents/{+path}","compare_url":"https://api.github.com/repos/LedgerHQ/copay/compare/{base}...{head}","merges_url":"https://api.github.com/repos/LedgerHQ/copay/merges","archive_url":"https://api.github.com/repos/LedgerHQ/copay/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/LedgerHQ/copay/downloads","issues_url":"https://api.github.com/repos/LedgerHQ/copay/issues{/number}","pulls_url":"https://api.github.com/repos/LedgerHQ/copay/pulls{/number}","milestones_url":"https://api.github.com/repos/LedgerHQ/copay/milestones{/number}","notifications_url":"https://api.github.com/repos/LedgerHQ/copay/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/LedgerHQ/copay/labels{/name}","releases_url":"https://api.github.com/repos/LedgerHQ/copay/releases{/id}","created_at":"2015-07-15T13:57:56Z","updated_at":"2015-07-15T13:57:57Z","pushed_at":"2015-07-17T17:24:30Z","git_url":"git://github.com/LedgerHQ/copay.git","ssh_url":"git@github.com:LedgerHQ/copay.git","clone_url":"https://github.com/LedgerHQ/copay.git","svn_url":"https://github.com/LedgerHQ/copay","homepage":"http://copay.io","size":93086,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"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":"036630143092f61bc4a1791691b668cd3a4488e0","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":18141084,"name":"copay","full_name":"bitpay/copay","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/copay","description":"A multisignature wallet.","fork":false,"url":"https://api.github.com/repos/bitpay/copay","forks_url":"https://api.github.com/repos/bitpay/copay/forks","keys_url":"https://api.github.com/repos/bitpay/copay/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bitpay/copay/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bitpay/copay/teams","hooks_url":"https://api.github.com/repos/bitpay/copay/hooks","issue_events_url":"https://api.github.com/repos/bitpay/copay/issues/events{/number}","events_url":"https://api.github.com/repos/bitpay/copay/events","assignees_url":"https://api.github.com/repos/bitpay/copay/assignees{/user}","branches_url":"https://api.github.com/repos/bitpay/copay/branches{/branch}","tags_url":"https://api.github.com/repos/bitpay/copay/tags","blobs_url":"https://api.github.com/repos/bitpay/copay/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bitpay/copay/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bitpay/copay/git/refs{/sha}","trees_url":"https://api.github.com/repos/bitpay/copay/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bitpay/copay/statuses/{sha}","languages_url":"https://api.github.com/repos/bitpay/copay/languages","stargazers_url":"https://api.github.com/repos/bitpay/copay/stargazers","contributors_url":"https://api.github.com/repos/bitpay/copay/contributors","subscribers_url":"https://api.github.com/repos/bitpay/copay/subscribers","subscription_url":"https://api.github.com/repos/bitpay/copay/subscription","commits_url":"https://api.github.com/repos/bitpay/copay/commits{/sha}","git_commits_url":"https://api.github.com/repos/bitpay/copay/git/commits{/sha}","comments_url":"https://api.github.com/repos/bitpay/copay/comments{/number}","issue_comment_url":"https://api.github.com/repos/bitpay/copay/issues/comments{/number}","contents_url":"https://api.github.com/repos/bitpay/copay/contents/{+path}","compare_url":"https://api.github.com/repos/bitpay/copay/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bitpay/copay/merges","archive_url":"https://api.github.com/repos/bitpay/copay/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bitpay/copay/downloads","issues_url":"https://api.github.com/repos/bitpay/copay/issues{/number}","pulls_url":"https://api.github.com/repos/bitpay/copay/pulls{/number}","milestones_url":"https://api.github.com/repos/bitpay/copay/milestones{/number}","notifications_url":"https://api.github.com/repos/bitpay/copay/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bitpay/copay/labels{/name}","releases_url":"https://api.github.com/repos/bitpay/copay/releases{/id}","created_at":"2014-03-26T14:33:07Z","updated_at":"2015-07-22T15:41:09Z","pushed_at":"2015-07-23T15:39:45Z","git_url":"git://github.com/bitpay/copay.git","ssh_url":"git@github.com:bitpay/copay.git","clone_url":"https://github.com/bitpay/copay.git","svn_url":"https://github.com/bitpay/copay","homepage":"http://copay.io","size":105381,"stargazers_count":314,"watchers_count":314,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":138,"mirror_url":null,"open_issues_count":109,"forks":138,"open_issues":109,"watchers":314,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bitpay/copay/pulls/3011"},"html":{"href":"https://github.com/bitpay/copay/pull/3011"},"issue":{"href":"https://api.github.com/repos/bitpay/copay/issues/3011"},"comments":{"href":"https://api.github.com/repos/bitpay/copay/issues/3011/comments"},"review_comments":{"href":"https://api.github.com/repos/bitpay/copay/pulls/3011/comments"},"review_comment":{"href":"https://api.github.com/repos/bitpay/copay/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bitpay/copay/pulls/3011/commits"},"statuses":{"href":"https://api.github.com/repos/bitpay/copay/statuses/f6c34981c04323b4dea3e3568ed6813b1c0a6f5d"}}}}