From 5557fbac61d0dd022b440b57722b7fe74edfb8db Mon Sep 17 00:00:00 2001 From: Dariusz Majcherczyk Date: Fri, 23 Feb 2024 18:07:32 +0100 Subject: [PATCH] chore(trading): fix types --- .../src/support/proposal.functions.ts | 24 +++++++++++++++---- libs/wallet/src/connectors/vega-connector.ts | 6 ++--- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/apps/governance-e2e/src/support/proposal.functions.ts b/apps/governance-e2e/src/support/proposal.functions.ts index c44a64161..e1d5d98d8 100644 --- a/apps/governance-e2e/src/support/proposal.functions.ts +++ b/apps/governance-e2e/src/support/proposal.functions.ts @@ -112,8 +112,6 @@ export function createNewMarketProposalTxBody(): ProposalSubmissionBody { performanceHysteresisEpochs: 2, slaCompetitionFactor: '0.1', }, - // FIXME: workaround because of https://github.com/vegaprotocol/vega/issues/10343 - quadraticSlippageFactor: '0', instrument: { name: 'Token test market', code: 'TEST.24h', @@ -210,6 +208,16 @@ export function createNewMarketProposalTxBody(): ProposalSubmissionBody { sigma: 0.5, }, }, + markPriceConfiguration: { + decayWeight: '1', + decayPower: '1', + cashAmount: '5000000', + sourceWeights: undefined, + sourceStalenessTolerance: ['1m0s', '1m0s', '1m0s'], + compositePriceType: 'COMPOSITE_PRICE_TYPE_WEIGHTED', + dataSourcesSpec: [], + dataSourcesSpecBinding: [], + }, }, }, closingTimestamp, @@ -242,8 +250,6 @@ export function createSuccessorMarketProposalTxBody( decimalPlaces: '5', positionDecimalPlaces: '5', linearSlippageFactor: '0.001', - // FIXME: workaround because of https://github.com/vegaprotocol/vega/issues/10343 - quadraticSlippageFactor: '0', liquiditySlaParameters: { priceRange: '0.5', commitmentMinTimeFraction: '0.1', @@ -354,6 +360,16 @@ export function createSuccessorMarketProposalTxBody( parentMarketId: parentMarketId, insurancePoolFraction: '0.75', }, + markPriceConfiguration: { + decayWeight: '1', + decayPower: '1', + cashAmount: '5000000', + sourceWeights: undefined, + sourceStalenessTolerance: ['1m0s', '1m0s', '1m0s'], + compositePriceType: 'COMPOSITE_PRICE_TYPE_WEIGHTED', + dataSourcesSpec: [], + dataSourcesSpecBinding: [], + }, }, }, closingTimestamp, diff --git a/libs/wallet/src/connectors/vega-connector.ts b/libs/wallet/src/connectors/vega-connector.ts index cea48b1ef..0d6cda57d 100644 --- a/libs/wallet/src/connectors/vega-connector.ts +++ b/libs/wallet/src/connectors/vega-connector.ts @@ -160,9 +160,9 @@ interface ProposalNewMarketTerms { decayWeight: string; decayPower: string; cashAmount: string; - sourceWeights: string[]; + sourceWeights: undefined; sourceStalenessTolerance: string[]; - compositePriceType: Schema.CompositePriceType; + compositePriceType: string; dataSourcesSpec: Schema.DataSourceDefinition[]; dataSourcesSpecBinding: Schema.SpecBindingForCompositePrice[]; }; @@ -177,8 +177,6 @@ interface ProposalUpdateMarketTerms { marketId: string; changes: { linearSlippageFactor: string; - // FIXME: workaround because of https://github.com/vegaprotocol/vega/issues/10343 - quadraticSlippageFactor: string; instrument: { code: string; future: {