Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0530019633 | ||
|
|
22a43249ea | ||
|
|
b40ee0caf5 | ||
|
|
95aca70434 | ||
|
|
5e13266250 |
@@ -20,12 +20,10 @@ import isEqual from 'lodash/isEqual';
|
||||
export const MarketDetails = ({ market }: { market: MarketInfoWithData }) => {
|
||||
if (!market) return null;
|
||||
|
||||
const settlementData =
|
||||
market.tradableInstrument.instrument.product.dataSourceSpecForSettlementData
|
||||
.data;
|
||||
const terminationData =
|
||||
market.tradableInstrument.instrument.product
|
||||
.dataSourceSpecForTradingTermination.data;
|
||||
const settlementData = market.tradableInstrument.instrument.product
|
||||
.dataSourceSpecForSettlementData.data as DataSourceDefinition;
|
||||
const terminationData = market.tradableInstrument.instrument.product
|
||||
.dataSourceSpecForTradingTermination.data as DataSourceDefinition;
|
||||
|
||||
const getSigners = (data: DataSourceDefinition) => {
|
||||
if (data.sourceType.__typename === 'DataSourceDefinitionExternal') {
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
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,11 +28,16 @@ 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 !!['newAsset', 'updateAsset'].filter((requiredIfExists) =>
|
||||
has(proposal.terms, requiredIfExists)
|
||||
|
||||
return (
|
||||
proposalsThatRequireBundles.filter((requiredIfExists) =>
|
||||
has(proposal.terms, requiredIfExists)
|
||||
).length > 0
|
||||
);
|
||||
}
|
||||
|
||||
@@ -81,6 +86,7 @@ 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(
|
||||
'Unknown proposal'
|
||||
'New asset proposal'
|
||||
);
|
||||
expect(screen.getByTestId('proposal-type')).toHaveTextContent('New asset');
|
||||
expect(screen.getByTestId('proposal-details')).toHaveTextContent(
|
||||
|
||||
+13
-2
@@ -21,6 +21,7 @@ export const ProposalHeader = ({
|
||||
|
||||
let details: ReactNode;
|
||||
let proposalType = '';
|
||||
let fallbackTitle = '';
|
||||
|
||||
const title = proposal?.rationale.title.trim();
|
||||
|
||||
@@ -29,6 +30,7 @@ export const ProposalHeader = ({
|
||||
switch (change?.__typename) {
|
||||
case 'NewMarket': {
|
||||
proposalType = 'NewMarket';
|
||||
fallbackTitle = t('NewMarketProposal');
|
||||
details = (
|
||||
<>
|
||||
<span>
|
||||
@@ -50,6 +52,7 @@ export const ProposalHeader = ({
|
||||
}
|
||||
case 'UpdateMarket': {
|
||||
proposalType = 'UpdateMarket';
|
||||
fallbackTitle = t('UpdateMarketProposal');
|
||||
details = (
|
||||
<>
|
||||
<span>{t('Market change')}:</span>{' '}
|
||||
@@ -60,6 +63,7 @@ export const ProposalHeader = ({
|
||||
}
|
||||
case 'NewAsset': {
|
||||
proposalType = 'NewAsset';
|
||||
fallbackTitle = t('NewAssetProposal');
|
||||
details = (
|
||||
<>
|
||||
<span>{t('Symbol')}:</span> <Lozenge>{change.symbol}.</Lozenge>{' '}
|
||||
@@ -81,6 +85,7 @@ export const ProposalHeader = ({
|
||||
}
|
||||
case 'UpdateNetworkParameter': {
|
||||
proposalType = 'NetworkParameter';
|
||||
fallbackTitle = t('NetworkParameterProposal');
|
||||
details = (
|
||||
<>
|
||||
<span>{t('Change')}:</span>{' '}
|
||||
@@ -95,11 +100,13 @@ 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>{' '}
|
||||
@@ -115,10 +122,14 @@ export const ProposalHeader = ({
|
||||
<div data-testid="proposal-title">
|
||||
{isListItem ? (
|
||||
<header>
|
||||
<SubHeading title={titleContent || t('Unknown proposal')} />
|
||||
<SubHeading
|
||||
title={titleContent || fallbackTitle || t('Unknown proposal')}
|
||||
/>
|
||||
</header>
|
||||
) : (
|
||||
<Heading title={titleContent || t('Unknown proposal')} />
|
||||
<Heading
|
||||
title={titleContent || fallbackTitle || t('Unknown proposal')}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
|
||||
|
||||
@@ -49,6 +49,7 @@ export const ProposeFreeform = () => {
|
||||
formState: { errors },
|
||||
setValue,
|
||||
watch,
|
||||
trigger,
|
||||
} = useForm<FreeformProposalFormFields>();
|
||||
const { finalizedProposal, submit, Dialog } = useProposalSubmit();
|
||||
|
||||
@@ -85,7 +86,13 @@ export const ProposeFreeform = () => {
|
||||
await submit(assembleProposal(fields));
|
||||
};
|
||||
|
||||
const viewJson = () => {
|
||||
const viewJson = async () => {
|
||||
const isValid = await trigger();
|
||||
|
||||
if (!isValid) {
|
||||
return;
|
||||
}
|
||||
|
||||
const formData = watch();
|
||||
downloadJson(
|
||||
JSON.stringify(assembleProposal(formData)),
|
||||
|
||||
+8
-1
@@ -89,6 +89,7 @@ export const ProposeNetworkParameter = () => {
|
||||
formState: { errors },
|
||||
setValue,
|
||||
watch,
|
||||
trigger,
|
||||
} = useForm<NetworkParameterProposalFormFields>();
|
||||
const { finalizedProposal, submit, Dialog } = useProposalSubmit();
|
||||
|
||||
@@ -148,7 +149,13 @@ export const ProposeNetworkParameter = () => {
|
||||
await submit(assembleProposal(fields));
|
||||
};
|
||||
|
||||
const viewJson = () => {
|
||||
const viewJson = async () => {
|
||||
const isValid = await trigger();
|
||||
|
||||
if (!isValid) {
|
||||
return;
|
||||
}
|
||||
|
||||
const formData = watch();
|
||||
downloadJson(
|
||||
JSON.stringify(assembleProposal(formData)),
|
||||
|
||||
@@ -61,6 +61,7 @@ export const ProposeNewAsset = () => {
|
||||
formState: { errors },
|
||||
setValue,
|
||||
watch,
|
||||
trigger,
|
||||
} = useForm<NewAssetProposalFormFields>();
|
||||
const { finalizedProposal, submit, Dialog } = useProposalSubmit();
|
||||
|
||||
@@ -117,7 +118,13 @@ export const ProposeNewAsset = () => {
|
||||
await submit(assembleProposal(fields));
|
||||
};
|
||||
|
||||
const viewJson = () => {
|
||||
const viewJson = async () => {
|
||||
const isValid = await trigger();
|
||||
|
||||
if (!isValid) {
|
||||
return;
|
||||
}
|
||||
|
||||
const formData = watch();
|
||||
downloadJson(
|
||||
JSON.stringify(assembleProposal(formData)),
|
||||
|
||||
@@ -59,6 +59,7 @@ export const ProposeNewMarket = () => {
|
||||
formState: { errors },
|
||||
setValue,
|
||||
watch,
|
||||
trigger,
|
||||
} = useForm<NewMarketProposalFormFields>();
|
||||
const { finalizedProposal, submit, Dialog } = useProposalSubmit();
|
||||
|
||||
@@ -107,7 +108,13 @@ export const ProposeNewMarket = () => {
|
||||
await submit(assembleProposal(fields));
|
||||
};
|
||||
|
||||
const viewJson = () => {
|
||||
const viewJson = async () => {
|
||||
const isValid = await trigger();
|
||||
|
||||
if (!isValid) {
|
||||
return;
|
||||
}
|
||||
|
||||
const formData = watch();
|
||||
downloadJson(
|
||||
JSON.stringify(assembleProposal(formData)),
|
||||
|
||||
@@ -59,6 +59,7 @@ export const ProposeUpdateAsset = () => {
|
||||
formState: { errors },
|
||||
setValue,
|
||||
watch,
|
||||
trigger,
|
||||
} = useForm<UpdateAssetProposalFormFields>();
|
||||
const { finalizedProposal, submit, Dialog } = useProposalSubmit();
|
||||
|
||||
@@ -107,7 +108,13 @@ export const ProposeUpdateAsset = () => {
|
||||
await submit(assembleProposal(fields));
|
||||
};
|
||||
|
||||
const viewJson = () => {
|
||||
const viewJson = async () => {
|
||||
const isValid = await trigger();
|
||||
|
||||
if (!isValid) {
|
||||
return;
|
||||
}
|
||||
|
||||
const formData = watch();
|
||||
downloadJson(
|
||||
JSON.stringify(assembleProposal(formData)),
|
||||
|
||||
+8
-1
@@ -106,6 +106,7 @@ export const ProposeUpdateMarket = () => {
|
||||
formState: { errors },
|
||||
setValue,
|
||||
watch,
|
||||
trigger,
|
||||
} = useForm<UpdateMarketProposalFormFields>();
|
||||
const { finalizedProposal, submit, Dialog } = useProposalSubmit();
|
||||
|
||||
@@ -157,7 +158,13 @@ export const ProposeUpdateMarket = () => {
|
||||
await submit(assembleProposal(fields));
|
||||
};
|
||||
|
||||
const viewJson = () => {
|
||||
const viewJson = async () => {
|
||||
const isValid = await trigger();
|
||||
|
||||
if (!isValid) {
|
||||
return;
|
||||
}
|
||||
|
||||
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": "21906",
|
||||
"total_added": "22171",
|
||||
"total_removed": "215.8495183664",
|
||||
"locked_amount": "16071.2783400537630666",
|
||||
"locked_amount": "16087.5421553912796572",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "11447",
|
||||
@@ -134,6 +134,16 @@
|
||||
"amount": "27",
|
||||
"user": "0x697cEF6741F519621fE14c72041e4B8B1f7e2c8A",
|
||||
"tx": "0x219dd6f5a742fc8c99add1df269ea16bac53db20d2b1f11ff75e2cd557904065"
|
||||
},
|
||||
{
|
||||
"amount": "30",
|
||||
"user": "0x90Cf7B9958C3BbBCddAb52Ecc408535D4f3C4241",
|
||||
"tx": "0x13eb5324590141c3cbdf8b22237c0290f609021321ec0584d94249bac2401c74"
|
||||
},
|
||||
{
|
||||
"amount": "235",
|
||||
"user": "0x2f1C71D4134B4C154BF946aeb9A94cc2Da1efe59",
|
||||
"tx": "0x4b9137c5b07d4a07e864dfbe3810ad7b78f276e1017c9ccc8d99ced6fea3e9ae"
|
||||
}
|
||||
],
|
||||
"withdrawals": [
|
||||
@@ -411,6 +421,36 @@
|
||||
"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"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -452,8 +492,8 @@
|
||||
"tranche_start": "2023-04-20T00:00:00.000Z",
|
||||
"tranche_end": "2023-05-20T00:00:00.000Z",
|
||||
"total_added": "21431.125",
|
||||
"total_removed": "4874.82783147815125",
|
||||
"locked_amount": "530.8254846161266649175",
|
||||
"total_removed": "5063.63195980021375",
|
||||
"locked_amount": "352.877694396219380540625",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "897",
|
||||
@@ -777,6 +817,16 @@
|
||||
"user": "0x9E53F72210479BF46aE7ABF77c48B0d611b3c3dB",
|
||||
"tx": "0xa6fd18e4158f18bdd8bf5294e69847a229e9b6dacd1772f94e95f0c56285729d"
|
||||
},
|
||||
{
|
||||
"amount": "92.7240241607625",
|
||||
"user": "0xdC483901425B2EA6494EaE01ADB6565936E25124",
|
||||
"tx": "0x0fb773aaa35072e4a5129d4815ad5f1f0808fb4a41c9ca119bf8c4caa1b64bf8"
|
||||
},
|
||||
{
|
||||
"amount": "96.0801041613",
|
||||
"user": "0x1447Efc62d5077d7AbB20492dF831Dd6c9Eb1756",
|
||||
"tx": "0xbc77fce0ebe70c829a12092a26249b1db5456186ba6b11c874bd59e8aca77b03"
|
||||
},
|
||||
{
|
||||
"amount": "202.093666077975",
|
||||
"user": "0x1447Efc62d5077d7AbB20492dF831Dd6c9Eb1756",
|
||||
@@ -1081,6 +1131,12 @@
|
||||
"tranche_id": 56,
|
||||
"tx": "0x682c6453a6c681312a81e15f244e4885c0ceaab35c7dc041c02d536ff42ca62f"
|
||||
},
|
||||
{
|
||||
"amount": "96.0801041613",
|
||||
"user": "0x1447Efc62d5077d7AbB20492dF831Dd6c9Eb1756",
|
||||
"tranche_id": 56,
|
||||
"tx": "0xbc77fce0ebe70c829a12092a26249b1db5456186ba6b11c874bd59e8aca77b03"
|
||||
},
|
||||
{
|
||||
"amount": "202.093666077975",
|
||||
"user": "0x1447Efc62d5077d7AbB20492dF831Dd6c9Eb1756",
|
||||
@@ -1107,8 +1163,8 @@
|
||||
}
|
||||
],
|
||||
"total_tokens": "1207.5",
|
||||
"withdrawn_tokens": "1086.548284142475",
|
||||
"remaining_tokens": "120.951715857525"
|
||||
"withdrawn_tokens": "1182.628388303775",
|
||||
"remaining_tokens": "24.871611696225"
|
||||
},
|
||||
{
|
||||
"address": "0x33Ce1D9E53AFb7367E34749517C086405a651a95",
|
||||
@@ -1360,10 +1416,17 @@
|
||||
"tx": "0x14ca69443a14b0f35538856a4fdda6a2b287d7ac6e7c4e600fb797c4c6d44098"
|
||||
}
|
||||
],
|
||||
"withdrawals": [],
|
||||
"withdrawals": [
|
||||
{
|
||||
"amount": "92.7240241607625",
|
||||
"user": "0xdC483901425B2EA6494EaE01ADB6565936E25124",
|
||||
"tranche_id": 56,
|
||||
"tx": "0x0fb773aaa35072e4a5129d4815ad5f1f0808fb4a41c9ca119bf8c4caa1b64bf8"
|
||||
}
|
||||
],
|
||||
"total_tokens": "94.875",
|
||||
"withdrawn_tokens": "0",
|
||||
"remaining_tokens": "94.875"
|
||||
"withdrawn_tokens": "92.7240241607625",
|
||||
"remaining_tokens": "2.1509758392375"
|
||||
},
|
||||
{
|
||||
"address": "0xE9F41a0090fcc7eaf626037003AAD44B17098E7C",
|
||||
@@ -6152,7 +6215,7 @@
|
||||
"tranche_end": "2023-12-05T00:00:00.000Z",
|
||||
"total_added": "86666.297",
|
||||
"total_removed": "0",
|
||||
"locked_amount": "47427.3752864312792701068",
|
||||
"locked_amount": "47368.22916631352482661",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "86666.297",
|
||||
@@ -6218,7 +6281,7 @@
|
||||
"tranche_end": "2023-06-01T00:00:00.000Z",
|
||||
"total_added": "2500",
|
||||
"total_removed": "0",
|
||||
"locked_amount": "175.042130901506",
|
||||
"locked_amount": "171.620465761090625",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "2500",
|
||||
@@ -6251,7 +6314,7 @@
|
||||
"tranche_end": "2023-11-01T00:00:00.000Z",
|
||||
"total_added": "15000.000000000000015",
|
||||
"total_removed": "0",
|
||||
"locked_amount": "13511.663081219808013511663081219808",
|
||||
"locked_amount": "13491.356242451691013491356242451691",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "1.5e-14",
|
||||
@@ -6359,7 +6422,7 @@
|
||||
"tranche_end": "2023-09-01T00:00:00.000Z",
|
||||
"total_added": "17500",
|
||||
"total_removed": "0",
|
||||
"locked_amount": "9961.97649330716525",
|
||||
"locked_amount": "9938.2851814110305",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "12500",
|
||||
@@ -6626,7 +6689,7 @@
|
||||
"tranche_end": "2023-08-01T00:00:00.000Z",
|
||||
"total_added": "37500",
|
||||
"total_removed": "18592.291570575",
|
||||
"locked_amount": "15278.259764426026125",
|
||||
"locked_amount": "15226.651223910375",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "7500",
|
||||
@@ -7078,7 +7141,7 @@
|
||||
"tranche_end": "2023-12-05T00:00:00.000Z",
|
||||
"total_added": "129999.45",
|
||||
"total_removed": "0",
|
||||
"locked_amount": "47384.103774023588476863",
|
||||
"locked_amount": "47325.01161729839244873",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "129999.45",
|
||||
@@ -7111,7 +7174,7 @@
|
||||
"tranche_end": "2024-04-01T00:00:00.000Z",
|
||||
"total_added": "54144.7663",
|
||||
"total_removed": "0",
|
||||
"locked_amount": "47005.80358792078600524149",
|
||||
"locked_amount": "46968.95301173717592265927",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "54144.7663",
|
||||
@@ -7144,7 +7207,7 @@
|
||||
"tranche_end": "2023-09-03T00:00:00.000Z",
|
||||
"total_added": "62600",
|
||||
"total_removed": "0",
|
||||
"locked_amount": "18307.16712962962592",
|
||||
"locked_amount": "18264.44524987316222",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "10000",
|
||||
@@ -7337,7 +7400,7 @@
|
||||
"tranche_end": "2023-09-17T00:00:00.000Z",
|
||||
"total_added": "5000",
|
||||
"total_removed": "0",
|
||||
"locked_amount": "1654.01461821410465",
|
||||
"locked_amount": "1650.6023274987315",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "5000",
|
||||
@@ -8406,7 +8469,7 @@
|
||||
"tranche_end": "2023-06-02T00:00:00.000Z",
|
||||
"total_added": "1939928.38",
|
||||
"total_removed": "1709370.7872515768348",
|
||||
"locked_amount": "73042.6464466127914863066",
|
||||
"locked_amount": "71718.7265267003714855776",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "1852091.69",
|
||||
@@ -13927,7 +13990,7 @@
|
||||
"tranche_id": 11,
|
||||
"tranche_start": "2021-09-03T00:00:00.000Z",
|
||||
"tranche_end": "2022-09-03T00:00:00.000Z",
|
||||
"total_added": "58128.000000000000000003",
|
||||
"total_added": "58393.000000000000000003",
|
||||
"total_removed": "51151.35141572991",
|
||||
"locked_amount": "0",
|
||||
"deposits": [
|
||||
@@ -14006,6 +14069,76 @@
|
||||
"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",
|
||||
@@ -26088,6 +26221,90 @@
|
||||
"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",
|
||||
@@ -27177,9 +27394,9 @@
|
||||
"tx": "0x26f83e1b57a646b5266f07b00f13f47d3983978d96e921349b24a8b2df0fbc3d"
|
||||
}
|
||||
],
|
||||
"total_tokens": "3680",
|
||||
"total_tokens": "3945",
|
||||
"withdrawn_tokens": "3680",
|
||||
"remaining_tokens": "0"
|
||||
"remaining_tokens": "265"
|
||||
},
|
||||
{
|
||||
"address": "0x9E53F72210479BF46aE7ABF77c48B0d611b3c3dB",
|
||||
@@ -42718,7 +42935,7 @@
|
||||
"tranche_end": "2023-06-05T00:00:00.000Z",
|
||||
"total_added": "3732368.4671",
|
||||
"total_removed": "747515.181114080043393",
|
||||
"locked_amount": "136742.44156929554179493785",
|
||||
"locked_amount": "134708.03759234934331725506",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "1998.95815",
|
||||
@@ -44122,7 +44339,7 @@
|
||||
"tranche_end": "2023-12-05T00:00:00.000Z",
|
||||
"total_added": "15870102.715470999700000001",
|
||||
"total_removed": "890096.86511001003331852",
|
||||
"locked_amount": "5784567.50374168041959439240960384604676934",
|
||||
"locked_amount": "5777353.6378606511430622943118666710719114",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "16249.93",
|
||||
@@ -61084,8 +61301,8 @@
|
||||
"tranche_start": "2022-06-05T00:00:00.000Z",
|
||||
"tranche_end": "2023-06-05T00:00:00.000Z",
|
||||
"total_added": "472355.6199999996",
|
||||
"total_removed": "45798.0743154683416",
|
||||
"locked_amount": "21667.621519774832869363582597674",
|
||||
"total_removed": "46179.9572555963416",
|
||||
"locked_amount": "21345.2585804788058432314598274936",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "3000",
|
||||
@@ -67764,6 +67981,11 @@
|
||||
"user": "0xd2033db9c5370aC76ABD80823b5c5adC097E2FBF",
|
||||
"tx": "0x492598e81b545c857d7a1d5a10b291a595c4d76c85af5a282a96948e7702c5da"
|
||||
},
|
||||
{
|
||||
"amount": "381.882940128",
|
||||
"user": "0x78805Dd0a19ac89AF3CC334C79330e6Ad9cDaf0c",
|
||||
"tx": "0xa6658830025cac3d4376ed5ad5191623ee9d1572eb5eb95f26e529aa2e2c4ee9"
|
||||
},
|
||||
{
|
||||
"amount": "182.662252664",
|
||||
"user": "0xb1169C6daAc76bAcaf0D8f87641Fc38fbabe569F",
|
||||
@@ -89530,10 +89752,17 @@
|
||||
"tx": "0xb59405747c8088945a412703637a7b422f3639439ec2ee15e180c0a2a0d71ee4"
|
||||
}
|
||||
],
|
||||
"withdrawals": [],
|
||||
"withdrawals": [
|
||||
{
|
||||
"amount": "381.882940128",
|
||||
"user": "0x78805Dd0a19ac89AF3CC334C79330e6Ad9cDaf0c",
|
||||
"tranche_id": 5,
|
||||
"tx": "0xa6658830025cac3d4376ed5ad5191623ee9d1572eb5eb95f26e529aa2e2c4ee9"
|
||||
}
|
||||
],
|
||||
"total_tokens": "400",
|
||||
"withdrawn_tokens": "0",
|
||||
"remaining_tokens": "400"
|
||||
"withdrawn_tokens": "381.882940128",
|
||||
"remaining_tokens": "18.117059872"
|
||||
},
|
||||
{
|
||||
"address": "0xC17d05223BB7BDE1Aa98d5f4196e44eF02e059b3",
|
||||
|
||||
@@ -82,20 +82,12 @@ 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,16 +16,6 @@ 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', sourceType: { __typename?: 'DataSourceSpecConfigurationTime', conditions: Array<{ __typename?: 'Condition', operator: Types.ConditionOperator, value?: string | null } | null> } } };
|
||||
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 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', 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 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 const DataSourceFragmentDoc = gql`
|
||||
fragment DataSource on DataSourceDefinition {
|
||||
@@ -31,16 +31,6 @@ export const DataSourceFragmentDoc = gql`
|
||||
}
|
||||
}
|
||||
}
|
||||
... on DataSourceDefinitionInternal {
|
||||
sourceType {
|
||||
... on DataSourceSpecConfigurationTime {
|
||||
conditions {
|
||||
operator
|
||||
value
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -105,12 +105,10 @@ export const MarketInfoAccordion = ({
|
||||
content: <InsurancePoolInfoPanel market={market} account={a} />,
|
||||
})),
|
||||
];
|
||||
const settlementData =
|
||||
market.tradableInstrument.instrument.product.dataSourceSpecForSettlementData
|
||||
.data;
|
||||
const terminationData =
|
||||
market.tradableInstrument.instrument.product
|
||||
.dataSourceSpecForTradingTermination.data;
|
||||
const settlementData = market.tradableInstrument.instrument.product
|
||||
.dataSourceSpecForSettlementData.data as DataSourceDefinition;
|
||||
const terminationData = market.tradableInstrument.instrument.product
|
||||
.dataSourceSpecForTradingTermination.data as DataSourceDefinition;
|
||||
|
||||
const getSigners = (data: DataSourceDefinition) => {
|
||||
if (data.sourceType.__typename === 'DataSourceDefinitionExternal') {
|
||||
|
||||
@@ -462,15 +462,17 @@ 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={
|
||||
type === 'settlementData'
|
||||
? product.dataSourceSpecForSettlementData.data
|
||||
: product.dataSourceSpecForTradingTermination.data
|
||||
}
|
||||
data={dataSourceSpec}
|
||||
providers={data}
|
||||
type={type}
|
||||
dataSourceSpecId={dataSourceSpecId}
|
||||
@@ -527,19 +529,27 @@ export const DataSourceProof = ({
|
||||
}
|
||||
|
||||
if (data.sourceType.__typename === 'DataSourceDefinitionInternal') {
|
||||
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>
|
||||
);
|
||||
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>{t('Invalid data source')}</div>;
|
||||
|
||||
@@ -37,7 +37,7 @@ export const useColumnDefs = () => {
|
||||
colId: 'market',
|
||||
headerName: t('Market'),
|
||||
field: 'terms.change.instrument.code',
|
||||
width: 150,
|
||||
minWidth: 150,
|
||||
cellStyle: { lineHeight: '14px' },
|
||||
cellRenderer: ({
|
||||
data,
|
||||
|
||||
@@ -13,16 +13,6 @@ fragment NewMarketFields on NewMarket {
|
||||
quoteName
|
||||
dataSourceSpecForSettlementData {
|
||||
sourceType {
|
||||
... on DataSourceDefinitionInternal {
|
||||
sourceType {
|
||||
... on DataSourceSpecConfigurationTime {
|
||||
conditions {
|
||||
operator
|
||||
value
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
... on DataSourceDefinitionExternal {
|
||||
sourceType {
|
||||
... on DataSourceSpecConfiguration {
|
||||
@@ -53,16 +43,6 @@ fragment NewMarketFields on NewMarket {
|
||||
}
|
||||
dataSourceSpecForTradingTermination {
|
||||
sourceType {
|
||||
... on DataSourceDefinitionInternal {
|
||||
sourceType {
|
||||
... on DataSourceSpecConfigurationTime {
|
||||
conditions {
|
||||
operator
|
||||
value
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
... on DataSourceDefinitionExternal {
|
||||
sourceType {
|
||||
... on DataSourceSpecConfiguration {
|
||||
@@ -145,16 +125,6 @@ fragment UpdateMarketFields on UpdateMarket {
|
||||
quoteName
|
||||
dataSourceSpecForSettlementData {
|
||||
sourceType {
|
||||
... on DataSourceDefinitionInternal {
|
||||
sourceType {
|
||||
... on DataSourceSpecConfigurationTime {
|
||||
conditions {
|
||||
operator
|
||||
value
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
... on DataSourceDefinitionExternal {
|
||||
sourceType {
|
||||
... on DataSourceSpecConfiguration {
|
||||
@@ -185,16 +155,6 @@ fragment UpdateMarketFields on UpdateMarket {
|
||||
}
|
||||
dataSourceSpecForTradingTermination {
|
||||
sourceType {
|
||||
... on DataSourceDefinitionInternal {
|
||||
sourceType {
|
||||
... on DataSourceSpecConfigurationTime {
|
||||
conditions {
|
||||
operator
|
||||
value
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
... on DataSourceDefinitionExternal {
|
||||
sourceType {
|
||||
... on DataSourceSpecConfiguration {
|
||||
|
||||
+4
-44
File diff suppressed because one or more lines are too long
@@ -76,20 +76,12 @@ export const marketUpdateProposal: ProposalListFieldsFragment = {
|
||||
__typename: 'DataSourceDefinition',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceDefinitionInternal',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceSpecConfigurationTime',
|
||||
conditions: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
dataSourceSpecForTradingTermination: {
|
||||
__typename: 'DataSourceDefinition',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceDefinitionInternal',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceSpecConfigurationTime',
|
||||
conditions: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -185,20 +177,12 @@ const proposalListFields: ProposalListFieldsFragment[] = [
|
||||
__typename: 'DataSourceDefinition',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceDefinitionInternal',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceSpecConfigurationTime',
|
||||
conditions: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
dataSourceSpecForTradingTermination: {
|
||||
__typename: 'DataSourceDefinition',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceDefinitionInternal',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceSpecConfigurationTime',
|
||||
conditions: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
__typename: 'FutureProduct',
|
||||
@@ -283,20 +267,12 @@ const proposalListFields: ProposalListFieldsFragment[] = [
|
||||
__typename: 'DataSourceDefinition',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceDefinitionInternal',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceSpecConfigurationTime',
|
||||
conditions: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
dataSourceSpecForTradingTermination: {
|
||||
__typename: 'DataSourceDefinition',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceDefinitionInternal',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceSpecConfigurationTime',
|
||||
conditions: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
__typename: 'FutureProduct',
|
||||
@@ -381,20 +357,12 @@ const proposalListFields: ProposalListFieldsFragment[] = [
|
||||
__typename: 'DataSourceDefinition',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceDefinitionInternal',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceSpecConfigurationTime',
|
||||
conditions: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
dataSourceSpecForTradingTermination: {
|
||||
__typename: 'DataSourceDefinition',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceDefinitionInternal',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceSpecConfigurationTime',
|
||||
conditions: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
__typename: 'FutureProduct',
|
||||
@@ -479,20 +447,12 @@ const proposalListFields: ProposalListFieldsFragment[] = [
|
||||
__typename: 'DataSourceDefinition',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceDefinitionInternal',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceSpecConfigurationTime',
|
||||
conditions: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
dataSourceSpecForTradingTermination: {
|
||||
__typename: 'DataSourceDefinition',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceDefinitionInternal',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceSpecConfigurationTime',
|
||||
conditions: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
__typename: 'FutureProduct',
|
||||
@@ -577,20 +537,12 @@ const proposalListFields: ProposalListFieldsFragment[] = [
|
||||
__typename: 'DataSourceDefinition',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceDefinitionInternal',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceSpecConfigurationTime',
|
||||
conditions: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
dataSourceSpecForTradingTermination: {
|
||||
__typename: 'DataSourceDefinition',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceDefinitionInternal',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceSpecConfigurationTime',
|
||||
conditions: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
__typename: 'FutureProduct',
|
||||
@@ -675,20 +627,12 @@ const proposalListFields: ProposalListFieldsFragment[] = [
|
||||
__typename: 'DataSourceDefinition',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceDefinitionInternal',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceSpecConfigurationTime',
|
||||
conditions: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
dataSourceSpecForTradingTermination: {
|
||||
__typename: 'DataSourceDefinition',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceDefinitionInternal',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceSpecConfigurationTime',
|
||||
conditions: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
__typename: 'FutureProduct',
|
||||
@@ -773,20 +717,12 @@ const proposalListFields: ProposalListFieldsFragment[] = [
|
||||
__typename: 'DataSourceDefinition',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceDefinitionInternal',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceSpecConfigurationTime',
|
||||
conditions: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
dataSourceSpecForTradingTermination: {
|
||||
__typename: 'DataSourceDefinition',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceDefinitionInternal',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceSpecConfigurationTime',
|
||||
conditions: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
__typename: 'FutureProduct',
|
||||
@@ -871,20 +807,12 @@ const proposalListFields: ProposalListFieldsFragment[] = [
|
||||
__typename: 'DataSourceDefinition',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceDefinitionInternal',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceSpecConfigurationTime',
|
||||
conditions: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
dataSourceSpecForTradingTermination: {
|
||||
__typename: 'DataSourceDefinition',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceDefinitionInternal',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceSpecConfigurationTime',
|
||||
conditions: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
__typename: 'FutureProduct',
|
||||
@@ -969,20 +897,12 @@ const proposalListFields: ProposalListFieldsFragment[] = [
|
||||
__typename: 'DataSourceDefinition',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceDefinitionInternal',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceSpecConfigurationTime',
|
||||
conditions: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
dataSourceSpecForTradingTermination: {
|
||||
__typename: 'DataSourceDefinition',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceDefinitionInternal',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceSpecConfigurationTime',
|
||||
conditions: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
__typename: 'FutureProduct',
|
||||
@@ -1067,20 +987,12 @@ const proposalListFields: ProposalListFieldsFragment[] = [
|
||||
__typename: 'DataSourceDefinition',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceDefinitionInternal',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceSpecConfigurationTime',
|
||||
conditions: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
dataSourceSpecForTradingTermination: {
|
||||
__typename: 'DataSourceDefinition',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceDefinitionInternal',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceSpecConfigurationTime',
|
||||
conditions: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
__typename: 'FutureProduct',
|
||||
@@ -1165,20 +1077,12 @@ const proposalListFields: ProposalListFieldsFragment[] = [
|
||||
__typename: 'DataSourceDefinition',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceDefinitionInternal',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceSpecConfigurationTime',
|
||||
conditions: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
dataSourceSpecForTradingTermination: {
|
||||
__typename: 'DataSourceDefinition',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceDefinitionInternal',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceSpecConfigurationTime',
|
||||
conditions: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
__typename: 'FutureProduct',
|
||||
@@ -1263,20 +1167,12 @@ const proposalListFields: ProposalListFieldsFragment[] = [
|
||||
__typename: 'DataSourceDefinition',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceDefinitionInternal',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceSpecConfigurationTime',
|
||||
conditions: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
dataSourceSpecForTradingTermination: {
|
||||
__typename: 'DataSourceDefinition',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceDefinitionInternal',
|
||||
sourceType: {
|
||||
__typename: 'DataSourceSpecConfigurationTime',
|
||||
conditions: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
__typename: 'FutureProduct',
|
||||
@@ -1361,20 +1257,12 @@ 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,19 +133,11 @@ 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