diff --git a/components/LPdistrib.vue b/components/LPdistrib.vue
index 9005b78..5ef9ed3 100644
--- a/components/LPdistrib.vue
+++ b/components/LPdistrib.vue
@@ -3,7 +3,9 @@
- - Defibox
+ - Alcor
+ - Defibox
+ - Taco
@@ -75,7 +77,7 @@ export default {
return (exchange === this.exchange) ? 'active' : ''
},
...mapActions('chain', ['logout']),
- ...mapActions('LPdistrib', ['sendRewards', 'fetchTopLP', 'switchExcludeWallets', 'remExcludeWallet', 'addExcludeWallet', 'setTotalNeonReward', 'setExcludedWallets'])
+ ...mapActions('LPdistrib', ['sendRewards', 'fetchTopLP', 'switchExcludeWallets', 'remExcludeWallet', 'addExcludeWallet', 'setTotalNeonReward', 'setExcludedWallets', 'changeExchange'])
},
computed: {
...mapState(['user']),
@@ -274,10 +276,13 @@ ul {
}
.exchanges li {
display: inline-block;
+ cursor: pointer;
font-weight: bold;
font-size: 28px;
- color: #c5c5c5;
padding: 0 10px;
+ color: #c5c5c5;
+}
+.exchanges li.active {
color: #fff;
animation: neonPinkFlicker 1.5s infinite alternate;
}
diff --git a/store/LPdistrib.js b/store/LPdistrib.js
index eb0c984..f1c6f81 100644
--- a/store/LPdistrib.js
+++ b/store/LPdistrib.js
@@ -78,11 +78,23 @@ export const actions = {
const amount = 1* event.target.value
commit('setTotalNeonReward', amount)
},
+ async changeExchange({ commit, dispatch }, exchange) {
+ commit('setExchange', exchange)
+
+ if(['defibox', 'taco'].indexOf(exchange) !== -1)
+ dispatch('fetchTopLP')
+ },
async fetchTopLP({commit, state, dispatch}) {
commit('updateIsLPLoading', true)
- const ticker = (state.exchange === 'defibox') ? 'BOXX' : 'WAXNEON'
- const contract = (state.exchange === 'defibox') ? 'lptoken.box' : 'alcorammswap'
- const topLP = await getTopHolders(this.$axios, ticker, contract)
+ const tickers = {
+ 'defibox': 'BOXX',
+ 'taco': 'NEOWAX',
+ }
+ const contracts = {
+ 'defibox': 'lptoken.box',
+ 'taco': 'swap.taco'
+ }
+ const topLP = await getTopHolders(this.$axios, tickers[state.exchange], contracts[state.exchange])
commit('setTopLP', topLP)
dispatch('updateDisplayedTopLP')
dispatch('updateTotalLPamount')