|
| 1 | +<template> |
| 2 | + <div class="container2"> |
| 3 | + <h1>Pooling</h1> |
| 4 | + <table class="tableearn"> |
| 5 | + <col style="width: 20%" /> |
| 6 | + <col style="width: 20%" /> |
| 7 | + <col style="width: 20%" /> |
| 8 | + <col style="width: 20%" /> |
| 9 | + <col style="width: 20%" /> |
| 10 | + <thead> |
| 11 | + <tr> |
| 12 | + <th class="cell"></th> |
| 13 | + <th class="cell"></th> |
| 14 | + <th class="cell">Lockup</th> |
| 15 | + <th class="cell">TVL</th> |
| 16 | + <th class="cell">APR</th> |
| 17 | + <th class="cell"></th> |
| 18 | + </tr> |
| 19 | + </thead> |
| 20 | + <tbody> |
| 21 | + <tr> |
| 22 | + <td class="cell">BCNA/ATOM</td> |
| 23 | + <td class="cell"> |
| 24 | + <img src="icon/BCNA-Atom.svg" /> |
| 25 | + </td> |
| 26 | + <td class="cell">1-7-14 days</td> |
| 27 | + <td class="cell">${{ tvlData572 | bigFigureOrShortDecimals }}</td> |
| 28 | + <td class="cell">142% + BONUS BCNA</td> |
| 29 | + <td class="cell"> |
| 30 | + <CommonButton |
| 31 | + :href="network.osmosAppUrl + '/pool/572'" |
| 32 | + value="Start earning" |
| 33 | + :link="true" |
| 34 | + /> |
| 35 | + </td> |
| 36 | + </tr> |
| 37 | + <tr> |
| 38 | + <td class="cell">BCNA/OSMO</td> |
| 39 | + <td class="cell"> |
| 40 | + <img src="icon/BCNA-Osmo.svg" width="80" height="45" /> |
| 41 | + </td> |
| 42 | + <td class="cell">1-7-14 days</td> |
| 43 | + <td class="cell">${{ tvlData571 | bigFigureOrShortDecimals }}</td> |
| 44 | + <td class="cell">163% + BONUS BCNA</td> |
| 45 | + <td class="cell"> |
| 46 | + <CommonButton |
| 47 | + :href="network.osmosAppUrl + '/pool/571'" |
| 48 | + value="Start earning" |
| 49 | + :link="true" |
| 50 | + /> |
| 51 | + </td> |
| 52 | + </tr> |
| 53 | + </tbody> |
| 54 | + </table> |
| 55 | + <br /> |
| 56 | + <h1>Stake</h1> |
| 57 | + <table class="tableearn"> |
| 58 | + <col style="width: 20%" /> |
| 59 | + <col style="width: 20%" /> |
| 60 | + <col style="width: 20%" /> |
| 61 | + <col style="width: 20%" /> |
| 62 | + <col style="width: 20%" /> |
| 63 | + <thead> |
| 64 | + <tr> |
| 65 | + <th class="cell index"></th> |
| 66 | + <th class="cell"></th> |
| 67 | + <th class="cell">Lockup</th> |
| 68 | + <th class="cell">TVL</th> |
| 69 | + <th class="cell">APR</th> |
| 70 | + <th class="cell"></th> |
| 71 | + </tr> |
| 72 | + </thead> |
| 73 | + <tbody> |
| 74 | + <tr> |
| 75 | + <td class="cell">BitCanna Delegate</td> |
| 76 | + <td class="cell"> |
| 77 | + <img src="icon/BCNA-icon.svg" width="45" height="45" /> |
| 78 | + </td> |
| 79 | + <td class="cell">14 days</td> |
| 80 | + <td class="cell"> |
| 81 | + ${{ returnBcnaBonded | bigFigureOrShortDecimals }} |
| 82 | + </td> |
| 83 | + <td class="cell"> |
| 84 | + {{ bcnaApr | bigFigureOrShortDecimals }}% (excl. commission) |
| 85 | + <!-- <nuxt-link to="/earn" @click.native="hi"> |
| 86 | + <i class="material-icons">help</i> |
| 87 | + </nuxt-link> --> |
| 88 | + </td> |
| 89 | + <td class="cell noel"> |
| 90 | + <nuxt-link to="/validators" class="li-session"> |
| 91 | + <CommonButton value="Start earning" /> |
| 92 | + </nuxt-link> |
| 93 | + </td> |
| 94 | + </tr> |
| 95 | + <tr> |
| 96 | + <td class="cell">BitCanna Validate</td> |
| 97 | + <td class="cell"> |
| 98 | + <img src="icon/BCNA-icon.svg" width="45" height="45" /> |
| 99 | + </td> |
| 100 | + <td class="cell">NA</td> |
| 101 | + <td class="cell"> |
| 102 | + ${{ returnBcnaBonded | bigFigureOrShortDecimals }} |
| 103 | + </td> |
| 104 | + <td class="cell"> |
| 105 | + {{ bcnaApr | bigFigureOrShortDecimals }}% (excl. commission) |
| 106 | + <!-- <i class="material-icons">help</i> --> |
| 107 | + </td> |
| 108 | + <td class="cell"> |
| 109 | + <CommonButton |
| 110 | + :href="'https://docs.bitcanna.io/guides/validator-setup-guide'" |
| 111 | + value="Start earning" |
| 112 | + :link="true" |
| 113 | + /> |
| 114 | + </td> |
| 115 | + </tr> |
| 116 | + </tbody> |
| 117 | + </table> |
| 118 | + </div> |
| 119 | +</template> |
| 120 | + |
| 121 | +<script> |
| 122 | +import { mapState } from 'vuex' |
| 123 | +import axios from 'axios' |
| 124 | +import network from '~/network' |
| 125 | +import { bigFigureOrShortDecimals } from '~/common/numbers' |
| 126 | +
|
| 127 | +export default { |
| 128 | + name: `PageSwap`, |
| 129 | + filters: { |
| 130 | + bigFigureOrShortDecimals, |
| 131 | + }, |
| 132 | + data: () => ({ |
| 133 | + network, |
| 134 | + tvlData571: '', |
| 135 | + tvlData572: '', |
| 136 | + bcnaAprr: '', |
| 137 | + }), |
| 138 | + computed: { |
| 139 | + ...mapState([`session`]), |
| 140 | + ...mapState(`data`, ['bcnaApr', 'bcnaValue', 'validatorInfoPage']), |
| 141 | + returnBcnaBonded() { |
| 142 | + const finalBonded = |
| 143 | + (this.validatorInfoPage.bonded_tokens / 1000000) * this.bcnaValue |
| 144 | + return finalBonded |
| 145 | + }, |
| 146 | + }, |
| 147 | + async beforeMount() { |
| 148 | + // Pool 571 |
| 149 | + const responseData571 = await axios.get( |
| 150 | + 'https://api-osmosis.imperator.co/pools/v1/571' |
| 151 | + ) |
| 152 | + this.tvlData571 = responseData571.data[0].liquidity |
| 153 | +
|
| 154 | + // Pool 572 |
| 155 | + const responseData572 = await axios.get( |
| 156 | + 'https://api-osmosis.imperator.co/pools/v1/572' |
| 157 | + ) |
| 158 | + this.tvlData572 = responseData572.data[0].liquidity |
| 159 | + }, |
| 160 | + mounted() { |
| 161 | + this.loadData() |
| 162 | + }, |
| 163 | + methods: { |
| 164 | + /* hi(e) { |
| 165 | + const textHelp = |
| 166 | + 'Need help?\nLorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s.' |
| 167 | + this.$toast.info(textHelp, { |
| 168 | + position: 'top-right', |
| 169 | + timeout: 10000, |
| 170 | + closeOnClick: true, |
| 171 | + showCloseButtonOnHover: false, |
| 172 | + hideProgressBar: false, |
| 173 | + closeButton: 'button', |
| 174 | + icon: true, |
| 175 | + }) |
| 176 | + }, */ |
| 177 | + loadData() { |
| 178 | + this.$store.dispatch('data/refresh') |
| 179 | + }, |
| 180 | + }, |
| 181 | +} |
| 182 | +</script> |
| 183 | + |
| 184 | +<style> |
| 185 | +.container2 { |
| 186 | + /* overflow: auto; */ |
| 187 | + border-radius: var(--border-radius); |
| 188 | + background: var(--gray-1100); |
| 189 | +} |
| 190 | +.container2 > h1 { |
| 191 | + font-size: 24px; |
| 192 | + color: #fff; |
| 193 | + color: var(--white); |
| 194 | + font-weight: 600; |
| 195 | + padding-bottom: 1rem; |
| 196 | +} |
| 197 | +.icon { |
| 198 | + display: inline-flex; |
| 199 | + align-self: center; |
| 200 | +} |
| 201 | +
|
| 202 | +.tableearn { |
| 203 | + table-layout: fixed; |
| 204 | + min-width: 100%; |
| 205 | + border-radius: 30px; |
| 206 | + border-collapse: separate; |
| 207 | + border-spacing: 0 10px; |
| 208 | + margin-top: -10px; |
| 209 | +} |
| 210 | +.tableearn th { |
| 211 | + padding: 1rem 0.75rem; |
| 212 | + overflow: hidden; |
| 213 | + text-overflow: ellipsis; |
| 214 | + white-space: nowrap; |
| 215 | + text-align: left; |
| 216 | +} |
| 217 | +.tableearn td { |
| 218 | + vertical-align: middle; |
| 219 | + border: solid 1px #000; |
| 220 | + border-style: solid none; |
| 221 | + padding: 15px; |
| 222 | + background-color: black; |
| 223 | +} |
| 224 | +.tableearn td:first-child { |
| 225 | + border-left-style: solid; |
| 226 | + border-top-left-radius: 10px; |
| 227 | + border-bottom-left-radius: 10px; |
| 228 | +} |
| 229 | +.tableearn td:last-child { |
| 230 | + border-right-style: solid; |
| 231 | + border-bottom-right-radius: 10px; |
| 232 | + border-top-right-radius: 10px; |
| 233 | +} |
| 234 | +</style> |
0 commit comments