Skip to content
This repository has been archived by the owner on Sep 5, 2020. It is now read-only.

fixes issue where onboarding screen would not appear #822

Merged
merged 1 commit into from
Jun 15, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,8 @@ app.on('ready', function() {
.then(function getAccounts() {
return ethereumNode.send('eth_accounts', []);
})
.then(function onboarding(result) {
if (ethereumNode.isGeth && result && result.length === 0) {
.then(function onboarding(resultData) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hiddentao why you named that function?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it throws an error then in the stack trace it will show up, rather than "anonymous function", etc. Plus it makes the code easer to read.

if (ethereumNode.isGeth && resultData.result && resultData.result.length === 0) {
log.info('No accounts setup yet, lets do onboarding first.');

return new Q((resolve, reject) => {
Expand Down