Skip to content

Commit

Permalink
Merge pull request #94 from eosrio/develop
Browse files Browse the repository at this point in the history
merge 1.0.5
  • Loading branch information
igorls committed May 19, 2020
2 parents 4bcbd30 + 9855d1c commit b753150
Show file tree
Hide file tree
Showing 10 changed files with 6,021 additions and 6,076 deletions.
4 changes: 3 additions & 1 deletion electron_modules/claim-rewards.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class ClaimRewardsService {
if (!fs.existsSync(basePath)) {
fs.mkdirSync(basePath);
}
this.autoClaimCheck();
}

setRpcApi(api) {
Expand Down Expand Up @@ -170,7 +171,8 @@ class ClaimRewardsService {
}

addTrayIcon() {
this.appIcon = new Tray(path.join(__dirname, 'static/tray-icon.png'));
console.log(path.join(__dirname, '../static/tray-icon.png'));
this.appIcon = new Tray(path.join(__dirname, '../static/tray-icon.png'));
const trayMenu = Menu.buildFromTemplate([
{
label: 'SimplEOS Wallet', click: () => {
Expand Down
2 changes: 1 addition & 1 deletion electron_modules/simpleos-connect.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class SimpleosConnectService {

onGetAuthorizations(chainId, callback) {
console.log('onGetAuthorizations');

this.main.getFocus();
this.sendMessage('sc_request',
{message: 'change_chain', chain_id: chainId});

Expand Down
8 changes: 7 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ class SimpleosWallet {
if (compilerVersion === 'DEFAULT') {
this.simpleosAutoLauncher = new AutoLaunch({name: 'simpleos'});
this.claimRW = new ClaimRewardsService(this);
this.isEnableAutoClaim = this.claimRW.isEnableAutoClaim;
} else {
app.setLoginItemSettings({openAtLogin: false, args: ['--autostart']});
app.setLoginItemSettings({openAtLogin: false});
Expand Down Expand Up @@ -91,10 +92,12 @@ class SimpleosWallet {
this.debug = args.some(val => val === '--debug');
this.serve = args.some(val => val === '--serve');
this.isAutoLaunch = this.loginOpts.wasOpenedAtLogin || args.some(val => val === '--autostart');

console.log(this.claimRW);
if (this.claimRW) {
this.isEnableAutoClaim = this.claimRW.isEnableAutoClaim;
this.claimRW.writeLog(`Developer Mode: ${this.devMode}`);
console.log('Developer Mode:', this.devMode);

this.claimRW.writeLog(
`Auto Launcher: ${JSON.stringify(this.simpleosAutoLauncher)}`,
);
Expand Down Expand Up @@ -123,7 +126,10 @@ class SimpleosWallet {

runAutoLaunchMode() {
// check if another agent is running
console.log(`run Auto Launch Mode...`);
app.on('second-instance', (event, argv) => {
console.log(`check if another agent is running...`);

if (argv[1] === '--autostart') {
this.claimRW.writeLog(`Force quit agent in second instance...`);
app.quit();
Expand Down

0 comments on commit b753150

Please sign in to comment.