Merge pull request #461 from gjermundgaraba/fix-text-proposal-0-46-47

Fix new text proposal (no messages) for 0.46+
This commit is contained in:
ping 2023-06-28 08:18:29 +08:00 committed by GitHub
commit 6b7b0d0969
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,7 +17,7 @@ export const name = 'v0.46.7'
function proposalAdapter(p: any): GovProposal {
if(p) {
if(p.messages) p.content = p.messages[0].content || p.messages[0]
if(p.messages && p.messages.length >= 1) p.content = p.messages[0].content || p.messages[0]
p.proposal_id = p.id
p.final_tally_result = {
yes: p.final_tally_result?.yes_count,