Browse Source

create wallet fix

v0.25
pbca26 7 years ago
parent
commit
ce61fbb15e
  1. 42
      react/src/components/login/login.js
  2. 39
      react/src/components/login/login.render.js
  3. 8
      react/src/components/login/login.scss
  4. 9
      react/src/components/main/main.js
  5. 16
      react/src/components/overrides.scss
  6. 2
      react/src/reducers/main.js
  7. 11
      react/src/translate/en.js

42
react/src/components/login/login.js

@ -2,13 +2,11 @@ import React from 'react';
import { connect } from 'react-redux';
import {
toggleAddcoinModal,
iguanaWalletPassphrase,
shepherdElectrumAuth,
shepherdElectrumCoins,
//iguanaActiveHandle,
startInterval,
getDexCoins,
createNewWallet,
triggerToaster,
toggleLoginSettingsModal
} from '../../actions/actionCreators';
@ -56,6 +54,7 @@ class Login extends React.Component {
decryptKey: '',
selectedPin: '',
isExperimentalOn: false,
enableEncryptSeed: false,
};
this.toggleActivateCoinForm = this.toggleActivateCoinForm.bind(this);
this.updateRegisterConfirmPassPhraseInput = this.updateRegisterConfirmPassPhraseInput.bind(this);
@ -101,6 +100,7 @@ class Login extends React.Component {
randomSeed: PassPhraseGenerator.generatePassPhrase(this.state.bitsOption),
isSeedConfirmError: false,
isSeedBlank: false,
isCustomSeedWeak: false,
});
} else {
// if customWalletSeed is set to true, reset to seed to an empty string
@ -160,9 +160,6 @@ class Login extends React.Component {
}
componentDidMount() {
// Store.dispatch(iguanaActiveHandle(true));
// this.loadPinList();
let appConfig;
try {
@ -218,22 +215,11 @@ class Login extends React.Component {
if (props &&
props.Main &&
!props.Main.isLoggedIn) {
console.warn('display login');
this.setState({
display: true,
activeLoginSection: 'login',
activeLoginSection: this.state.activeLoginSection !== 'signup' ? 'login' : 'signup',
});
/*if (!this.props.Interval.interval.activeCoins) {
// only start a new 'activeCoins' interval if a previous one doesn't exist
if (!this._iguanaActiveCoins) {
this._iguanaActiveCoins = setInterval(() => {
Store.dispatch(getDexCoins());
}, IGUNA_ACTIVE_COINS_TIMEOUT);
Store.dispatch(startInterval('activeCoins', this._iguanaActiveCoins));
}
}*/
document.body.className = 'page-login layout-full page-dark';
}
@ -241,20 +227,10 @@ class Login extends React.Component {
props &&
props.Main &&
props.Main.isLoggedIn) {
/*if (props &&
props.Main &&
props.Main.activeCoins) {
this.setState({
activeLoginSection: 'login',
});
} else {*/
this.setState({
activeLoginSection: 'activateCoin',
});
//}
}
console.warn(this.state);
}
toggleActivateCoinForm() {
@ -323,9 +299,6 @@ class Login extends React.Component {
if (this.state.selectedPin) {
Store.dispatch(loginWithPin(this.state.decryptKey, this.state.selectedPin));
} else {
/*Store.dispatch(
iguanaWalletPassphrase(this.state.loginPassphrase)
);*/
Store.dispatch(
shepherdElectrumAuth(this.state.loginPassphrase)
);
@ -389,11 +362,18 @@ class Login extends React.Component {
}
execWalletCreate() {
Store.dispatch(
/*Store.dispatch(
createNewWallet(
this.state.randomSeedConfirm,
this.props.Dashboard.activeHandle
)
);*/
Store.dispatch(
shepherdElectrumAuth(this.state.randomSeedConfirm)
);
Store.dispatch(
shepherdElectrumCoins()
);
this.setState({

39
react/src/components/login/login.render.js

@ -34,11 +34,6 @@ const LoginRender = function () {
<i className="icon md-settings"></i> { translate('INDEX.SETTINGS') }
</a>
</li>
<li className={ this.state.nativeOnly || !this.state.isExperimentalOn ? 'hide' : '' }>
<a onClick={ this.openSyncOnlyModal }>
<i className="icon fa-cubes"></i> { translate('ADD_COIN.SYNC_ONLY') }
</a>
</li>
<li>
<a onClick={ () => this.toggleLoginSettingsDropdownSection('about') }>
<i className="icon fa-users"></i> { translate('ABOUT.ABOUT_AGAMA') }
@ -48,7 +43,7 @@ const LoginRender = function () {
</div>
</div>
<div className={ this.state.activeLoginSection === 'login' && !this.state.nativeOnly ? 'show' : 'hide' }>
<div className={ this.state.activeLoginSection === 'login' ? 'show' : 'hide' }>
<h4 className="color-white">
{ translate('INDEX.WELCOME_LOGIN') }
</h4>
@ -85,24 +80,24 @@ const LoginRender = function () {
</div>
}
{ this.state.loginPassphrase &&
{ this.state.loginPassphrase && this.state.enableEncryptSeed &&
<div className="row">
<div className="toggle-box padding-top-30 col-sm-3">
<span className="pointer">
<label className="switch">
<input
type="checkbox"
checked={ this.shouldEncryptSeed() } />
<div
className="slider"
onClick={ () => this.toggleShouldEncryptSeed() }></div>
</label>
<div
className="toggle-label white"
onClick={ () => this.toggleShouldEncryptSeed() }>
{ translate('LOGIN.ENCRYPT_SEED') }
</div>
</span>
<span className="pointer">
<label className="switch">
<input
type="checkbox"
checked={ this.shouldEncryptSeed() } />
<div
className="slider"
onClick={ () => this.toggleShouldEncryptSeed() }></div>
</label>
<div
className="toggle-label white"
onClick={ () => this.toggleShouldEncryptSeed() }>
{ translate('LOGIN.ENCRYPT_SEED') }
</div>
</span>
</div>
<div className="col-sm-9">

8
react/src/components/login/login.scss

@ -20,7 +20,7 @@ button {
position: absolute;
font-weight: 500;
font-size: 14px;
top: -22px;
top: -26px;
right: 0;
background-color: #757575;
border: 0;
@ -163,4 +163,10 @@ option.login-option {
.register-form {
width: 540px;
margin: 30px 0;
}
.form-material .form-control.focus~.floating-label,
.form-material .form-control:focus~.floating-label,
.form-material .form-control:not(.empty)~.floating-label {
top: -14px;
}

9
react/src/components/main/main.js

@ -60,15 +60,6 @@ class Main extends React.Component {
)
);
}
/*Store.dispatch(iguanaActiveHandle());
const _iguanaActiveHandle = setInterval(function() {
Store.dispatch(iguanaActiveHandle());
}, IGUANA_ACTIVE_HANDLE_TIMEOUT);
this.setState(Object.assign({}, this.state, {
activeHandleInterval: _iguanaActiveHandle,
}));*/
}
componentWillMount() {

16
react/src/components/overrides.scss

@ -382,6 +382,14 @@ select{
height: 75px;
}
.page-header--spv {
height: 120px;
.page-header-actions {
top: 32%;
}
}
.toggle-filters:hover {
background-color: #f3f1f1;
}
@ -419,4 +427,12 @@ select{
}
}
}
}
.balance-placeholder--bold {
.pull-left {
font-weight: 500;
font-size: 16px;
padding-top: 16px !important;
}
}

2
react/src/reducers/main.js

@ -7,7 +7,6 @@ import {
export function Main(state = {
isLoggedIn: false,
activeCoins: [],
displayLoginSettingsModal: false,
total: 0,
}, action) {
@ -15,7 +14,6 @@ export function Main(state = {
case GET_ACTIVE_COINS:
return {
...state,
activeCoins: action.activeCoins,
coins: action.coins,
total: action.total,
};

11
react/src/translate/en.js

@ -262,7 +262,6 @@ export const _lang = {
'FIAT_CURRENCY': 'Fiat Currency',
'EXPORT_KEYS': 'Export Keys',
'ONLY_ACTIVE_WIF_KEYS': 'Only the active coin wallet WIF keys will be shown here.<br>' +
'If you don\'t see a WIF key for the coin you are looking for please active it by adding it from EasyDEX Dashboard.<br>' +
'You can use these WIF keys to import to another coin wallets.',
'PLEASE_KEEP_KEYS_SAFE': 'Please keep these keys extra safe and secure.',
'PASSPHRASE': 'Passphrase',
@ -563,14 +562,17 @@ export const _lang = {
'JUMBLR_MOTTO': 'Secure, Native and Decentralised Coin Anonymizer',
},
'SETTINGS': {
'SPV_SERVER_LIST_DESC': 'Server list selection is only available for active coins that have more than 1 server to connect to.',
'SPV_SERVERS': 'SPV servers list',
'SPV_SINGLE_SERVER_NOTICE': 'There is only one electrum server available. SPV verification is coming from the same server providing all remote data.',
'KMD_MAIN_SYNC_ONLY': 'KMD main sync only',
'RPC_FETCH_ONLY_DESC': 'Fetch block synchronization data only. Skip any other requests that can deteriorate sync speed.',
'RESET_TO_DEFAULT': 'Reset to default',
'PROGRESS': 'Progress',
'SUPPORT_TICKETS': 'Support tickets',
'GET_SLACK_INVITE': 'Get Slack invite',
'ADDRESS_LIST': 'Address list',
'WIF_KEY_LIST': 'WIF (Wallet Import Format) key list',
'ADDRESS_LIST': 'Address',
'WIF_KEY_LIST': 'WIF (Wallet Import Format) key',
'CLI_RESPONSE': 'CLI response',
'PASSPHRASE_REQ': 'Passphrase is required.',
'SAVE_APP_CONFIG': 'Save app config',
@ -595,8 +597,7 @@ export const _lang = {
'DIR': 'Dir',
'ADD_PEER_IP': 'Add Peer IP',
'APP_SESSION': 'App Session',
'EXPORT_KEYS_NOTE': 'Note: it\'s important that you provide the same passphrase you used to login to the wallet!<br>' +
'In case passphrases will not match wallet is going to log you out of current session.',
'EXPORT_KEYS_NOTE': 'Note: it\'s important that you provide the same passphrase you used to login to the wallet!',
},
'TX_INFO': {
'ADDRESS': 'address',

Loading…
Cancel
Save