From 088e0948c6ea08cc37cea67cf5c061b06edee224 Mon Sep 17 00:00:00 2001
From: liangping <18786721@qq.com>
Date: Wed, 17 Nov 2021 15:51:30 +0800
Subject: [PATCH] clean code
---
src/views/OsmosisTrade.vue | 39 +-------------------------------------
1 file changed, 1 insertion(+), 38 deletions(-)
diff --git a/src/views/OsmosisTrade.vue b/src/views/OsmosisTrade.vue
index 03e79007..b48032e3 100644
--- a/src/views/OsmosisTrade.vue
+++ b/src/views/OsmosisTrade.vue
@@ -24,22 +24,7 @@
{{ data.address || '0' }}
-
-
@@ -53,7 +38,6 @@ import {
BCard, BCardTitle, VBTooltip, BRow, BCol,
} from 'bootstrap-vue'
import { formatTokenDenom } from '@/libs/data'
-// import fetch from 'node-fetch'
export default {
components: {
@@ -72,29 +56,10 @@ export default {
}
},
created() {
- // const api = new OsmosAPI()
- // this.$http.osmosis.getIncentivesPools().then(res => {
- // })
+ // 所有方法添加到 $http.osmosis
this.$http.osmosis.getPools().then(res => {
this.pools = res
})
- // this.$http.getGravityPools().then(res => {
- // this.pools = res
- // res.pools.forEach(x => {
- // const denom1 = x.reserve_coin_denoms[0]
- // const denom2 = x.reserve_coin_denoms[1]
- // if (denom1.startsWith('ibc')) {
- // this.$http.getIBCDenomTrace(denom1).then(denom => {
- // this.$set(this.ibcDenom, denom1, denom)
- // })
- // }
- // if (denom2.startsWith('ibc')) {
- // this.$http.getIBCDenomTrace(denom2).then(denom => {
- // this.$set(this.ibcDenom, denom2, denom)
- // })
- // }
- // })
- // })
},
beforeDestroy() {
this.islive = false
@@ -102,8 +67,6 @@ export default {
},
methods: {
formatDenom(v) {
- // console.log(v, this.ibcDenom[v])
- // const denom = (v.startsWith('ibc') ? this.ibcDenom[v].denom_trace.base_denom : v)
return formatTokenDenom(v)
},
length: v => (Array.isArray(v) ? v.length : 0),