{"action":"created","comment":{"url":"https://api.github.com/repos/witnet/sheikah/pulls/comments/209544956","pull_request_review_id":145576858,"id":209544956,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwOTU0NDk1Ng==","diff_hunk":"@@ -38,13 +37,9 @@ export default async function encryptWallet(system: AppStateS & WalletStorageS,\n   Promise<JsonSerializable> {\n \n   return parseParams(params)\n-    .then(async (p) => Promise.all([\n-      Promise.resolve(p)\n-        .then(inject(newWalletStorage, system.storageFactory)),\n-      Promise.resolve(p)\n-        .then(inject(getUnconsolidatedData, system.appStateManager))\n-        .then(inject(newWallet, system.appStateManager))\n-    ]))\n+    .then(inject(getUnconsolidatedData, system.appStateManager))\n+    .then(newWallet)\n+    .then(inject(newWalletStorage, system.storageFactory))","path":"app/main/api/handlers/encryptWallet.ts","position":28,"original_position":28,"commit_id":"5e380431ecbeb58f33ff581ffbbd09af504e4c01","original_commit_id":"5e380431ecbeb58f33ff581ffbbd09af504e4c01","user":{"login":"mmartinbar","id":23116308,"node_id":"MDQ6VXNlcjIzMTE2MzA4","avatar_url":"https://avatars0.githubusercontent.com/u/23116308?v=4","gravatar_id":"","url":"https://api.github.com/users/mmartinbar","html_url":"https://github.com/mmartinbar","followers_url":"https://api.github.com/users/mmartinbar/followers","following_url":"https://api.github.com/users/mmartinbar/following{/other_user}","gists_url":"https://api.github.com/users/mmartinbar/gists{/gist_id}","starred_url":"https://api.github.com/users/mmartinbar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmartinbar/subscriptions","organizations_url":"https://api.github.com/users/mmartinbar/orgs","repos_url":"https://api.github.com/users/mmartinbar/repos","events_url":"https://api.github.com/users/mmartinbar/events{/privacy}","received_events_url":"https://api.github.com/users/mmartinbar/received_events","type":"User","site_admin":false},"body":"I think this logic misses the part where the plain storage is updated with the WalletInfo (id and caption) of the newly created wallet. I believe this is the point where it should be done because it is not until this point that the id is generated, we don't have it before.\r\n\r\nThe behaviour shown is that the encrypted wallet is stored in a new folder in the filesystem but when restarting Sheikah app, no wallet is detected because the plain storage is empty.\r\n\r\nI'll create a separate issue to refer to this.","created_at":"2018-08-13T09:31:34Z","updated_at":"2018-08-13T09:35:00Z","html_url":"https://github.com/witnet/sheikah/pull/325#discussion_r209544956","pull_request_url":"https://api.github.com/repos/witnet/sheikah/pulls/325","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/witnet/sheikah/pulls/comments/209544956"},"html":{"href":"https://github.com/witnet/sheikah/pull/325#discussion_r209544956"},"pull_request":{"href":"https://api.github.com/repos/witnet/sheikah/pulls/325"}}},"pull_request":{"url":"https://api.github.com/repos/witnet/sheikah/pulls/325","id":207288409,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA3Mjg4NDA5","html_url":"https://github.com/witnet/sheikah/pull/325","diff_url":"https://github.com/witnet/sheikah/pull/325.diff","patch_url":"https://github.com/witnet/sheikah/pull/325.patch","issue_url":"https://api.github.com/repos/witnet/sheikah/issues/325","number":325,"state":"open","locked":false,"title":"fix(handlers): properly handle encryptWallet errors","user":{"login":"kronolynx","id":6961824,"node_id":"MDQ6VXNlcjY5NjE4MjQ=","avatar_url":"https://avatars2.githubusercontent.com/u/6961824?v=4","gravatar_id":"","url":"https://api.github.com/users/kronolynx","html_url":"https://github.com/kronolynx","followers_url":"https://api.github.com/users/kronolynx/followers","following_url":"https://api.github.com/users/kronolynx/following{/other_user}","gists_url":"https://api.github.com/users/kronolynx/gists{/gist_id}","starred_url":"https://api.github.com/users/kronolynx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kronolynx/subscriptions","organizations_url":"https://api.github.com/users/kronolynx/orgs","repos_url":"https://api.github.com/users/kronolynx/repos","events_url":"https://api.github.com/users/kronolynx/events{/privacy}","received_events_url":"https://api.github.com/users/kronolynx/received_events","type":"User","site_admin":false},"body":"\r\n- [x] I have read and understood [CODE_OF_CONDUCT][code] document.\r\n- [x] I have read and understood [CONTRIBUTING][cont] document.\r\n- [x] I have read and understood [STYLEGUIDE][style] document.\r\n- [x] I have included tests for the changes in my PR. If not, I have included a\r\n  rationale for why I haven't.\r\n- [x] My code is formatted and is accepted by `yarn fmt`.\r\n- [x] **I understand my PR may be closed if it becomes obvious I didn't\r\n  actually perform all of these steps.**\r\n\r\n### Why this change is necessary and useful\r\ncloses #324","created_at":"2018-08-09T11:44:04Z","updated_at":"2018-08-13T09:35:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3b873323131c904ff0560b1f03f88848e5a94ec2","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/witnet/sheikah/pulls/325/commits","review_comments_url":"https://api.github.com/repos/witnet/sheikah/pulls/325/comments","review_comment_url":"https://api.github.com/repos/witnet/sheikah/pulls/comments{/number}","comments_url":"https://api.github.com/repos/witnet/sheikah/issues/325/comments","statuses_url":"https://api.github.com/repos/witnet/sheikah/statuses/5e380431ecbeb58f33ff581ffbbd09af504e4c01","head":{"label":"kronolynx:issue-324","ref":"issue-324","sha":"5e380431ecbeb58f33ff581ffbbd09af504e4c01","user":{"login":"kronolynx","id":6961824,"node_id":"MDQ6VXNlcjY5NjE4MjQ=","avatar_url":"https://avatars2.githubusercontent.com/u/6961824?v=4","gravatar_id":"","url":"https://api.github.com/users/kronolynx","html_url":"https://github.com/kronolynx","followers_url":"https://api.github.com/users/kronolynx/followers","following_url":"https://api.github.com/users/kronolynx/following{/other_user}","gists_url":"https://api.github.com/users/kronolynx/gists{/gist_id}","starred_url":"https://api.github.com/users/kronolynx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kronolynx/subscriptions","organizations_url":"https://api.github.com/users/kronolynx/orgs","repos_url":"https://api.github.com/users/kronolynx/repos","events_url":"https://api.github.com/users/kronolynx/events{/privacy}","received_events_url":"https://api.github.com/users/kronolynx/received_events","type":"User","site_admin":false},"repo":{"id":127929616,"node_id":"MDEwOlJlcG9zaXRvcnkxMjc5Mjk2MTY=","name":"sheikah","full_name":"kronolynx/sheikah","owner":{"login":"kronolynx","id":6961824,"node_id":"MDQ6VXNlcjY5NjE4MjQ=","avatar_url":"https://avatars2.githubusercontent.com/u/6961824?v=4","gravatar_id":"","url":"https://api.github.com/users/kronolynx","html_url":"https://github.com/kronolynx","followers_url":"https://api.github.com/users/kronolynx/followers","following_url":"https://api.github.com/users/kronolynx/following{/other_user}","gists_url":"https://api.github.com/users/kronolynx/gists{/gist_id}","starred_url":"https://api.github.com/users/kronolynx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kronolynx/subscriptions","organizations_url":"https://api.github.com/users/kronolynx/orgs","repos_url":"https://api.github.com/users/kronolynx/repos","events_url":"https://api.github.com/users/kronolynx/events{/privacy}","received_events_url":"https://api.github.com/users/kronolynx/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kronolynx/sheikah","description":"A Witnet compatible desktop wallet and smart contracts development environment","fork":true,"url":"https://api.github.com/repos/kronolynx/sheikah","forks_url":"https://api.github.com/repos/kronolynx/sheikah/forks","keys_url":"https://api.github.com/repos/kronolynx/sheikah/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kronolynx/sheikah/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kronolynx/sheikah/teams","hooks_url":"https://api.github.com/repos/kronolynx/sheikah/hooks","issue_events_url":"https://api.github.com/repos/kronolynx/sheikah/issues/events{/number}","events_url":"https://api.github.com/repos/kronolynx/sheikah/events","assignees_url":"https://api.github.com/repos/kronolynx/sheikah/assignees{/user}","branches_url":"https://api.github.com/repos/kronolynx/sheikah/branches{/branch}","tags_url":"https://api.github.com/repos/kronolynx/sheikah/tags","blobs_url":"https://api.github.com/repos/kronolynx/sheikah/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kronolynx/sheikah/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kronolynx/sheikah/git/refs{/sha}","trees_url":"https://api.github.com/repos/kronolynx/sheikah/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kronolynx/sheikah/statuses/{sha}","languages_url":"https://api.github.com/repos/kronolynx/sheikah/languages","stargazers_url":"https://api.github.com/repos/kronolynx/sheikah/stargazers","contributors_url":"https://api.github.com/repos/kronolynx/sheikah/contributors","subscribers_url":"https://api.github.com/repos/kronolynx/sheikah/subscribers","subscription_url":"https://api.github.com/repos/kronolynx/sheikah/subscription","commits_url":"https://api.github.com/repos/kronolynx/sheikah/commits{/sha}","git_commits_url":"https://api.github.com/repos/kronolynx/sheikah/git/commits{/sha}","comments_url":"https://api.github.com/repos/kronolynx/sheikah/comments{/number}","issue_comment_url":"https://api.github.com/repos/kronolynx/sheikah/issues/comments{/number}","contents_url":"https://api.github.com/repos/kronolynx/sheikah/contents/{+path}","compare_url":"https://api.github.com/repos/kronolynx/sheikah/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kronolynx/sheikah/merges","archive_url":"https://api.github.com/repos/kronolynx/sheikah/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kronolynx/sheikah/downloads","issues_url":"https://api.github.com/repos/kronolynx/sheikah/issues{/number}","pulls_url":"https://api.github.com/repos/kronolynx/sheikah/pulls{/number}","milestones_url":"https://api.github.com/repos/kronolynx/sheikah/milestones{/number}","notifications_url":"https://api.github.com/repos/kronolynx/sheikah/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kronolynx/sheikah/labels{/name}","releases_url":"https://api.github.com/repos/kronolynx/sheikah/releases{/id}","deployments_url":"https://api.github.com/repos/kronolynx/sheikah/deployments","created_at":"2018-04-03T15:30:49Z","updated_at":"2018-07-18T14:04:29Z","pushed_at":"2018-08-13T08:12:40Z","git_url":"git://github.com/kronolynx/sheikah.git","ssh_url":"git@github.com:kronolynx/sheikah.git","clone_url":"https://github.com/kronolynx/sheikah.git","svn_url":"https://github.com/kronolynx/sheikah","homepage":null,"size":3472,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"encrypt-wallet"}},"base":{"label":"witnet:master","ref":"master","sha":"f5b16c003afee317c805b2f22f38835ac6744b5e","user":{"login":"witnet","id":33759927,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMzNzU5OTI3","avatar_url":"https://avatars0.githubusercontent.com/u/33759927?v=4","gravatar_id":"","url":"https://api.github.com/users/witnet","html_url":"https://github.com/witnet","followers_url":"https://api.github.com/users/witnet/followers","following_url":"https://api.github.com/users/witnet/following{/other_user}","gists_url":"https://api.github.com/users/witnet/gists{/gist_id}","starred_url":"https://api.github.com/users/witnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/witnet/subscriptions","organizations_url":"https://api.github.com/users/witnet/orgs","repos_url":"https://api.github.com/users/witnet/repos","events_url":"https://api.github.com/users/witnet/events{/privacy}","received_events_url":"https://api.github.com/users/witnet/received_events","type":"Organization","site_admin":false},"repo":{"id":120210474,"node_id":"MDEwOlJlcG9zaXRvcnkxMjAyMTA0NzQ=","name":"sheikah","full_name":"witnet/sheikah","owner":{"login":"witnet","id":33759927,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMzNzU5OTI3","avatar_url":"https://avatars0.githubusercontent.com/u/33759927?v=4","gravatar_id":"","url":"https://api.github.com/users/witnet","html_url":"https://github.com/witnet","followers_url":"https://api.github.com/users/witnet/followers","following_url":"https://api.github.com/users/witnet/following{/other_user}","gists_url":"https://api.github.com/users/witnet/gists{/gist_id}","starred_url":"https://api.github.com/users/witnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/witnet/subscriptions","organizations_url":"https://api.github.com/users/witnet/orgs","repos_url":"https://api.github.com/users/witnet/repos","events_url":"https://api.github.com/users/witnet/events{/privacy}","received_events_url":"https://api.github.com/users/witnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/witnet/sheikah","description":"A Witnet compatible desktop wallet and smart contracts development environment","fork":false,"url":"https://api.github.com/repos/witnet/sheikah","forks_url":"https://api.github.com/repos/witnet/sheikah/forks","keys_url":"https://api.github.com/repos/witnet/sheikah/keys{/key_id}","collaborators_url":"https://api.github.com/repos/witnet/sheikah/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/witnet/sheikah/teams","hooks_url":"https://api.github.com/repos/witnet/sheikah/hooks","issue_events_url":"https://api.github.com/repos/witnet/sheikah/issues/events{/number}","events_url":"https://api.github.com/repos/witnet/sheikah/events","assignees_url":"https://api.github.com/repos/witnet/sheikah/assignees{/user}","branches_url":"https://api.github.com/repos/witnet/sheikah/branches{/branch}","tags_url":"https://api.github.com/repos/witnet/sheikah/tags","blobs_url":"https://api.github.com/repos/witnet/sheikah/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/witnet/sheikah/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/witnet/sheikah/git/refs{/sha}","trees_url":"https://api.github.com/repos/witnet/sheikah/git/trees{/sha}","statuses_url":"https://api.github.com/repos/witnet/sheikah/statuses/{sha}","languages_url":"https://api.github.com/repos/witnet/sheikah/languages","stargazers_url":"https://api.github.com/repos/witnet/sheikah/stargazers","contributors_url":"https://api.github.com/repos/witnet/sheikah/contributors","subscribers_url":"https://api.github.com/repos/witnet/sheikah/subscribers","subscription_url":"https://api.github.com/repos/witnet/sheikah/subscription","commits_url":"https://api.github.com/repos/witnet/sheikah/commits{/sha}","git_commits_url":"https://api.github.com/repos/witnet/sheikah/git/commits{/sha}","comments_url":"https://api.github.com/repos/witnet/sheikah/comments{/number}","issue_comment_url":"https://api.github.com/repos/witnet/sheikah/issues/comments{/number}","contents_url":"https://api.github.com/repos/witnet/sheikah/contents/{+path}","compare_url":"https://api.github.com/repos/witnet/sheikah/compare/{base}...{head}","merges_url":"https://api.github.com/repos/witnet/sheikah/merges","archive_url":"https://api.github.com/repos/witnet/sheikah/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/witnet/sheikah/downloads","issues_url":"https://api.github.com/repos/witnet/sheikah/issues{/number}","pulls_url":"https://api.github.com/repos/witnet/sheikah/pulls{/number}","milestones_url":"https://api.github.com/repos/witnet/sheikah/milestones{/number}","notifications_url":"https://api.github.com/repos/witnet/sheikah/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/witnet/sheikah/labels{/name}","releases_url":"https://api.github.com/repos/witnet/sheikah/releases{/id}","deployments_url":"https://api.github.com/repos/witnet/sheikah/deployments","created_at":"2018-02-04T18:18:22Z","updated_at":"2018-08-11T08:32:35Z","pushed_at":"2018-08-13T09:11:41Z","git_url":"git://github.com/witnet/sheikah.git","ssh_url":"git@github.com:witnet/sheikah.git","clone_url":"https://github.com/witnet/sheikah.git","svn_url":"https://github.com/witnet/sheikah","homepage":"https://witnet.io","size":3549,"stargazers_count":18,"watchers_count":18,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"archived":false,"open_issues_count":50,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":13,"open_issues":50,"watchers":18,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/witnet/sheikah/pulls/325"},"html":{"href":"https://github.com/witnet/sheikah/pull/325"},"issue":{"href":"https://api.github.com/repos/witnet/sheikah/issues/325"},"comments":{"href":"https://api.github.com/repos/witnet/sheikah/issues/325/comments"},"review_comments":{"href":"https://api.github.com/repos/witnet/sheikah/pulls/325/comments"},"review_comment":{"href":"https://api.github.com/repos/witnet/sheikah/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/witnet/sheikah/pulls/325/commits"},"statuses":{"href":"https://api.github.com/repos/witnet/sheikah/statuses/5e380431ecbeb58f33ff581ffbbd09af504e4c01"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"mmartinbar"}}