Fix issue on lum
This commit is contained in:
parent
657ba8aa85
commit
830a03b02b
@ -60,18 +60,20 @@ export default class ChainFetch {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getLatestBlock(config = null) {
|
async getLatestBlock(config = null) {
|
||||||
// const conf = config || this.getSelectedConfig()
|
const conf = config || this.getSelectedConfig()
|
||||||
// if (conf.chain_name === 'injective') {
|
const ver = conf.sdk_version || '0.41'
|
||||||
// return ChainFetch.fetch('https://tm.injective.network', '/cosmos/base/tendermint/v1beta1/block').then(data => Block.create(commonProcess(data)))
|
if (ver && compareVersions(ver, '0.45') < 1) {
|
||||||
// }
|
return this.get('/blocks/latest', config).then(data => Block.create(data))
|
||||||
|
}
|
||||||
return this.get('/cosmos/base/tendermint/v1beta1/blocks/latest', config).then(data => Block.create(data))
|
return this.get('/cosmos/base/tendermint/v1beta1/blocks/latest', config).then(data => Block.create(data))
|
||||||
}
|
}
|
||||||
|
|
||||||
async getBlockByHeight(height, config = null) {
|
async getBlockByHeight(height, config = null) {
|
||||||
// const conf = config || this.getSelectedConfig()
|
const conf = config || this.getSelectedConfig()
|
||||||
// if (conf.chain_name === 'injective') {
|
const ver = conf.sdk_version || '0.41'
|
||||||
// return ChainFetch.fetch('https://tm.injective.network', `/cosmos/base/tendermint/v1beta1/block?height=${height}`).then(data => Block.create(commonProcess(data)))
|
if (ver && compareVersions(ver, '0.45') < 1) {
|
||||||
// }
|
return this.get(`/blocks/${height}`, config).then(data => Block.create(data))
|
||||||
|
}
|
||||||
return this.get(`/cosmos/base/tendermint/v1beta1/blocks/${height}`, config).then(data => Block.create(data))
|
return this.get(`/cosmos/base/tendermint/v1beta1/blocks/${height}`, config).then(data => Block.create(data))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -371,9 +371,11 @@ export default {
|
|||||||
return '#'
|
return '#'
|
||||||
},
|
},
|
||||||
discord() {
|
discord() {
|
||||||
const discordLink = this.coinInfo.links.chat_url.filter(x => x.includes('discord'))
|
if (this.coinInfo.links) {
|
||||||
if (discordLink) {
|
const discordLink = this.coinInfo.links.chat_url.filter(x => x.includes('discord'))
|
||||||
return discordLink ? `${discordLink}` : '#'
|
if (discordLink) {
|
||||||
|
return discordLink ? `${discordLink}` : '#'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return '#'
|
return '#'
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user