reduce gov size

This commit is contained in:
liangping 2022-08-31 20:03:42 +08:00
parent 1676247d67
commit cb11ecaccf

View File

@ -352,10 +352,9 @@ export default class ChainFetch {
async getGovernanceList(next = '', chain = null) {
const key = next || ''
const url = this.config.chain_name === 'shentu'
? `/shentu/gov/v1alpha1/proposals?pagination.limit=50&pagination.reverse=true&pagination.key=${key}`
: `/cosmos/gov/v1beta1/proposals?pagination.limit=50&pagination.reverse=true&pagination.key=${key}`
? `/shentu/gov/v1alpha1/proposals?pagination.limit=20&pagination.reverse=true&pagination.key=${key}`
: `/cosmos/gov/v1beta1/proposals?pagination.limit=20&pagination.reverse=true&pagination.key=${key}`
return this.get(url, chain).then(data => {
// const pool = new StakingPool().init(commonProcess(data[1]))
let proposals = commonProcess(data)
if (Array.isArray(proposals.proposals)) {
proposals = proposals.proposals