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

Commit

Permalink
fix account importing
Browse files Browse the repository at this point in the history
  • Loading branch information
vbloher committed Nov 22, 2018
1 parent 2a45eb6 commit b22eb9f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "cyb",
"description": "Web3 browser",
"main": "public/electron.js",
"version": "0.0.27",
"version": "0.0.28",
"author": {
"name": "cybercongress",
"email": "[email protected]"
Expand Down
4 changes: 2 additions & 2 deletions src/redux/wallet.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,10 @@ export const loadAccounts = () => (dispatch, getState) => new Promise((resolve)


export const setDefaultAccount = account => (dispatch) => {
let address;
let address = '';
let balance;
if (!account) {
const defaultAccount = localStorage.getItem('defaultEthAccount');
const defaultAccount = localStorage.getItem('defaultEthAccount') || '';
if (Object.keys(__accounts).length > 0) {
if (defaultAccount) {
address = defaultAccount;
Expand Down
11 changes: 5 additions & 6 deletions webpack/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ function getPlugins(isProduction) {
template: path.resolve(__dirname, '../', 'public', 'index.html'),
favicon: path.resolve(__dirname, '../', 'public', 'favicon.ico'),
}),
new BundleAnalyzerPlugin({
analyzerMode: isProduction ? 'disabled' : 'server',
openAnalyzer: false,
}),
new CopyWebpackPlugin(
// Copy directory contents to {output}/
isProduction
Expand All @@ -30,6 +26,9 @@ function getPlugins(isProduction) {

if (!isProduction) {
plugins.push(new webpack.HotModuleReplacementPlugin());
plugins.push(new BundleAnalyzerPlugin({
openAnalyzer: false,
}));
}

return plugins;
Expand Down Expand Up @@ -101,7 +100,7 @@ module.exports = (env = {}, argv = {}) => {
},
devtool: SOURCE_MAP,
plugins: getPlugins(isProduction),
optimization: {
/* optimization: {
runtimeChunk: 'single',
splitChunks: {
minSize: 220000,
Expand All @@ -114,7 +113,7 @@ module.exports = (env = {}, argv = {}) => {
},
},
},
},
},*/
devServer: {
port: 3000,
hot: true,
Expand Down

0 comments on commit b22eb9f

Please sign in to comment.