Skip to content

Commit

Permalink
updtae
Browse files Browse the repository at this point in the history
  • Loading branch information
webkonglong committed Jan 19, 2019
1 parent b365f3b commit 172f878
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ export default {
mounted() {
this.connectScatterAsync();
this.updateLandInfoAsync();
// this.updateMarketInfoAsync();
this.updateMarketInfoAsync();
this.getGlobalInfo();
setInterval(() => {
this.updateLandInfoAsync();
Expand Down
20 changes: 10 additions & 10 deletions src/store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,16 +138,16 @@ export default new Vuex.Store({
commit('setIsLoadingData', false);
},
async updateMarketInfoAsync({ commit }) {
// try {
// const marketInfoTable = await API.getMarketInfoAsync();
// const marketInfo = marketInfoTable[0];
// marketInfo.coin_price = `${((parseFloat(marketInfo.supply.split(' ')[0])) / 10000000000).toDecimal(4).toString()} EOS`;
// marketInfo.supply = `${(parseFloat(marketInfo.supply.split(' ')[0]) - 40000000).toDecimal(4).toString()} CMU`;
// // price, balance, coin_price
// commit('setMarketInfo', marketInfo);
// } catch (err) {
// console.error('Failed to fetch market info', err);
// }
try {
const marketInfoTable = await API.getMarketInfoAsync();
const marketInfo = marketInfoTable[0];
marketInfo.coin_price = `${((parseFloat(marketInfo.supply.split(' ')[0])) / 10000000000).toDecimal(4).toString()} BOS`;
marketInfo.supply = `${(parseFloat(marketInfo.supply.split(' ')[0]) - 40000000).toDecimal(4).toString()} CMU`;
// price, balance, coin_price
commit('setMarketInfo', marketInfo);
} catch (err) {
console.error('Failed to fetch market info', err);
}
},
async getMyStakedInfo({ commit, state }) {
try {
Expand Down

0 comments on commit 172f878

Please sign in to comment.