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

Loading…
Cancel
Save