Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
52271ce49a |
@@ -20,10 +20,12 @@ import isEqual from 'lodash/isEqual';
|
||||
export const MarketDetails = ({ market }: { market: MarketInfoWithData }) => {
|
||||
if (!market) return null;
|
||||
|
||||
const settlementData = market.tradableInstrument.instrument.product
|
||||
.dataSourceSpecForSettlementData.data as DataSourceDefinition;
|
||||
const terminationData = market.tradableInstrument.instrument.product
|
||||
.dataSourceSpecForTradingTermination.data as DataSourceDefinition;
|
||||
const settlementData =
|
||||
market.tradableInstrument.instrument.product.dataSourceSpecForSettlementData
|
||||
.data;
|
||||
const terminationData =
|
||||
market.tradableInstrument.instrument.product
|
||||
.dataSourceSpecForTradingTermination.data;
|
||||
|
||||
const getSigners = (data: DataSourceDefinition) => {
|
||||
if (data.sourceType.__typename === 'DataSourceDefinitionExternal') {
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
import type { Proposal } from './tx-proposal';
|
||||
import { proposalRequiresSignatureBundle } from './tx-proposal';
|
||||
|
||||
describe('proposalRequiresSignatureBundle', () => {
|
||||
it('should return false for freeform proposals, which do not require a signature bundle to enact', () => {
|
||||
const mock = {
|
||||
terms: {
|
||||
newFreeform: {},
|
||||
},
|
||||
};
|
||||
|
||||
expect(proposalRequiresSignatureBundle(mock)).toEqual(false);
|
||||
});
|
||||
|
||||
it('should return false for newMarket proposals, which do not require a signature bundle to enact', () => {
|
||||
const mock = {
|
||||
terms: {
|
||||
newMarket: {},
|
||||
},
|
||||
};
|
||||
|
||||
expect(proposalRequiresSignatureBundle(mock)).toEqual(false);
|
||||
});
|
||||
|
||||
it('should return true for newAsset proposals, which do require a signature bundle to enact', () => {
|
||||
const mock = {
|
||||
terms: {
|
||||
newAsset: {},
|
||||
},
|
||||
};
|
||||
|
||||
expect(proposalRequiresSignatureBundle(mock)).toEqual(true);
|
||||
});
|
||||
|
||||
it('should return true for updateAsset proposals, which do require a signature bundle to enact', () => {
|
||||
const mock = {
|
||||
terms: {
|
||||
updateAsset: {},
|
||||
},
|
||||
};
|
||||
|
||||
expect(proposalRequiresSignatureBundle(mock)).toEqual(true);
|
||||
});
|
||||
|
||||
it('should return false when bad data is supplied', () => {
|
||||
expect(
|
||||
proposalRequiresSignatureBundle(false as unknown as Proposal)
|
||||
).toEqual(false);
|
||||
expect(
|
||||
proposalRequiresSignatureBundle(undefined as unknown as Proposal)
|
||||
).toEqual(false);
|
||||
expect(
|
||||
proposalRequiresSignatureBundle({ test: false } as unknown as Proposal)
|
||||
).toEqual(false);
|
||||
});
|
||||
});
|
||||
@@ -28,16 +28,11 @@ interface TxProposalProps {
|
||||
* @returns boolean True if a signature bundle is required. Used to fetch a signature bundle
|
||||
*/
|
||||
export function proposalRequiresSignatureBundle(proposal?: Proposal): boolean {
|
||||
const proposalsThatRequireBundles = ['newAsset', 'updateAsset'];
|
||||
|
||||
if (!proposal?.terms) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return (
|
||||
proposalsThatRequireBundles.filter((requiredIfExists) =>
|
||||
has(proposal.terms, requiredIfExists)
|
||||
).length > 0
|
||||
return !!['newAsset', 'updateAsset'].filter((requiredIfExists) =>
|
||||
has(proposal.terms, requiredIfExists)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -86,7 +81,6 @@ export const TxProposal = ({ txData, pubKey, blockData }: TxProposalProps) => {
|
||||
|
||||
const tx = proposal.terms?.newAsset || proposal.terms?.updateAsset;
|
||||
|
||||
// This component is not rendered if no bundle is required
|
||||
const SignatureBundleComponent = proposal.terms?.newAsset
|
||||
? ProposalSignatureBundleNewAsset
|
||||
: ProposalSignatureBundleUpdateAsset;
|
||||
|
||||
+1
-1
@@ -124,7 +124,7 @@ describe('Proposal header', () => {
|
||||
})
|
||||
);
|
||||
expect(screen.getByTestId('proposal-title')).toHaveTextContent(
|
||||
'New asset proposal'
|
||||
'Unknown proposal'
|
||||
);
|
||||
expect(screen.getByTestId('proposal-type')).toHaveTextContent('New asset');
|
||||
expect(screen.getByTestId('proposal-details')).toHaveTextContent(
|
||||
|
||||
+2
-13
@@ -21,7 +21,6 @@ export const ProposalHeader = ({
|
||||
|
||||
let details: ReactNode;
|
||||
let proposalType = '';
|
||||
let fallbackTitle = '';
|
||||
|
||||
const title = proposal?.rationale.title.trim();
|
||||
|
||||
@@ -30,7 +29,6 @@ export const ProposalHeader = ({
|
||||
switch (change?.__typename) {
|
||||
case 'NewMarket': {
|
||||
proposalType = 'NewMarket';
|
||||
fallbackTitle = t('NewMarketProposal');
|
||||
details = (
|
||||
<>
|
||||
<span>
|
||||
@@ -52,7 +50,6 @@ export const ProposalHeader = ({
|
||||
}
|
||||
case 'UpdateMarket': {
|
||||
proposalType = 'UpdateMarket';
|
||||
fallbackTitle = t('UpdateMarketProposal');
|
||||
details = (
|
||||
<>
|
||||
<span>{t('Market change')}:</span>{' '}
|
||||
@@ -63,7 +60,6 @@ export const ProposalHeader = ({
|
||||
}
|
||||
case 'NewAsset': {
|
||||
proposalType = 'NewAsset';
|
||||
fallbackTitle = t('NewAssetProposal');
|
||||
details = (
|
||||
<>
|
||||
<span>{t('Symbol')}:</span> <Lozenge>{change.symbol}.</Lozenge>{' '}
|
||||
@@ -85,7 +81,6 @@ export const ProposalHeader = ({
|
||||
}
|
||||
case 'UpdateNetworkParameter': {
|
||||
proposalType = 'NetworkParameter';
|
||||
fallbackTitle = t('NetworkParameterProposal');
|
||||
details = (
|
||||
<>
|
||||
<span>{t('Change')}:</span>{' '}
|
||||
@@ -100,13 +95,11 @@ export const ProposalHeader = ({
|
||||
}
|
||||
case 'NewFreeform': {
|
||||
proposalType = 'Freeform';
|
||||
fallbackTitle = t('FreeformProposal');
|
||||
details = <span />;
|
||||
break;
|
||||
}
|
||||
case 'UpdateAsset': {
|
||||
proposalType = 'UpdateAsset';
|
||||
fallbackTitle = t('UpdateAssetProposal');
|
||||
details = (
|
||||
<>
|
||||
<span>{t('AssetID')}:</span>{' '}
|
||||
@@ -122,14 +115,10 @@ export const ProposalHeader = ({
|
||||
<div data-testid="proposal-title">
|
||||
{isListItem ? (
|
||||
<header>
|
||||
<SubHeading
|
||||
title={titleContent || fallbackTitle || t('Unknown proposal')}
|
||||
/>
|
||||
<SubHeading title={titleContent || t('Unknown proposal')} />
|
||||
</header>
|
||||
) : (
|
||||
<Heading
|
||||
title={titleContent || fallbackTitle || t('Unknown proposal')}
|
||||
/>
|
||||
<Heading title={titleContent || t('Unknown proposal')} />
|
||||
)}
|
||||
</div>
|
||||
|
||||
|
||||
@@ -49,7 +49,6 @@ export const ProposeFreeform = () => {
|
||||
formState: { errors },
|
||||
setValue,
|
||||
watch,
|
||||
trigger,
|
||||
} = useForm<FreeformProposalFormFields>();
|
||||
const { finalizedProposal, submit, Dialog } = useProposalSubmit();
|
||||
|
||||
@@ -86,13 +85,7 @@ export const ProposeFreeform = () => {
|
||||
await submit(assembleProposal(fields));
|
||||
};
|
||||
|
||||
const viewJson = async () => {
|
||||
const isValid = await trigger();
|
||||
|
||||
if (!isValid) {
|
||||
return;
|
||||
}
|
||||
|
||||
const viewJson = () => {
|
||||
const formData = watch();
|
||||
downloadJson(
|
||||
JSON.stringify(assembleProposal(formData)),
|
||||
|
||||
+1
-8
@@ -89,7 +89,6 @@ export const ProposeNetworkParameter = () => {
|
||||
formState: { errors },
|
||||
setValue,
|
||||
watch,
|
||||
trigger,
|
||||
} = useForm<NetworkParameterProposalFormFields>();
|
||||
const { finalizedProposal, submit, Dialog } = useProposalSubmit();
|
||||
|
||||
@@ -149,13 +148,7 @@ export const ProposeNetworkParameter = () => {
|
||||
await submit(assembleProposal(fields));
|
||||
};
|
||||
|
||||
const viewJson = async () => {
|
||||
const isValid = await trigger();
|
||||
|
||||
if (!isValid) {
|
||||
return;
|
||||
}
|
||||
|
||||
const viewJson = () => {
|
||||
const formData = watch();
|
||||
downloadJson(
|
||||
JSON.stringify(assembleProposal(formData)),
|
||||
|
||||
@@ -61,7 +61,6 @@ export const ProposeNewAsset = () => {
|
||||
formState: { errors },
|
||||
setValue,
|
||||
watch,
|
||||
trigger,
|
||||
} = useForm<NewAssetProposalFormFields>();
|
||||
const { finalizedProposal, submit, Dialog } = useProposalSubmit();
|
||||
|
||||
@@ -118,13 +117,7 @@ export const ProposeNewAsset = () => {
|
||||
await submit(assembleProposal(fields));
|
||||
};
|
||||
|
||||
const viewJson = async () => {
|
||||
const isValid = await trigger();
|
||||
|
||||
if (!isValid) {
|
||||
return;
|
||||
}
|
||||
|
||||
const viewJson = () => {
|
||||
const formData = watch();
|
||||
downloadJson(
|
||||
JSON.stringify(assembleProposal(formData)),
|
||||
|
||||
@@ -59,7 +59,6 @@ export const ProposeNewMarket = () => {
|
||||
formState: { errors },
|
||||
setValue,
|
||||
watch,
|
||||
trigger,
|
||||
} = useForm<NewMarketProposalFormFields>();
|
||||
const { finalizedProposal, submit, Dialog } = useProposalSubmit();
|
||||
|
||||
@@ -108,13 +107,7 @@ export const ProposeNewMarket = () => {
|
||||
await submit(assembleProposal(fields));
|
||||
};
|
||||
|
||||
const viewJson = async () => {
|
||||
const isValid = await trigger();
|
||||
|
||||
if (!isValid) {
|
||||
return;
|
||||
}
|
||||
|
||||
const viewJson = () => {
|
||||
const formData = watch();
|
||||
downloadJson(
|
||||
JSON.stringify(assembleProposal(formData)),
|
||||
|
||||
@@ -59,7 +59,6 @@ export const ProposeUpdateAsset = () => {
|
||||
formState: { errors },
|
||||
setValue,
|
||||
watch,
|
||||
trigger,
|
||||
} = useForm<UpdateAssetProposalFormFields>();
|
||||
const { finalizedProposal, submit, Dialog } = useProposalSubmit();
|
||||
|
||||
@@ -108,13 +107,7 @@ export const ProposeUpdateAsset = () => {
|
||||
await submit(assembleProposal(fields));
|
||||
};
|
||||
|
||||
const viewJson = async () => {
|
||||
const isValid = await trigger();
|
||||
|
||||
if (!isValid) {
|
||||
return;
|
||||
}
|
||||
|
||||
const viewJson = () => {
|
||||
const formData = watch();
|
||||
downloadJson(
|
||||
JSON.stringify(assembleProposal(formData)),
|
||||
|
||||
+1
-8
@@ -106,7 +106,6 @@ export const ProposeUpdateMarket = () => {
|
||||
formState: { errors },
|
||||
setValue,
|
||||
watch,
|
||||
trigger,
|
||||
} = useForm<UpdateMarketProposalFormFields>();
|
||||
const { finalizedProposal, submit, Dialog } = useProposalSubmit();
|
||||
|
||||
@@ -158,13 +157,7 @@ export const ProposeUpdateMarket = () => {
|
||||
await submit(assembleProposal(fields));
|
||||
};
|
||||
|
||||
const viewJson = async () => {
|
||||
const isValid = await trigger();
|
||||
|
||||
if (!isValid) {
|
||||
return;
|
||||
}
|
||||
|
||||
const viewJson = () => {
|
||||
const formData = watch();
|
||||
downloadJson(
|
||||
JSON.stringify(assembleProposal(formData)),
|
||||
|
||||
@@ -36,9 +36,9 @@
|
||||
"tranche_id": 58,
|
||||
"tranche_start": "2023-05-11T00:00:00.000Z",
|
||||
"tranche_end": "2023-06-11T00:00:00.000Z",
|
||||
"total_added": "22171",
|
||||
"total_added": "21906",
|
||||
"total_removed": "215.8495183664",
|
||||
"locked_amount": "16087.5421553912796572",
|
||||
"locked_amount": "16071.2783400537630666",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "11447",
|
||||
@@ -134,16 +134,6 @@
|
||||
"amount": "27",
|
||||
"user": "0x697cEF6741F519621fE14c72041e4B8B1f7e2c8A",
|
||||
"tx": "0x219dd6f5a742fc8c99add1df269ea16bac53db20d2b1f11ff75e2cd557904065"
|
||||
},
|
||||
{
|
||||
"amount": "30",
|
||||
"user": "0x90Cf7B9958C3BbBCddAb52Ecc408535D4f3C4241",
|
||||
"tx": "0x13eb5324590141c3cbdf8b22237c0290f609021321ec0584d94249bac2401c74"
|
||||
},
|
||||
{
|
||||
"amount": "235",
|
||||
"user": "0x2f1C71D4134B4C154BF946aeb9A94cc2Da1efe59",
|
||||
"tx": "0x4b9137c5b07d4a07e864dfbe3810ad7b78f276e1017c9ccc8d99ced6fea3e9ae"
|
||||
}
|
||||
],
|
||||
"withdrawals": [
|
||||
@@ -421,36 +411,6 @@
|
||||
"total_tokens": "4765",
|
||||
"withdrawn_tokens": "0",
|
||||
"remaining_tokens": "4765"
|
||||
},
|
||||
{
|
||||
"address": "0x90Cf7B9958C3BbBCddAb52Ecc408535D4f3C4241",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "30",
|
||||
"user": "0x90Cf7B9958C3BbBCddAb52Ecc408535D4f3C4241",
|
||||
"tranche_id": 58,
|
||||
"tx": "0x13eb5324590141c3cbdf8b22237c0290f609021321ec0584d94249bac2401c74"
|
||||
}
|
||||
],
|
||||
"withdrawals": [],
|
||||
"total_tokens": "30",
|
||||
"withdrawn_tokens": "0",
|
||||
"remaining_tokens": "30"
|
||||
},
|
||||
{
|
||||
"address": "0x2f1C71D4134B4C154BF946aeb9A94cc2Da1efe59",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "235",
|
||||
"user": "0x2f1C71D4134B4C154BF946aeb9A94cc2Da1efe59",
|
||||
"tranche_id": 58,
|
||||
"tx": "0x4b9137c5b07d4a07e864dfbe3810ad7b78f276e1017c9ccc8d99ced6fea3e9ae"
|
||||
}
|
||||
],
|
||||
"withdrawals": [],
|
||||
"total_tokens": "235",
|
||||
"withdrawn_tokens": "0",
|
||||
"remaining_tokens": "235"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -492,8 +452,8 @@
|
||||
"tranche_start": "2023-04-20T00:00:00.000Z",
|
||||
"tranche_end": "2023-05-20T00:00:00.000Z",
|
||||
"total_added": "21431.125",
|
||||
"total_removed": "5063.63195980021375",
|
||||
"locked_amount": "352.877694396219380540625",
|
||||
"total_removed": "4874.82783147815125",
|
||||
"locked_amount": "530.8254846161266649175",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "897",
|
||||
@@ -817,16 +777,6 @@
|
||||
"user": "0x9E53F72210479BF46aE7ABF77c48B0d611b3c3dB",
|
||||
"tx": "0xa6fd18e4158f18bdd8bf5294e69847a229e9b6dacd1772f94e95f0c56285729d"
|
||||
},
|
||||
{
|
||||
"amount": "92.7240241607625",
|
||||
"user": "0xdC483901425B2EA6494EaE01ADB6565936E25124",
|
||||
"tx": "0x0fb773aaa35072e4a5129d4815ad5f1f0808fb4a41c9ca119bf8c4caa1b64bf8"
|
||||
},
|
||||
{
|
||||
"amount": "96.0801041613",
|
||||
"user": "0x1447Efc62d5077d7AbB20492dF831Dd6c9Eb1756",
|
||||
"tx": "0xbc77fce0ebe70c829a12092a26249b1db5456186ba6b11c874bd59e8aca77b03"
|
||||
},
|
||||
{
|
||||
"amount": "202.093666077975",
|
||||
"user": "0x1447Efc62d5077d7AbB20492dF831Dd6c9Eb1756",
|
||||
@@ -1131,12 +1081,6 @@
|
||||
"tranche_id": 56,
|
||||
"tx": "0x682c6453a6c681312a81e15f244e4885c0ceaab35c7dc041c02d536ff42ca62f"
|
||||
},
|
||||
{
|
||||
"amount": "96.0801041613",
|
||||
"user": "0x1447Efc62d5077d7AbB20492dF831Dd6c9Eb1756",
|
||||
"tranche_id": 56,
|
||||
"tx": "0xbc77fce0ebe70c829a12092a26249b1db5456186ba6b11c874bd59e8aca77b03"
|
||||
},
|
||||
{
|
||||
"amount": "202.093666077975",
|
||||
"user": "0x1447Efc62d5077d7AbB20492dF831Dd6c9Eb1756",
|
||||
@@ -1163,8 +1107,8 @@
|
||||
}
|
||||
],
|
||||
"total_tokens": "1207.5",
|
||||
"withdrawn_tokens": "1182.628388303775",
|
||||
"remaining_tokens": "24.871611696225"
|
||||
"withdrawn_tokens": "1086.548284142475",
|
||||
"remaining_tokens": "120.951715857525"
|
||||
},
|
||||
{
|
||||
"address": "0x33Ce1D9E53AFb7367E34749517C086405a651a95",
|
||||
@@ -1416,17 +1360,10 @@
|
||||
"tx": "0x14ca69443a14b0f35538856a4fdda6a2b287d7ac6e7c4e600fb797c4c6d44098"
|
||||
}
|
||||
],
|
||||
"withdrawals": [
|
||||
{
|
||||
"amount": "92.7240241607625",
|
||||
"user": "0xdC483901425B2EA6494EaE01ADB6565936E25124",
|
||||
"tranche_id": 56,
|
||||
"tx": "0x0fb773aaa35072e4a5129d4815ad5f1f0808fb4a41c9ca119bf8c4caa1b64bf8"
|
||||
}
|
||||
],
|
||||
"withdrawals": [],
|
||||
"total_tokens": "94.875",
|
||||
"withdrawn_tokens": "92.7240241607625",
|
||||
"remaining_tokens": "2.1509758392375"
|
||||
"withdrawn_tokens": "0",
|
||||
"remaining_tokens": "94.875"
|
||||
},
|
||||
{
|
||||
"address": "0xE9F41a0090fcc7eaf626037003AAD44B17098E7C",
|
||||
@@ -6215,7 +6152,7 @@
|
||||
"tranche_end": "2023-12-05T00:00:00.000Z",
|
||||
"total_added": "86666.297",
|
||||
"total_removed": "0",
|
||||
"locked_amount": "47368.22916631352482661",
|
||||
"locked_amount": "47427.3752864312792701068",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "86666.297",
|
||||
@@ -6281,7 +6218,7 @@
|
||||
"tranche_end": "2023-06-01T00:00:00.000Z",
|
||||
"total_added": "2500",
|
||||
"total_removed": "0",
|
||||
"locked_amount": "171.620465761090625",
|
||||
"locked_amount": "175.042130901506",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "2500",
|
||||
@@ -6314,7 +6251,7 @@
|
||||
"tranche_end": "2023-11-01T00:00:00.000Z",
|
||||
"total_added": "15000.000000000000015",
|
||||
"total_removed": "0",
|
||||
"locked_amount": "13491.356242451691013491356242451691",
|
||||
"locked_amount": "13511.663081219808013511663081219808",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "1.5e-14",
|
||||
@@ -6422,7 +6359,7 @@
|
||||
"tranche_end": "2023-09-01T00:00:00.000Z",
|
||||
"total_added": "17500",
|
||||
"total_removed": "0",
|
||||
"locked_amount": "9938.2851814110305",
|
||||
"locked_amount": "9961.97649330716525",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "12500",
|
||||
@@ -6689,7 +6626,7 @@
|
||||
"tranche_end": "2023-08-01T00:00:00.000Z",
|
||||
"total_added": "37500",
|
||||
"total_removed": "18592.291570575",
|
||||
"locked_amount": "15226.651223910375",
|
||||
"locked_amount": "15278.259764426026125",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "7500",
|
||||
@@ -7141,7 +7078,7 @@
|
||||
"tranche_end": "2023-12-05T00:00:00.000Z",
|
||||
"total_added": "129999.45",
|
||||
"total_removed": "0",
|
||||
"locked_amount": "47325.01161729839244873",
|
||||
"locked_amount": "47384.103774023588476863",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "129999.45",
|
||||
@@ -7174,7 +7111,7 @@
|
||||
"tranche_end": "2024-04-01T00:00:00.000Z",
|
||||
"total_added": "54144.7663",
|
||||
"total_removed": "0",
|
||||
"locked_amount": "46968.95301173717592265927",
|
||||
"locked_amount": "47005.80358792078600524149",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "54144.7663",
|
||||
@@ -7207,7 +7144,7 @@
|
||||
"tranche_end": "2023-09-03T00:00:00.000Z",
|
||||
"total_added": "62600",
|
||||
"total_removed": "0",
|
||||
"locked_amount": "18264.44524987316222",
|
||||
"locked_amount": "18307.16712962962592",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "10000",
|
||||
@@ -7400,7 +7337,7 @@
|
||||
"tranche_end": "2023-09-17T00:00:00.000Z",
|
||||
"total_added": "5000",
|
||||
"total_removed": "0",
|
||||
"locked_amount": "1650.6023274987315",
|
||||
"locked_amount": "1654.01461821410465",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "5000",
|
||||
@@ -8469,7 +8406,7 @@
|
||||
"tranche_end": "2023-06-02T00:00:00.000Z",
|
||||
"total_added": "1939928.38",
|
||||
"total_removed": "1709370.7872515768348",
|
||||
"locked_amount": "71718.7265267003714855776",
|
||||
"locked_amount": "73042.6464466127914863066",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "1852091.69",
|
||||
@@ -13990,7 +13927,7 @@
|
||||
"tranche_id": 11,
|
||||
"tranche_start": "2021-09-03T00:00:00.000Z",
|
||||
"tranche_end": "2022-09-03T00:00:00.000Z",
|
||||
"total_added": "58393.000000000000000003",
|
||||
"total_added": "58128.000000000000000003",
|
||||
"total_removed": "51151.35141572991",
|
||||
"locked_amount": "0",
|
||||
"deposits": [
|
||||
@@ -14069,76 +14006,6 @@
|
||||
"user": "0x84D58afeeCd6E2640aF84C329f401AA8a5C9c9E7",
|
||||
"tx": "0x05b5fd46cee5634d9a657a11f66a3ac8d9734e1acc2e2b22015cea69235a0ce5"
|
||||
},
|
||||
{
|
||||
"amount": "20",
|
||||
"user": "0xaaaaFd67947Ef241D8C24C863893800083855Ed6",
|
||||
"tx": "0xeaa18356de12943a056aa6b91a8ade1aa10db8c89f23ef31e53282ae773a5d35"
|
||||
},
|
||||
{
|
||||
"amount": "15",
|
||||
"user": "0xaaaaFd67947Ef241D8C24C863893800083855Ed6",
|
||||
"tx": "0x2c27ae0e62ab334b724c9db3bb396f2bd77339f95c40a8a225ae5384894d3349"
|
||||
},
|
||||
{
|
||||
"amount": "20",
|
||||
"user": "0xaaaaFd67947Ef241D8C24C863893800083855Ed6",
|
||||
"tx": "0x986a29849a0d1c408b01c2c70ec5a2e1a2aeb3f54069fac37430f94bee4147fa"
|
||||
},
|
||||
{
|
||||
"amount": "20",
|
||||
"user": "0xaaaaFd67947Ef241D8C24C863893800083855Ed6",
|
||||
"tx": "0xa8c3f59f63559f01f6260f3351e5f91be1c679ef0c43994797db4cdfd1ff946e"
|
||||
},
|
||||
{
|
||||
"amount": "15",
|
||||
"user": "0xaaaaFd67947Ef241D8C24C863893800083855Ed6",
|
||||
"tx": "0x28f5216d95bb0ff69afbbeecd3920f94288cb767e3c90b92a4d93c1f2ea3e424"
|
||||
},
|
||||
{
|
||||
"amount": "20",
|
||||
"user": "0xaaaaFd67947Ef241D8C24C863893800083855Ed6",
|
||||
"tx": "0xdf3778608599b3309e33cbba17313263bcacb07d3159be0f1793e544559cc1cf"
|
||||
},
|
||||
{
|
||||
"amount": "20",
|
||||
"user": "0xaaaaFd67947Ef241D8C24C863893800083855Ed6",
|
||||
"tx": "0xa97f847bcefd46d5ff2485f8fe990b19f5c46594e862c82769303be5845575bd"
|
||||
},
|
||||
{
|
||||
"amount": "20",
|
||||
"user": "0xaaaaFd67947Ef241D8C24C863893800083855Ed6",
|
||||
"tx": "0xc5e3724ea798bc88eb4fab300c381bbedaa84c3bf8778639147041e1a62d28fe"
|
||||
},
|
||||
{
|
||||
"amount": "20",
|
||||
"user": "0xaaaaFd67947Ef241D8C24C863893800083855Ed6",
|
||||
"tx": "0x977e6fcbf640e3b330db19ae85515ef9d991f170a8ac8068309254f5ff0141b1"
|
||||
},
|
||||
{
|
||||
"amount": "20",
|
||||
"user": "0xaaaaFd67947Ef241D8C24C863893800083855Ed6",
|
||||
"tx": "0xc2e8f773c7c9b1014fec441fed237663163f144cebb409476cc6e7297290d602"
|
||||
},
|
||||
{
|
||||
"amount": "20",
|
||||
"user": "0xaaaaFd67947Ef241D8C24C863893800083855Ed6",
|
||||
"tx": "0xfa1c7ea4e8e5ecfeddf1b6ebb651cd54ea39cb486d1f4acc2b7e7ab792431db4"
|
||||
},
|
||||
{
|
||||
"amount": "20",
|
||||
"user": "0xaaaaFd67947Ef241D8C24C863893800083855Ed6",
|
||||
"tx": "0x5de72ac4f446d6ca03903247470c38f80f8871686cbeaeffe302e009c4d897ac"
|
||||
},
|
||||
{
|
||||
"amount": "15",
|
||||
"user": "0xaaaaFd67947Ef241D8C24C863893800083855Ed6",
|
||||
"tx": "0x4a71f43fcf7c8d857620114c2badd2d18ba1da5766be5d4ff03f9fad7da122b0"
|
||||
},
|
||||
{
|
||||
"amount": "20",
|
||||
"user": "0xaaaaFd67947Ef241D8C24C863893800083855Ed6",
|
||||
"tx": "0x4100d9d8cf5661c18bd61d524179fc8df09b8d7c7687a689d6c6e6d40a6f9de0"
|
||||
},
|
||||
{
|
||||
"amount": "10",
|
||||
"user": "0xfb269c54dC4b43Fe98EdacE28Ce0a36A03B375D8",
|
||||
@@ -26221,90 +26088,6 @@
|
||||
"tranche_id": 11,
|
||||
"tx": "0x4b3961d8d870d4259603a8f6ee74c94a7bd525ed2dadc2de6e1a08813a51b9da"
|
||||
},
|
||||
{
|
||||
"amount": "20",
|
||||
"user": "0xaaaaFd67947Ef241D8C24C863893800083855Ed6",
|
||||
"tranche_id": 11,
|
||||
"tx": "0xeaa18356de12943a056aa6b91a8ade1aa10db8c89f23ef31e53282ae773a5d35"
|
||||
},
|
||||
{
|
||||
"amount": "15",
|
||||
"user": "0xaaaaFd67947Ef241D8C24C863893800083855Ed6",
|
||||
"tranche_id": 11,
|
||||
"tx": "0x2c27ae0e62ab334b724c9db3bb396f2bd77339f95c40a8a225ae5384894d3349"
|
||||
},
|
||||
{
|
||||
"amount": "20",
|
||||
"user": "0xaaaaFd67947Ef241D8C24C863893800083855Ed6",
|
||||
"tranche_id": 11,
|
||||
"tx": "0x986a29849a0d1c408b01c2c70ec5a2e1a2aeb3f54069fac37430f94bee4147fa"
|
||||
},
|
||||
{
|
||||
"amount": "20",
|
||||
"user": "0xaaaaFd67947Ef241D8C24C863893800083855Ed6",
|
||||
"tranche_id": 11,
|
||||
"tx": "0xa8c3f59f63559f01f6260f3351e5f91be1c679ef0c43994797db4cdfd1ff946e"
|
||||
},
|
||||
{
|
||||
"amount": "15",
|
||||
"user": "0xaaaaFd67947Ef241D8C24C863893800083855Ed6",
|
||||
"tranche_id": 11,
|
||||
"tx": "0x28f5216d95bb0ff69afbbeecd3920f94288cb767e3c90b92a4d93c1f2ea3e424"
|
||||
},
|
||||
{
|
||||
"amount": "20",
|
||||
"user": "0xaaaaFd67947Ef241D8C24C863893800083855Ed6",
|
||||
"tranche_id": 11,
|
||||
"tx": "0xdf3778608599b3309e33cbba17313263bcacb07d3159be0f1793e544559cc1cf"
|
||||
},
|
||||
{
|
||||
"amount": "20",
|
||||
"user": "0xaaaaFd67947Ef241D8C24C863893800083855Ed6",
|
||||
"tranche_id": 11,
|
||||
"tx": "0xa97f847bcefd46d5ff2485f8fe990b19f5c46594e862c82769303be5845575bd"
|
||||
},
|
||||
{
|
||||
"amount": "20",
|
||||
"user": "0xaaaaFd67947Ef241D8C24C863893800083855Ed6",
|
||||
"tranche_id": 11,
|
||||
"tx": "0xc5e3724ea798bc88eb4fab300c381bbedaa84c3bf8778639147041e1a62d28fe"
|
||||
},
|
||||
{
|
||||
"amount": "20",
|
||||
"user": "0xaaaaFd67947Ef241D8C24C863893800083855Ed6",
|
||||
"tranche_id": 11,
|
||||
"tx": "0x977e6fcbf640e3b330db19ae85515ef9d991f170a8ac8068309254f5ff0141b1"
|
||||
},
|
||||
{
|
||||
"amount": "20",
|
||||
"user": "0xaaaaFd67947Ef241D8C24C863893800083855Ed6",
|
||||
"tranche_id": 11,
|
||||
"tx": "0xc2e8f773c7c9b1014fec441fed237663163f144cebb409476cc6e7297290d602"
|
||||
},
|
||||
{
|
||||
"amount": "20",
|
||||
"user": "0xaaaaFd67947Ef241D8C24C863893800083855Ed6",
|
||||
"tranche_id": 11,
|
||||
"tx": "0xfa1c7ea4e8e5ecfeddf1b6ebb651cd54ea39cb486d1f4acc2b7e7ab792431db4"
|
||||
},
|
||||
{
|
||||
"amount": "20",
|
||||
"user": "0xaaaaFd67947Ef241D8C24C863893800083855Ed6",
|
||||
"tranche_id": 11,
|
||||
"tx": "0x5de72ac4f446d6ca03903247470c38f80f8871686cbeaeffe302e009c4d897ac"
|
||||
},
|
||||
{
|
||||
"amount": "15",
|
||||
"user": "0xaaaaFd67947Ef241D8C24C863893800083855Ed6",
|
||||
"tranche_id": 11,
|
||||
"tx": "0x4a71f43fcf7c8d857620114c2badd2d18ba1da5766be5d4ff03f9fad7da122b0"
|
||||
},
|
||||
{
|
||||
"amount": "20",
|
||||
"user": "0xaaaaFd67947Ef241D8C24C863893800083855Ed6",
|
||||
"tranche_id": 11,
|
||||
"tx": "0x4100d9d8cf5661c18bd61d524179fc8df09b8d7c7687a689d6c6e6d40a6f9de0"
|
||||
},
|
||||
{
|
||||
"amount": "15",
|
||||
"user": "0xaaaaFd67947Ef241D8C24C863893800083855Ed6",
|
||||
@@ -27394,9 +27177,9 @@
|
||||
"tx": "0x26f83e1b57a646b5266f07b00f13f47d3983978d96e921349b24a8b2df0fbc3d"
|
||||
}
|
||||
],
|
||||
"total_tokens": "3945",
|
||||
"total_tokens": "3680",
|
||||
"withdrawn_tokens": "3680",
|
||||
"remaining_tokens": "265"
|
||||
"remaining_tokens": "0"
|
||||
},
|
||||
{
|
||||
"address": "0x9E53F72210479BF46aE7ABF77c48B0d611b3c3dB",
|
||||
@@ -42935,7 +42718,7 @@
|
||||
"tranche_end": "2023-06-05T00:00:00.000Z",
|
||||
"total_added": "3732368.4671",
|
||||
"total_removed": "747515.181114080043393",
|
||||
"locked_amount": "134708.03759234934331725506",
|
||||
"locked_amount": "136742.44156929554179493785",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "1998.95815",
|
||||
@@ -44339,7 +44122,7 @@
|
||||
"tranche_end": "2023-12-05T00:00:00.000Z",
|
||||
"total_added": "15870102.715470999700000001",
|
||||
"total_removed": "890096.86511001003331852",
|
||||
"locked_amount": "5777353.6378606511430622943118666710719114",
|
||||
"locked_amount": "5784567.50374168041959439240960384604676934",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "16249.93",
|
||||
@@ -61301,8 +61084,8 @@
|
||||
"tranche_start": "2022-06-05T00:00:00.000Z",
|
||||
"tranche_end": "2023-06-05T00:00:00.000Z",
|
||||
"total_added": "472355.6199999996",
|
||||
"total_removed": "46179.9572555963416",
|
||||
"locked_amount": "21345.2585804788058432314598274936",
|
||||
"total_removed": "45798.0743154683416",
|
||||
"locked_amount": "21667.621519774832869363582597674",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "3000",
|
||||
@@ -67981,11 +67764,6 @@
|
||||
"user": "0xd2033db9c5370aC76ABD80823b5c5adC097E2FBF",
|
||||
"tx": "0x492598e81b545c857d7a1d5a10b291a595c4d76c85af5a282a96948e7702c5da"
|
||||
},
|
||||
{
|
||||
"amount": "381.882940128",
|
||||
"user": "0x78805Dd0a19ac89AF3CC334C79330e6Ad9cDaf0c",
|
||||
"tx": "0xa6658830025cac3d4376ed5ad5191623ee9d1572eb5eb95f26e529aa2e2c4ee9"
|
||||
},
|
||||
{
|
||||
"amount": "182.662252664",
|
||||
"user": "0xb1169C6daAc76bAcaf0D8f87641Fc38fbabe569F",
|
||||
@@ -89752,17 +89530,10 @@
|
||||
"tx": "0xb59405747c8088945a412703637a7b422f3639439ec2ee15e180c0a2a0d71ee4"
|
||||
}
|
||||
],
|
||||
"withdrawals": [
|
||||
{
|
||||
"amount": "381.882940128",
|
||||
"user": "0x78805Dd0a19ac89AF3CC334C79330e6Ad9cDaf0c",
|
||||
"tranche_id": 5,
|
||||
"tx": "0xa6658830025cac3d4376ed5ad5191623ee9d1572eb5eb95f26e529aa2e2c4ee9"
|
||||
}
|
||||
],
|
||||
"withdrawals": [],
|
||||
"total_tokens": "400",
|
||||
"withdrawn_tokens": "381.882940128",
|
||||
"remaining_tokens": "18.117059872"
|
||||
"withdrawn_tokens": "0",
|
||||
"remaining_tokens": "400"
|
||||
},
|
||||
{
|
||||
"address": "0xC17d05223BB7BDE1Aa98d5f4196e44eF02e059b3",
|
||||
|
||||
@@ -82,12 +82,20 @@ const generateProposal = (code: string): ProposalListFieldsFragment => ({
|
||||
__typename: 'DataSourceDefinition',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceDefinitionInternal',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceSpecConfigurationTime',
|
||||
conditions: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
dataSourceSpecForTradingTermination: {
|
||||
__typename: 'DataSourceDefinition',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceDefinitionInternal',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceSpecConfigurationTime',
|
||||
conditions: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -16,6 +16,16 @@ fragment DataSource on DataSourceDefinition {
|
||||
}
|
||||
}
|
||||
}
|
||||
... on DataSourceDefinitionInternal {
|
||||
sourceType {
|
||||
... on DataSourceSpecConfigurationTime {
|
||||
conditions {
|
||||
operator
|
||||
value
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,14 +3,14 @@ import * as Types from '@vegaprotocol/types';
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type DataSourceFragment = { __typename?: 'DataSourceDefinition', sourceType: { __typename?: 'DataSourceDefinitionExternal', sourceType: { __typename?: 'DataSourceSpecConfiguration', signers?: Array<{ __typename?: 'Signer', signer: { __typename?: 'ETHAddress', address?: string | null } | { __typename?: 'PubKey', key?: string | null } }> | null } } | { __typename?: 'DataSourceDefinitionInternal' } };
|
||||
export type DataSourceFragment = { __typename?: 'DataSourceDefinition', sourceType: { __typename?: 'DataSourceDefinitionExternal', sourceType: { __typename?: 'DataSourceSpecConfiguration', signers?: Array<{ __typename?: 'Signer', signer: { __typename?: 'ETHAddress', address?: string | null } | { __typename?: 'PubKey', key?: string | null } }> | null } } | { __typename?: 'DataSourceDefinitionInternal', sourceType: { __typename?: 'DataSourceSpecConfigurationTime', conditions: Array<{ __typename?: 'Condition', operator: Types.ConditionOperator, value?: string | null } | null> } } };
|
||||
|
||||
export type MarketInfoQueryVariables = Types.Exact<{
|
||||
marketId: Types.Scalars['ID'];
|
||||
}>;
|
||||
|
||||
|
||||
export type MarketInfoQuery = { __typename?: 'Query', market?: { __typename?: 'Market', id: string, decimalPlaces: number, positionDecimalPlaces: number, state: Types.MarketState, tradingMode: Types.MarketTradingMode, lpPriceRange: string, proposal?: { __typename?: 'Proposal', id?: string | null, rationale: { __typename?: 'ProposalRationale', title: string, description: string } } | null, marketTimestamps: { __typename?: 'MarketTimestamps', open: any, close: any }, openingAuction: { __typename?: 'AuctionDuration', durationSecs: number, volume: number }, accountsConnection?: { __typename?: 'AccountsConnection', edges?: Array<{ __typename?: 'AccountEdge', node: { __typename?: 'AccountBalance', type: Types.AccountType, balance: string, asset: { __typename?: 'Asset', id: string } } } | null> | null } | null, fees: { __typename?: 'Fees', factors: { __typename?: 'FeeFactors', makerFee: string, infrastructureFee: string, liquidityFee: string } }, priceMonitoringSettings: { __typename?: 'PriceMonitoringSettings', parameters?: { __typename?: 'PriceMonitoringParameters', triggers?: Array<{ __typename?: 'PriceMonitoringTrigger', horizonSecs: number, probability: number, auctionExtensionSecs: number }> | null } | null }, riskFactors?: { __typename?: 'RiskFactor', market: string, short: string, long: string } | null, liquidityMonitoringParameters: { __typename?: 'LiquidityMonitoringParameters', triggeringRatio: string, targetStakeParameters: { __typename?: 'TargetStakeParameters', timeWindow: number, scalingFactor: number } }, tradableInstrument: { __typename?: 'TradableInstrument', instrument: { __typename?: 'Instrument', id: string, name: string, code: string, metadata: { __typename?: 'InstrumentMetadata', tags?: Array<string> | null }, product: { __typename?: 'Future', quoteName: string, settlementAsset: { __typename?: 'Asset', id: string, symbol: string, name: string, decimals: number }, dataSourceSpecForSettlementData: { __typename?: 'DataSourceSpec', id: string, data: { __typename?: 'DataSourceDefinition', sourceType: { __typename?: 'DataSourceDefinitionExternal', sourceType: { __typename?: 'DataSourceSpecConfiguration', signers?: Array<{ __typename?: 'Signer', signer: { __typename?: 'ETHAddress', address?: string | null } | { __typename?: 'PubKey', key?: string | null } }> | null } } | { __typename?: 'DataSourceDefinitionInternal' } } }, dataSourceSpecForTradingTermination: { __typename?: 'DataSourceSpec', id: string, data: { __typename?: 'DataSourceDefinition', sourceType: { __typename?: 'DataSourceDefinitionExternal', sourceType: { __typename?: 'DataSourceSpecConfiguration', signers?: Array<{ __typename?: 'Signer', signer: { __typename?: 'ETHAddress', address?: string | null } | { __typename?: 'PubKey', key?: string | null } }> | null } } | { __typename?: 'DataSourceDefinitionInternal' } } }, dataSourceSpecBinding: { __typename?: 'DataSourceSpecToFutureBinding', settlementDataProperty: string, tradingTerminationProperty: string } } }, riskModel: { __typename?: 'LogNormalRiskModel', tau: number, riskAversionParameter: number, params: { __typename?: 'LogNormalModelParams', r: number, sigma: number, mu: number } } | { __typename?: 'SimpleRiskModel', params: { __typename?: 'SimpleRiskModelParams', factorLong: number, factorShort: number } }, marginCalculator?: { __typename?: 'MarginCalculator', scalingFactors: { __typename?: 'ScalingFactors', searchLevel: number, initialMargin: number, collateralRelease: number } } | null } } | null };
|
||||
export type MarketInfoQuery = { __typename?: 'Query', market?: { __typename?: 'Market', id: string, decimalPlaces: number, positionDecimalPlaces: number, state: Types.MarketState, tradingMode: Types.MarketTradingMode, lpPriceRange: string, proposal?: { __typename?: 'Proposal', id?: string | null, rationale: { __typename?: 'ProposalRationale', title: string, description: string } } | null, marketTimestamps: { __typename?: 'MarketTimestamps', open: any, close: any }, openingAuction: { __typename?: 'AuctionDuration', durationSecs: number, volume: number }, accountsConnection?: { __typename?: 'AccountsConnection', edges?: Array<{ __typename?: 'AccountEdge', node: { __typename?: 'AccountBalance', type: Types.AccountType, balance: string, asset: { __typename?: 'Asset', id: string } } } | null> | null } | null, fees: { __typename?: 'Fees', factors: { __typename?: 'FeeFactors', makerFee: string, infrastructureFee: string, liquidityFee: string } }, priceMonitoringSettings: { __typename?: 'PriceMonitoringSettings', parameters?: { __typename?: 'PriceMonitoringParameters', triggers?: Array<{ __typename?: 'PriceMonitoringTrigger', horizonSecs: number, probability: number, auctionExtensionSecs: number }> | null } | null }, riskFactors?: { __typename?: 'RiskFactor', market: string, short: string, long: string } | null, liquidityMonitoringParameters: { __typename?: 'LiquidityMonitoringParameters', triggeringRatio: string, targetStakeParameters: { __typename?: 'TargetStakeParameters', timeWindow: number, scalingFactor: number } }, tradableInstrument: { __typename?: 'TradableInstrument', instrument: { __typename?: 'Instrument', id: string, name: string, code: string, metadata: { __typename?: 'InstrumentMetadata', tags?: Array<string> | null }, product: { __typename?: 'Future', quoteName: string, settlementAsset: { __typename?: 'Asset', id: string, symbol: string, name: string, decimals: number }, dataSourceSpecForSettlementData: { __typename?: 'DataSourceSpec', id: string, data: { __typename?: 'DataSourceDefinition', sourceType: { __typename?: 'DataSourceDefinitionExternal', sourceType: { __typename?: 'DataSourceSpecConfiguration', signers?: Array<{ __typename?: 'Signer', signer: { __typename?: 'ETHAddress', address?: string | null } | { __typename?: 'PubKey', key?: string | null } }> | null } } | { __typename?: 'DataSourceDefinitionInternal', sourceType: { __typename?: 'DataSourceSpecConfigurationTime', conditions: Array<{ __typename?: 'Condition', operator: Types.ConditionOperator, value?: string | null } | null> } } } }, dataSourceSpecForTradingTermination: { __typename?: 'DataSourceSpec', id: string, data: { __typename?: 'DataSourceDefinition', sourceType: { __typename?: 'DataSourceDefinitionExternal', sourceType: { __typename?: 'DataSourceSpecConfiguration', signers?: Array<{ __typename?: 'Signer', signer: { __typename?: 'ETHAddress', address?: string | null } | { __typename?: 'PubKey', key?: string | null } }> | null } } | { __typename?: 'DataSourceDefinitionInternal', sourceType: { __typename?: 'DataSourceSpecConfigurationTime', conditions: Array<{ __typename?: 'Condition', operator: Types.ConditionOperator, value?: string | null } | null> } } } }, dataSourceSpecBinding: { __typename?: 'DataSourceSpecToFutureBinding', settlementDataProperty: string, tradingTerminationProperty: string } } }, riskModel: { __typename?: 'LogNormalRiskModel', tau: number, riskAversionParameter: number, params: { __typename?: 'LogNormalModelParams', r: number, sigma: number, mu: number } } | { __typename?: 'SimpleRiskModel', params: { __typename?: 'SimpleRiskModelParams', factorLong: number, factorShort: number } }, marginCalculator?: { __typename?: 'MarginCalculator', scalingFactors: { __typename?: 'ScalingFactors', searchLevel: number, initialMargin: number, collateralRelease: number } } | null } } | null };
|
||||
|
||||
export const DataSourceFragmentDoc = gql`
|
||||
fragment DataSource on DataSourceDefinition {
|
||||
@@ -31,6 +31,16 @@ export const DataSourceFragmentDoc = gql`
|
||||
}
|
||||
}
|
||||
}
|
||||
... on DataSourceDefinitionInternal {
|
||||
sourceType {
|
||||
... on DataSourceSpecConfigurationTime {
|
||||
conditions {
|
||||
operator
|
||||
value
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -105,10 +105,12 @@ export const MarketInfoAccordion = ({
|
||||
content: <InsurancePoolInfoPanel market={market} account={a} />,
|
||||
})),
|
||||
];
|
||||
const settlementData = market.tradableInstrument.instrument.product
|
||||
.dataSourceSpecForSettlementData.data as DataSourceDefinition;
|
||||
const terminationData = market.tradableInstrument.instrument.product
|
||||
.dataSourceSpecForTradingTermination.data as DataSourceDefinition;
|
||||
const settlementData =
|
||||
market.tradableInstrument.instrument.product.dataSourceSpecForSettlementData
|
||||
.data;
|
||||
const terminationData =
|
||||
market.tradableInstrument.instrument.product
|
||||
.dataSourceSpecForTradingTermination.data;
|
||||
|
||||
const getSigners = (data: DataSourceDefinition) => {
|
||||
if (data.sourceType.__typename === 'DataSourceDefinitionExternal') {
|
||||
|
||||
@@ -462,17 +462,15 @@ export const OracleInfoPanel = ({
|
||||
? product.dataSourceSpecForSettlementData.id
|
||||
: product.dataSourceSpecForTradingTermination.id;
|
||||
|
||||
const dataSourceSpec = (
|
||||
type === 'settlementData'
|
||||
? product.dataSourceSpecForSettlementData.data
|
||||
: product.dataSourceSpecForTradingTermination.data
|
||||
) as DataSourceDefinition;
|
||||
|
||||
return (
|
||||
<div className="flex flex-col gap-4">
|
||||
<DataSourceProof
|
||||
data-testid="oracle-proof-links"
|
||||
data={dataSourceSpec}
|
||||
data={
|
||||
type === 'settlementData'
|
||||
? product.dataSourceSpecForSettlementData.data
|
||||
: product.dataSourceSpecForTradingTermination.data
|
||||
}
|
||||
providers={data}
|
||||
type={type}
|
||||
dataSourceSpecId={dataSourceSpecId}
|
||||
@@ -529,27 +527,19 @@ export const DataSourceProof = ({
|
||||
}
|
||||
|
||||
if (data.sourceType.__typename === 'DataSourceDefinitionInternal') {
|
||||
if (data.sourceType.sourceType) {
|
||||
return (
|
||||
<div>
|
||||
<h3>{t('Internal conditions')}</h3>
|
||||
{data.sourceType.sourceType?.conditions.map((condition, i) => {
|
||||
if (!condition) return null;
|
||||
return (
|
||||
<p key={i}>
|
||||
{ConditionOperatorMapping[condition.operator]} {condition.value}
|
||||
</p>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
);
|
||||
} else {
|
||||
return (
|
||||
<div>
|
||||
{t('No oracle spec for trading termination. Internal timestamp used')}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
return (
|
||||
<div>
|
||||
<h3>{t('Internal conditions')}</h3>
|
||||
{data.sourceType.sourceType.conditions.map((condition, i) => {
|
||||
if (!condition) return null;
|
||||
return (
|
||||
<p key={i}>
|
||||
{ConditionOperatorMapping[condition.operator]} {condition.value}
|
||||
</p>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return <div>{t('Invalid data source')}</div>;
|
||||
|
||||
@@ -37,7 +37,7 @@ export const useColumnDefs = () => {
|
||||
colId: 'market',
|
||||
headerName: t('Market'),
|
||||
field: 'terms.change.instrument.code',
|
||||
minWidth: 150,
|
||||
width: 150,
|
||||
cellStyle: { lineHeight: '14px' },
|
||||
cellRenderer: ({
|
||||
data,
|
||||
|
||||
@@ -13,6 +13,16 @@ fragment NewMarketFields on NewMarket {
|
||||
quoteName
|
||||
dataSourceSpecForSettlementData {
|
||||
sourceType {
|
||||
... on DataSourceDefinitionInternal {
|
||||
sourceType {
|
||||
... on DataSourceSpecConfigurationTime {
|
||||
conditions {
|
||||
operator
|
||||
value
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
... on DataSourceDefinitionExternal {
|
||||
sourceType {
|
||||
... on DataSourceSpecConfiguration {
|
||||
@@ -43,6 +53,16 @@ fragment NewMarketFields on NewMarket {
|
||||
}
|
||||
dataSourceSpecForTradingTermination {
|
||||
sourceType {
|
||||
... on DataSourceDefinitionInternal {
|
||||
sourceType {
|
||||
... on DataSourceSpecConfigurationTime {
|
||||
conditions {
|
||||
operator
|
||||
value
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
... on DataSourceDefinitionExternal {
|
||||
sourceType {
|
||||
... on DataSourceSpecConfiguration {
|
||||
@@ -125,6 +145,16 @@ fragment UpdateMarketFields on UpdateMarket {
|
||||
quoteName
|
||||
dataSourceSpecForSettlementData {
|
||||
sourceType {
|
||||
... on DataSourceDefinitionInternal {
|
||||
sourceType {
|
||||
... on DataSourceSpecConfigurationTime {
|
||||
conditions {
|
||||
operator
|
||||
value
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
... on DataSourceDefinitionExternal {
|
||||
sourceType {
|
||||
... on DataSourceSpecConfiguration {
|
||||
@@ -155,6 +185,16 @@ fragment UpdateMarketFields on UpdateMarket {
|
||||
}
|
||||
dataSourceSpecForTradingTermination {
|
||||
sourceType {
|
||||
... on DataSourceDefinitionInternal {
|
||||
sourceType {
|
||||
... on DataSourceSpecConfigurationTime {
|
||||
conditions {
|
||||
operator
|
||||
value
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
... on DataSourceDefinitionExternal {
|
||||
sourceType {
|
||||
... on DataSourceSpecConfiguration {
|
||||
|
||||
+44
-4
File diff suppressed because one or more lines are too long
@@ -76,12 +76,20 @@ export const marketUpdateProposal: ProposalListFieldsFragment = {
|
||||
__typename: 'DataSourceDefinition',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceDefinitionInternal',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceSpecConfigurationTime',
|
||||
conditions: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
dataSourceSpecForTradingTermination: {
|
||||
__typename: 'DataSourceDefinition',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceDefinitionInternal',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceSpecConfigurationTime',
|
||||
conditions: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -177,12 +185,20 @@ const proposalListFields: ProposalListFieldsFragment[] = [
|
||||
__typename: 'DataSourceDefinition',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceDefinitionInternal',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceSpecConfigurationTime',
|
||||
conditions: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
dataSourceSpecForTradingTermination: {
|
||||
__typename: 'DataSourceDefinition',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceDefinitionInternal',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceSpecConfigurationTime',
|
||||
conditions: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
__typename: 'FutureProduct',
|
||||
@@ -267,12 +283,20 @@ const proposalListFields: ProposalListFieldsFragment[] = [
|
||||
__typename: 'DataSourceDefinition',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceDefinitionInternal',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceSpecConfigurationTime',
|
||||
conditions: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
dataSourceSpecForTradingTermination: {
|
||||
__typename: 'DataSourceDefinition',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceDefinitionInternal',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceSpecConfigurationTime',
|
||||
conditions: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
__typename: 'FutureProduct',
|
||||
@@ -357,12 +381,20 @@ const proposalListFields: ProposalListFieldsFragment[] = [
|
||||
__typename: 'DataSourceDefinition',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceDefinitionInternal',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceSpecConfigurationTime',
|
||||
conditions: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
dataSourceSpecForTradingTermination: {
|
||||
__typename: 'DataSourceDefinition',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceDefinitionInternal',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceSpecConfigurationTime',
|
||||
conditions: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
__typename: 'FutureProduct',
|
||||
@@ -447,12 +479,20 @@ const proposalListFields: ProposalListFieldsFragment[] = [
|
||||
__typename: 'DataSourceDefinition',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceDefinitionInternal',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceSpecConfigurationTime',
|
||||
conditions: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
dataSourceSpecForTradingTermination: {
|
||||
__typename: 'DataSourceDefinition',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceDefinitionInternal',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceSpecConfigurationTime',
|
||||
conditions: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
__typename: 'FutureProduct',
|
||||
@@ -537,12 +577,20 @@ const proposalListFields: ProposalListFieldsFragment[] = [
|
||||
__typename: 'DataSourceDefinition',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceDefinitionInternal',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceSpecConfigurationTime',
|
||||
conditions: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
dataSourceSpecForTradingTermination: {
|
||||
__typename: 'DataSourceDefinition',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceDefinitionInternal',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceSpecConfigurationTime',
|
||||
conditions: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
__typename: 'FutureProduct',
|
||||
@@ -627,12 +675,20 @@ const proposalListFields: ProposalListFieldsFragment[] = [
|
||||
__typename: 'DataSourceDefinition',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceDefinitionInternal',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceSpecConfigurationTime',
|
||||
conditions: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
dataSourceSpecForTradingTermination: {
|
||||
__typename: 'DataSourceDefinition',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceDefinitionInternal',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceSpecConfigurationTime',
|
||||
conditions: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
__typename: 'FutureProduct',
|
||||
@@ -717,12 +773,20 @@ const proposalListFields: ProposalListFieldsFragment[] = [
|
||||
__typename: 'DataSourceDefinition',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceDefinitionInternal',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceSpecConfigurationTime',
|
||||
conditions: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
dataSourceSpecForTradingTermination: {
|
||||
__typename: 'DataSourceDefinition',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceDefinitionInternal',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceSpecConfigurationTime',
|
||||
conditions: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
__typename: 'FutureProduct',
|
||||
@@ -807,12 +871,20 @@ const proposalListFields: ProposalListFieldsFragment[] = [
|
||||
__typename: 'DataSourceDefinition',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceDefinitionInternal',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceSpecConfigurationTime',
|
||||
conditions: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
dataSourceSpecForTradingTermination: {
|
||||
__typename: 'DataSourceDefinition',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceDefinitionInternal',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceSpecConfigurationTime',
|
||||
conditions: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
__typename: 'FutureProduct',
|
||||
@@ -897,12 +969,20 @@ const proposalListFields: ProposalListFieldsFragment[] = [
|
||||
__typename: 'DataSourceDefinition',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceDefinitionInternal',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceSpecConfigurationTime',
|
||||
conditions: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
dataSourceSpecForTradingTermination: {
|
||||
__typename: 'DataSourceDefinition',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceDefinitionInternal',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceSpecConfigurationTime',
|
||||
conditions: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
__typename: 'FutureProduct',
|
||||
@@ -987,12 +1067,20 @@ const proposalListFields: ProposalListFieldsFragment[] = [
|
||||
__typename: 'DataSourceDefinition',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceDefinitionInternal',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceSpecConfigurationTime',
|
||||
conditions: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
dataSourceSpecForTradingTermination: {
|
||||
__typename: 'DataSourceDefinition',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceDefinitionInternal',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceSpecConfigurationTime',
|
||||
conditions: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
__typename: 'FutureProduct',
|
||||
@@ -1077,12 +1165,20 @@ const proposalListFields: ProposalListFieldsFragment[] = [
|
||||
__typename: 'DataSourceDefinition',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceDefinitionInternal',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceSpecConfigurationTime',
|
||||
conditions: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
dataSourceSpecForTradingTermination: {
|
||||
__typename: 'DataSourceDefinition',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceDefinitionInternal',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceSpecConfigurationTime',
|
||||
conditions: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
__typename: 'FutureProduct',
|
||||
@@ -1167,12 +1263,20 @@ const proposalListFields: ProposalListFieldsFragment[] = [
|
||||
__typename: 'DataSourceDefinition',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceDefinitionInternal',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceSpecConfigurationTime',
|
||||
conditions: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
dataSourceSpecForTradingTermination: {
|
||||
__typename: 'DataSourceDefinition',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceDefinitionInternal',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceSpecConfigurationTime',
|
||||
conditions: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
__typename: 'FutureProduct',
|
||||
@@ -1257,12 +1361,20 @@ const proposalListFields: ProposalListFieldsFragment[] = [
|
||||
__typename: 'DataSourceDefinition',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceDefinitionInternal',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceSpecConfigurationTime',
|
||||
conditions: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
dataSourceSpecForTradingTermination: {
|
||||
__typename: 'DataSourceDefinition',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceDefinitionInternal',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceSpecConfigurationTime',
|
||||
conditions: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
__typename: 'FutureProduct',
|
||||
|
||||
@@ -133,11 +133,19 @@ const generateUpdateMarketProposal = (
|
||||
dataSourceSpecForSettlementData: {
|
||||
sourceType: {
|
||||
__typename: 'DataSourceDefinitionInternal',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceSpecConfigurationTime',
|
||||
conditions: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
dataSourceSpecForTradingTermination: {
|
||||
sourceType: {
|
||||
__typename: 'DataSourceDefinitionInternal',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceSpecConfigurationTime',
|
||||
conditions: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
__typename:
|
||||
|
||||
Reference in New Issue
Block a user