Skip to content

Commit

Permalink
bug fixes and cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
nsjames committed Feb 19, 2020
1 parent 229a8ab commit 6b7c1de
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 8 deletions.
4 changes: 1 addition & 3 deletions .env
@@ -1,6 +1,4 @@
LOCAL_TESTING=http://localhost:8081/

FORCE_STAGING=
#LOCAL_TESTING=http://localhost:8081/

# These are used for linking of static assets so that
# users don't have to download them.
Expand Down
4 changes: 1 addition & 3 deletions electron/app.js
Expand Up @@ -12,7 +12,6 @@ const ecc = require('eosjs-ecc');

const Embedder = require('embedder');
const files = require('./services/files');
const getHost = require('./services/getHost');


const quit = () => {
Expand Down Expand Up @@ -123,7 +122,6 @@ const createScatterInstance = async () => {
!!storage.getGeneralSetting('testingMode'),
);

// await Embedder.removeOldFiles();
if(!process.env.LOCAL_TESTING){
if(!await Embedder.check()){
// if(true){
Expand All @@ -142,7 +140,6 @@ const createScatterInstance = async () => {
}
}
}
// if(!process.env.LOCAL_TESTING && !await Embedder.check()) return process.exit(0);

files.toggleAllowInternals(false);

Expand Down Expand Up @@ -291,6 +288,7 @@ global.wallet = {

setWalletData:wallet.updateScatter,
getWalletData:wallet.getScatter,
getRawData:wallet.getRawData,
clearWalletData:storage.removeScatter,
getDefaultPath:files.getDefaultPath,

Expand Down
2 changes: 1 addition & 1 deletion electron/services/getHost.js
Expand Up @@ -4,7 +4,7 @@ module.exports = () => {
if(process.env.LOCAL_TESTING) return process.env.LOCAL_TESTING;

let host = getSimpleMode() ? process.env.WEB_HOST_SIMPLE_MODE : process.env.WEB_HOST;
if(getGeneralSetting('testingMode') || process.env.FORCE_STAGING) host = 'staging.'+host;
if(getGeneralSetting('testingMode')) host = 'staging.'+host;

return `https://${host}`;
};
2 changes: 2 additions & 0 deletions electron/services/wallet.js
Expand Up @@ -38,6 +38,7 @@ const init = () => {

const setScatter = (_s) => scatter = JSON.parse(JSON.stringify(_s));
const getScatter = () => scatter ? JSON.parse(JSON.stringify(scatter)) : null;
const getRawData = () => storage.getScatter();

const exists = () => !!scatter;

Expand Down Expand Up @@ -307,6 +308,7 @@ const EXPORTS = {
updateScatter,
setScatter,
getScatter,
getRawData,
sign,
getPrivateKey,
reloading,
Expand Down
1 change: 0 additions & 1 deletion scripts/release.js
Expand Up @@ -11,7 +11,6 @@ if(!platform) return quit('Please run as `yarn release [win/linux/mac]`');
console.log('Building for platform: ', platform);

if(process.env.LOCAL_TESTING) return quit('LOCAL_TESTING is enabled');
if(process.env.FORCE_STAGING) return quit('FORCE_STAGING is enabled');

const run = (cmd, callback = () => {}) => {
console.log('running: ', cmd)
Expand Down

0 comments on commit 6b7c1de

Please sign in to comment.