Browse Source

fixed native only addcoin action

all-modes
pbca26 8 years ago
parent
commit
51275002bb
  1. 18
      react/src/actions/actions/addCoin.js
  2. 1
      react/src/components/addcoin/addcoin.js

18
react/src/actions/actions/addCoin.js

@ -20,23 +20,6 @@ import {
} from '../../components/addcoin/payload'; } from '../../components/addcoin/payload';
export function addCoin(coin, mode, syncOnly, port) { export function addCoin(coin, mode, syncOnly, port) {
if (Config &&
Config.iguanaLessMode &&
mode !== '-1') {
return dispatch => {
startIguanaInstance('main', coin)
.then(function(json) {
setTimeout(function() {
console.log(`started ${coin} / main`, json);
_addCoin();
}, 2000);
});
}
} else {
_addCoin();
}
function _addCoin() {
if (mode === '-1') { if (mode === '-1') {
return dispatch => { return dispatch => {
dispatch(shepherdGetConfig(coin, mode)); dispatch(shepherdGetConfig(coin, mode));
@ -109,7 +92,6 @@ export function addCoin(coin, mode, syncOnly, port) {
} }
} }
} }
}
export function iguanaAddCoin(coin, mode, acData, port) { export function iguanaAddCoin(coin, mode, acData, port) {
function _iguanaAddCoin(dispatch) { function _iguanaAddCoin(dispatch) {

1
react/src/components/addcoin/addcoin.js

@ -187,6 +187,7 @@ class AddCoin extends React.Component {
activateCoin() { activateCoin() {
const coin = this.state.coins[0].selectedCoin.split('|')[0]; const coin = this.state.coins[0].selectedCoin.split('|')[0];
if (this.isCoinAlreadyAdded(coin)) { if (this.isCoinAlreadyAdded(coin)) {
this.dismiss(); this.dismiss();
return; return;

Loading…
Cancel
Save