fix(2590): download JSON for some proposal types not working if proposal terms is empty (#2591)

This commit is contained in:
Sam Keen 2023-01-12 09:40:31 +00:00 committed by GitHub
parent 2689bbdcd2
commit 38ff2c24e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 12 deletions

View File

@ -95,9 +95,9 @@ export const ProposeNewAsset = () => {
description: fields.proposalDescription,
},
terms: {
newAsset: {
...JSON.parse(fields.proposalTerms),
},
newAsset: fields.proposalTerms
? { ...JSON.parse(fields.proposalTerms) }
: {},
closingTimestamp: getClosingTimestamp(
fields.proposalVoteDeadline,
isVoteDeadlineAtMinimum,

View File

@ -89,9 +89,9 @@ export const ProposeNewMarket = () => {
description: fields.proposalDescription,
},
terms: {
newMarket: {
...JSON.parse(fields.proposalTerms),
},
newMarket: fields.proposalTerms
? { ...JSON.parse(fields.proposalTerms) }
: {},
closingTimestamp: getClosingTimestamp(
fields.proposalVoteDeadline,
isVoteDeadlineAtMinimum,

View File

@ -89,9 +89,9 @@ export const ProposeUpdateAsset = () => {
description: fields.proposalDescription,
},
terms: {
updateAsset: {
...JSON.parse(fields.proposalTerms),
},
updateAsset: fields.proposalTerms
? { ...JSON.parse(fields.proposalTerms) }
: {},
closingTimestamp: getClosingTimestamp(
fields.proposalVoteDeadline,
isVoteDeadlineAtMinimum,

View File

@ -132,9 +132,9 @@ export const ProposeUpdateMarket = () => {
terms: {
updateMarket: {
marketId: fields.proposalMarketId,
changes: {
...JSON.parse(fields.proposalTerms),
},
changes: fields.proposalTerms
? { ...JSON.parse(fields.proposalTerms) }
: {},
},
closingTimestamp: getClosingTimestamp(
fields.proposalVoteDeadline,