diff --git a/src/views/GovernanceProposalView.vue b/src/views/GovernanceProposalView.vue
index 46c7d357..bea06b2c 100644
--- a/src/views/GovernanceProposalView.vue
+++ b/src/views/GovernanceProposalView.vue
@@ -49,14 +49,7 @@
>
-
- {{ $t('proposal_id') }}
- {{ proposal.id }}
-
-
-
+
{{ $t('proposal_proposer') }}
{{ formatAddress(proposer.proposer) }}
diff --git a/src/views/components/ObjectFieldComponent.vue b/src/views/components/ObjectFieldComponent.vue
index 19d82694..c6972245 100644
--- a/src/views/components/ObjectFieldComponent.vue
+++ b/src/views/components/ObjectFieldComponent.vue
@@ -15,7 +15,7 @@
- {{ name }}
+ {{ formatTitle(name) }}
{{ formatTokens( value ) }}
@@ -37,13 +37,12 @@
{{ value[key] }}
@@ -71,7 +70,7 @@
{{ value }}
@@ -135,6 +134,7 @@ export default {
// }
return value
},
+ formatTitle: v => v.replaceAll('_', ' '),
isObjectText(v) {
return String(v).startsWith('{') && String(v).endsWith('}')
},
@@ -146,16 +146,16 @@ export default {
return Array.from(value)
},
isTokenField(value) {
- return isToken(value)
+ return value ? isToken(value) : false
},
isHex(value) {
- return isHexAddress(value)
+ return value ? isHexAddress(value) : false
},
formatHexAddress(v) {
return getStakingValidatorByHex(this.$http.config.chain_name, v)
},
isArrayText(value) {
- return isStringArray(value)
+ return value ? isStringArray(value) : false
},
formatTokens(value) {
return tokenFormatter(value)
@@ -165,7 +165,7 @@ export default {
if (percentage.test(value)) {
return `${percent(value)}%`
}
- return value.replace(/(?:\\[rn])+/g, '\n')
+ return value ? value.replace(/(?:\\[rn])+/g, '\n') : '-'
},
},
}