diff --git a/src/libs/osmos.js b/src/libs/osmos.js
index 4d76e2d6..f75f8300 100644
--- a/src/libs/osmos.js
+++ b/src/libs/osmos.js
@@ -38,7 +38,7 @@ export function getPairName(pool, denomTrace, type = 'base') {
const index = type === 'base' ? 0 : 1
if (pool && pool.poolAssets) {
if (pool.poolAssets[index].token.denom.startsWith('ibc')) {
- return formatTokenDenom(denomTrace[pool.poolAssets[index].token.denom].base_denom)
+ return formatTokenDenom(denomTrace[pool.poolAssets[index].token.denom]?.base_denom) || '-'
}
return formatTokenDenom(pool.poolAssets[index].token.denom)
}
diff --git a/src/views/components/KlineTrade/PlaceForm.vue b/src/views/components/KlineTrade/PlaceForm.vue
index e82b370c..9172bd2b 100644
--- a/src/views/components/KlineTrade/PlaceForm.vue
+++ b/src/views/components/KlineTrade/PlaceForm.vue
@@ -16,6 +16,12 @@
{{ price }} {{ target }}
+
{
- if (x.denom === denom) {
- amount = x.amount
- }
- })
+ if (Array.isArray(this.balance)) {
+ console.log('balance', this.balance)
+ this.balance.forEach(x => {
+ if (x.denom === denom) {
+ amount = x.amount
+ }
+ })
+ }
return formatTokenAmount(amount, 6, denom)
}
return 0
},
+ fee() {
+ if (this.pool) {
+ return percent(this.pool.poolParams.swapFee)
+ }
+ return '-'
+ },
},
created() {
this.initialAddress()
@@ -219,6 +234,16 @@ export default {
this.balance = res
}
})
+ this.$http.getAuthAccount(this.address, this.selectedChain).then(ret => {
+ if (ret.value.base_vesting_account) {
+ this.accountNumber = ret.value.base_vesting_account.base_account.account_number
+ this.sequence = ret.value.base_vesting_account.base_account.sequence
+ if (!this.sequence) this.sequence = 0
+ } else {
+ this.accountNumber = ret.value.account_number
+ this.sequence = ret.value.sequence ? ret.value.sequence : 0
+ }
+ })
},
methods: {
initialAddress() {
@@ -239,6 +264,9 @@ export default {
changeTotal() {
this.amount = this.total / this.price
},
+ submitTrade() {
+
+ },
},
}
diff --git a/src/views/components/tvjs/index.vue b/src/views/components/tvjs/index.vue
index c355e682..58d507ac 100644
--- a/src/views/components/tvjs/index.vue
+++ b/src/views/components/tvjs/index.vue
@@ -24,9 +24,9 @@ export default {
width: 700,
height: 600,
colors: {
- colorBack: '#283046', // '#fff',
+ colorBack: '#00000000', // '#fff',
colorGrid: '#333', // '#eee',
- colorText: '#fff',
+ colorText: '#aaa',
},
}
},