Fix new text proposal (no messages) for 0.46+

This commit is contained in:
Gjermund Garaba 2023-06-27 20:41:13 +02:00
parent 8f77758fe9
commit ab416e4215
No known key found for this signature in database
GPG Key ID: B56E3C107AEB9B08

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,