diff --git a/components/create/editor/Publishing.tsx b/components/create/editor/Publishing.tsx index 752af01d8..1c5273bf8 100644 --- a/components/create/editor/Publishing.tsx +++ b/components/create/editor/Publishing.tsx @@ -104,7 +104,7 @@ export const Publishing = ({ editor, creationParams }: PublishingProps) => { editor.form.moderation === "Permissionless" && editor.form.liquidity?.deploy && editor.form.currency === "ZTG" - ? new Decimal(editor.form.liquidity.amount ?? 0).toNumber() + ? new Decimal(editor.form.liquidity.amount || 0).toNumber() : 0, ) .plus(ztgTransactionFee ?? 0); @@ -121,7 +121,7 @@ export const Publishing = ({ editor, creationParams }: PublishingProps) => { const foreignCurrencyCost = editor.form.liquidity?.deploy && editor.form.currency !== "ZTG" - ? new Decimal(editor.form.liquidity.amount ?? 0) + ? new Decimal(editor.form.liquidity.amount || 0) .mul(2) .plus(baseAssetTransactionFee ?? 0) : null; @@ -314,7 +314,7 @@ export const Publishing = ({ editor, creationParams }: PublishingProps) => {
{new Decimal( - editor.form.liquidity.amount ?? 0, + editor.form.liquidity.amount || 0, ).toFixed(1)}{" "} {editor.form.currency}
diff --git a/lib/state/market-creation/editor.ts b/lib/state/market-creation/editor.ts index e3e6418b9..afd15b430 100644 --- a/lib/state/market-creation/editor.ts +++ b/lib/state/market-creation/editor.ts @@ -367,7 +367,7 @@ export const useMarketDraftEditor = (): MarketDraftEditor => { ...draft.form, liquidity: { ...draft.form.liquidity, - amount: draft.form.liquidity.amount ?? liquidity, + amount: draft.form.liquidity.amount || liquidity, rows, }, },