Browse Source

no coin selecton toast

all-modes
pbca26 8 years ago
parent
commit
03b4059219
  1. 15
      react/src/components/addcoin/addcoin.js

15
react/src/components/addcoin/addcoin.js

@ -4,7 +4,8 @@ import {
addCoin,
toggleAddcoinModal,
shepherdGetCoinList,
shepherdPostCoinList
shepherdPostCoinList,
triggerToaster
} from '../../actions/actionCreators';
import Store from '../../store';
import AddCoinOptionsCrypto from './addcoinOptionsCrypto';
@ -55,10 +56,14 @@ class AddCoin extends React.Component {
loadCoinSelection() {
shepherdGetCoinList()
.then(function(json) {
this.setState(Object.assign({}, this.state, {
coins: json.result,
actionsMenu: false,
}));
if (json.msg !== 'error') {
this.setState(Object.assign({}, this.state, {
coins: json.result,
actionsMenu: false,
}));
} else {
Store.dispatch(triggerToaster(true, 'Local coin list is not found', 'Coin Selection', 'info'));
}
}.bind(this));
}

Loading…
Cancel
Save