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

Commit

Permalink
Merge pull request #15 from wownero/fix-wallets-json
Browse files Browse the repository at this point in the history
Fix wallet breaking error on startup
  • Loading branch information
sanderfoobar authored Jan 25, 2019
2 parents 1609ceb + 2a6d875 commit 575f5b0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export class Config {
}

saveLastWalletPath(path){
console.log(this.data);
if (typeof this.data === 'string' || this.data instanceof String){
this.data = JSON.parse(this.data);
}
Expand All @@ -69,6 +70,10 @@ export class Config {
return;
}

if(!this.data.hasOwnProperty('wallets')){
this.data.wallets = [];
}

const name = path.split('/').pop();
this.data.wallets.push({ name, path });
this.save();
Expand Down

0 comments on commit 575f5b0

Please sign in to comment.