Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5017224fcd | ||
|
|
e306d1c9fa | ||
|
|
737dec4f5f | ||
|
|
6780b2f618 | ||
|
|
08dc60086d | ||
|
|
4595db07b0 | ||
|
|
c3da31146f | ||
|
|
b6a9faaa7c | ||
|
|
477d523582 | ||
|
|
a2b112d898 | ||
|
|
621ba497e8 |
@@ -529,8 +529,8 @@
|
||||
"tranche_start": "2023-03-06T00:00:00.000Z",
|
||||
"tranche_end": "2023-04-06T00:00:00.000Z",
|
||||
"total_added": "14099",
|
||||
"total_removed": "143.78419653368",
|
||||
"locked_amount": "4432.17309438470708546",
|
||||
"total_removed": "165.10784124668",
|
||||
"locked_amount": "3863.2439127837516484",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "30",
|
||||
@@ -1299,6 +1299,11 @@
|
||||
"user": "0x47e6217C1667e2B1fD177Ab8fD89037bCEC7dc6C",
|
||||
"tx": "0xc68a9a71f6a8a296e8c90bc748307ce197c444e3ca18129a189b7b462a60eceb"
|
||||
},
|
||||
{
|
||||
"amount": "21.323644713",
|
||||
"user": "0x6A228Fffda4D1B3C773b9ce38DA43592581b36FC",
|
||||
"tx": "0x5a8d0a823b77eb011079663279e0f2eaf0bd8773114dd6d5bfe65c2ab47680e6"
|
||||
},
|
||||
{
|
||||
"amount": "14.85013776876",
|
||||
"user": "0x6F32AA5A6198329c16e438512F992a0548C856f9",
|
||||
@@ -1726,10 +1731,17 @@
|
||||
"tx": "0x20d505a766d3d8e376509ed8003a5b9f35fd0524f0979a5a57c7d3714d01d3e5"
|
||||
}
|
||||
],
|
||||
"withdrawals": [],
|
||||
"withdrawals": [
|
||||
{
|
||||
"amount": "21.323644713",
|
||||
"user": "0x6A228Fffda4D1B3C773b9ce38DA43592581b36FC",
|
||||
"tranche_id": 53,
|
||||
"tx": "0x5a8d0a823b77eb011079663279e0f2eaf0bd8773114dd6d5bfe65c2ab47680e6"
|
||||
}
|
||||
],
|
||||
"total_tokens": "30",
|
||||
"withdrawn_tokens": "0",
|
||||
"remaining_tokens": "30"
|
||||
"withdrawn_tokens": "21.323644713",
|
||||
"remaining_tokens": "8.676355287"
|
||||
},
|
||||
{
|
||||
"address": "0x259fBDdeE4e686242AAdFC7fc856947DF15Acc59",
|
||||
@@ -3306,7 +3318,7 @@
|
||||
"tranche_end": "2023-12-05T00:00:00.000Z",
|
||||
"total_added": "86666.297",
|
||||
"total_removed": "0",
|
||||
"locked_amount": "60012.2994098061907759131",
|
||||
"locked_amount": "59715.277169199897517339",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "86666.297",
|
||||
@@ -3372,7 +3384,7 @@
|
||||
"tranche_end": "2023-06-01T00:00:00.000Z",
|
||||
"total_added": "2500",
|
||||
"total_removed": "0",
|
||||
"locked_amount": "903.093203093203175",
|
||||
"locked_amount": "885.91015466015475",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "2500",
|
||||
@@ -3493,7 +3505,7 @@
|
||||
"tranche_end": "2023-09-01T00:00:00.000Z",
|
||||
"total_added": "17500",
|
||||
"total_removed": "0",
|
||||
"locked_amount": "15002.9388083735895",
|
||||
"locked_amount": "14883.964875201289",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "12500",
|
||||
@@ -3759,8 +3771,8 @@
|
||||
"tranche_start": "2023-02-01T00:00:00.000Z",
|
||||
"tranche_end": "2023-08-01T00:00:00.000Z",
|
||||
"total_added": "37500",
|
||||
"total_removed": "4492.78075095",
|
||||
"locked_amount": "26259.36157151626875",
|
||||
"total_removed": "4574.865235275",
|
||||
"locked_amount": "26000.1918354818925",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "7500",
|
||||
@@ -3779,6 +3791,11 @@
|
||||
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
|
||||
"tx": "0x9b76b93c59157b6740b91496e48037b239a6ca6db5758804aba9894e02a7eb69"
|
||||
},
|
||||
{
|
||||
"amount": "82.084484325",
|
||||
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
|
||||
"tx": "0xe021c767a9587b28a6772b57666d72122e5d869c477596e246a4365ee6b7ce43"
|
||||
},
|
||||
{
|
||||
"amount": "92.587476975",
|
||||
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
|
||||
@@ -3893,6 +3910,12 @@
|
||||
"tranche_id": 34,
|
||||
"tx": "0x9b76b93c59157b6740b91496e48037b239a6ca6db5758804aba9894e02a7eb69"
|
||||
},
|
||||
{
|
||||
"amount": "82.084484325",
|
||||
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
|
||||
"tranche_id": 34,
|
||||
"tx": "0xe021c767a9587b28a6772b57666d72122e5d869c477596e246a4365ee6b7ce43"
|
||||
},
|
||||
{
|
||||
"amount": "92.587476975",
|
||||
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
|
||||
@@ -4003,8 +4026,8 @@
|
||||
}
|
||||
],
|
||||
"total_tokens": "7500",
|
||||
"withdrawn_tokens": "2217.66756825",
|
||||
"remaining_tokens": "5282.33243175"
|
||||
"withdrawn_tokens": "2299.752052575",
|
||||
"remaining_tokens": "5200.247947425"
|
||||
},
|
||||
{
|
||||
"address": "0x0B4e6fcE839B01ef43DA6F890FAC7B1Afb004600",
|
||||
@@ -4036,7 +4059,7 @@
|
||||
"tranche_end": "2023-12-05T00:00:00.000Z",
|
||||
"total_added": "129999.45",
|
||||
"total_removed": "0",
|
||||
"locked_amount": "59957.545737631794657195",
|
||||
"locked_amount": "59660.7944924472825704535",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "129999.45",
|
||||
@@ -4102,7 +4125,7 @@
|
||||
"tranche_end": "2023-09-03T00:00:00.000Z",
|
||||
"total_added": "62600",
|
||||
"total_removed": "0",
|
||||
"locked_amount": "27397.393404363265956",
|
||||
"locked_amount": "27182.851040081174176",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "10000",
|
||||
@@ -4295,7 +4318,7 @@
|
||||
"tranche_end": "2023-09-17T00:00:00.000Z",
|
||||
"total_added": "5000",
|
||||
"total_removed": "0",
|
||||
"locked_amount": "2380.07102993404385",
|
||||
"locked_amount": "2362.93505834601735",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "5000",
|
||||
@@ -4506,7 +4529,7 @@
|
||||
"tranche_end": "2023-04-05T00:00:00.000Z",
|
||||
"total_added": "97499.58",
|
||||
"total_removed": "0",
|
||||
"locked_amount": "2034.9686935030549769988",
|
||||
"locked_amount": "1743.88336560594536108964",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "97499.58",
|
||||
@@ -4539,7 +4562,7 @@
|
||||
"tranche_end": "2023-04-05T00:00:00.000Z",
|
||||
"total_added": "135173.4239508",
|
||||
"total_removed": "98230.390980249184455396",
|
||||
"locked_amount": "2781.4508813301073482881800752",
|
||||
"locked_amount": "2383.5874918801371561646812876",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "135173.4239508",
|
||||
@@ -4585,7 +4608,7 @@
|
||||
"tranche_end": "2023-04-05T00:00:00.000Z",
|
||||
"total_added": "32499.86",
|
||||
"total_removed": "0",
|
||||
"locked_amount": "856.07618732708597453098",
|
||||
"locked_amount": "733.62161665551011862912",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "32499.86",
|
||||
@@ -4618,7 +4641,7 @@
|
||||
"tranche_end": "2023-04-05T00:00:00.000Z",
|
||||
"total_added": "10833.29",
|
||||
"total_removed": "0",
|
||||
"locked_amount": "278.6444918082786955163",
|
||||
"locked_amount": "238.78671732570820440756",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "10833.29",
|
||||
@@ -4651,7 +4674,7 @@
|
||||
"tranche_end": "2023-04-05T00:00:00.000Z",
|
||||
"total_added": "22749.93",
|
||||
"total_removed": "4720.860935375",
|
||||
"locked_amount": "1041.6353445026172644364",
|
||||
"locked_amount": "892.6380814136124106908",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "6500",
|
||||
@@ -4802,8 +4825,8 @@
|
||||
"tranche_start": "2022-11-01T00:00:00.000Z",
|
||||
"tranche_end": "2023-05-01T00:00:00.000Z",
|
||||
"total_added": "22500",
|
||||
"total_removed": "6029.8222644",
|
||||
"locked_amount": "4319.15285451197025",
|
||||
"total_removed": "6111.900993675",
|
||||
"locked_amount": "4163.6510128913445",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "7500",
|
||||
@@ -4822,6 +4845,11 @@
|
||||
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
|
||||
"tx": "0x4fa181368c0dc03d6e81dfb94e9b00edc7a4b5b44ea1354dcd03db1e58a060a6"
|
||||
},
|
||||
{
|
||||
"amount": "82.078729275",
|
||||
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
|
||||
"tx": "0x2ab0e85bffb0894e741265c4efb962d5f09831002daa4acc92ab87f72917bfe3"
|
||||
},
|
||||
{
|
||||
"amount": "92.593232025",
|
||||
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
|
||||
@@ -4991,6 +5019,12 @@
|
||||
"tranche_id": 33,
|
||||
"tx": "0x4fa181368c0dc03d6e81dfb94e9b00edc7a4b5b44ea1354dcd03db1e58a060a6"
|
||||
},
|
||||
{
|
||||
"amount": "82.078729275",
|
||||
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
|
||||
"tranche_id": 33,
|
||||
"tx": "0x2ab0e85bffb0894e741265c4efb962d5f09831002daa4acc92ab87f72917bfe3"
|
||||
},
|
||||
{
|
||||
"amount": "92.593232025",
|
||||
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
|
||||
@@ -5173,8 +5207,8 @@
|
||||
}
|
||||
],
|
||||
"total_tokens": "7500",
|
||||
"withdrawn_tokens": "6029.8222644",
|
||||
"remaining_tokens": "1470.1777356"
|
||||
"withdrawn_tokens": "6111.900993675",
|
||||
"remaining_tokens": "1388.099006325"
|
||||
},
|
||||
{
|
||||
"address": "0x2539b51EbDE65a75672aBcfE9439a706a99D18D1",
|
||||
@@ -5199,7 +5233,7 @@
|
||||
"tranche_end": "2023-06-02T00:00:00.000Z",
|
||||
"total_added": "1939928.38",
|
||||
"total_removed": "928642.9598472029154",
|
||||
"locked_amount": "354742.134161907705277922",
|
||||
"locked_amount": "348093.622641410450169508",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "1852091.69",
|
||||
@@ -38890,7 +38924,7 @@
|
||||
"tranche_end": "2023-06-05T00:00:00.000Z",
|
||||
"total_added": "3732368.4671",
|
||||
"total_removed": "700133.348465855088393",
|
||||
"locked_amount": "569616.476842965740083581504",
|
||||
"locked_amount": "559400.02940181935737278844",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "1998.95815",
|
||||
@@ -40271,8 +40305,8 @@
|
||||
"tranche_start": "2022-06-05T00:00:00.000Z",
|
||||
"tranche_end": "2023-12-05T00:00:00.000Z",
|
||||
"total_added": "15870102.715470999700000001",
|
||||
"total_removed": "811190.94573738377022952",
|
||||
"locked_amount": "7319511.0396526062849853116896723115788051",
|
||||
"total_removed": "812130.55546472109935452",
|
||||
"locked_amount": "7283284.17298492326254788501911774103514463",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "16249.93",
|
||||
@@ -40781,6 +40815,11 @@
|
||||
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
|
||||
"tx": "0x58aa740f4eaf17c0c60c22587b34db0dfd670c968d3affb614fee9b917f0b53c"
|
||||
},
|
||||
{
|
||||
"amount": "939.609727337329125",
|
||||
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
|
||||
"tx": "0xa13046dbc8f011b7647728acbd7b9c6a67fb3869efc0e9e48c9590300345570a"
|
||||
},
|
||||
{
|
||||
"amount": "545.4204142199725",
|
||||
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
|
||||
@@ -42775,6 +42814,12 @@
|
||||
"tranche_id": 2,
|
||||
"tx": "0x58aa740f4eaf17c0c60c22587b34db0dfd670c968d3affb614fee9b917f0b53c"
|
||||
},
|
||||
{
|
||||
"amount": "939.609727337329125",
|
||||
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
|
||||
"tranche_id": 2,
|
||||
"tx": "0xa13046dbc8f011b7647728acbd7b9c6a67fb3869efc0e9e48c9590300345570a"
|
||||
},
|
||||
{
|
||||
"amount": "545.4204142199725",
|
||||
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
|
||||
@@ -44151,8 +44196,8 @@
|
||||
}
|
||||
],
|
||||
"total_tokens": "259998.8875",
|
||||
"withdrawn_tokens": "139734.965335622663875",
|
||||
"remaining_tokens": "120263.922164377336125"
|
||||
"withdrawn_tokens": "140674.575062959993",
|
||||
"remaining_tokens": "119324.312437040007"
|
||||
},
|
||||
{
|
||||
"address": "0x89051CAb67Bc7F8CC44F7e270c6EDaf1EC57676c",
|
||||
@@ -46497,8 +46542,8 @@
|
||||
"tranche_start": "2021-11-05T00:00:00.000Z",
|
||||
"tranche_end": "2023-05-05T00:00:00.000Z",
|
||||
"total_added": "14597706.0446472999",
|
||||
"total_removed": "5781272.031584311406488996",
|
||||
"locked_amount": "1035880.629997723569255699501954567",
|
||||
"total_removed": "5782575.169630789834713996",
|
||||
"locked_amount": "1002436.218000846412796734272837213",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "129284.449",
|
||||
@@ -46717,6 +46762,11 @@
|
||||
"user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b",
|
||||
"tx": "0xab861da5aece3737a3d6b9d8ac61fd11f864aefa410287e00357497f1c859081"
|
||||
},
|
||||
{
|
||||
"amount": "1303.138046478428225",
|
||||
"user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b",
|
||||
"tx": "0x5c9bcf8195dc2bf6d36af74095f45cc5f8289d7239e4205d74f06419b042d648"
|
||||
},
|
||||
{
|
||||
"amount": "755.482067130393772",
|
||||
"user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b",
|
||||
@@ -49853,6 +49903,12 @@
|
||||
"tranche_id": 3,
|
||||
"tx": "0xab861da5aece3737a3d6b9d8ac61fd11f864aefa410287e00357497f1c859081"
|
||||
},
|
||||
{
|
||||
"amount": "1303.138046478428225",
|
||||
"user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b",
|
||||
"tranche_id": 3,
|
||||
"tx": "0x5c9bcf8195dc2bf6d36af74095f45cc5f8289d7239e4205d74f06419b042d648"
|
||||
},
|
||||
{
|
||||
"amount": "755.482067130393772",
|
||||
"user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b",
|
||||
@@ -52531,8 +52587,8 @@
|
||||
}
|
||||
],
|
||||
"total_tokens": "359123.469575",
|
||||
"withdrawn_tokens": "333154.88504403463036575",
|
||||
"remaining_tokens": "25968.58453096536963425"
|
||||
"withdrawn_tokens": "334458.02309051305859075",
|
||||
"remaining_tokens": "24665.44648448694140925"
|
||||
},
|
||||
{
|
||||
"address": "0xBdd412797c1B78535Afc5F71503b91fAbD0160fB",
|
||||
@@ -53930,7 +53986,7 @@
|
||||
"tranche_end": "2023-04-05T00:00:00.000Z",
|
||||
"total_added": "5778205.3912159303",
|
||||
"total_removed": "3381706.364737906998719578",
|
||||
"locked_amount": "92379.298325811440012225988805963",
|
||||
"locked_amount": "79165.2088757254297160760025198165",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "552496.6455",
|
||||
@@ -56057,8 +56113,8 @@
|
||||
"tranche_start": "2022-06-05T00:00:00.000Z",
|
||||
"tranche_end": "2023-06-05T00:00:00.000Z",
|
||||
"total_added": "472355.6199999996",
|
||||
"total_removed": "38818.1373783577949",
|
||||
"locked_amount": "90258.98682236420185873334500254",
|
||||
"total_removed": "38870.3290450237949",
|
||||
"locked_amount": "88640.13232561127483282507204466",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "3000",
|
||||
@@ -62687,6 +62743,11 @@
|
||||
"user": "0xF5037DDA4A660d67560200f45380FF8364e35540",
|
||||
"tx": "0xffc827a0984694ac0243552d0fa4267513471426f6ec34596fd57cfd9d9390e7"
|
||||
},
|
||||
{
|
||||
"amount": "52.191666666",
|
||||
"user": "0xdc040917f80aC350460e55467e4B6c52Fc5e220E",
|
||||
"tx": "0xd1ded90c18e54cae27c885ec52af8db6260e3eebfd23eb61092de4ad4d20c301"
|
||||
},
|
||||
{
|
||||
"amount": "154.812094114",
|
||||
"user": "0x27e2254A2A8c9c9D1321E5Fe64cAD88e7A4f0ba7",
|
||||
@@ -83934,6 +83995,12 @@
|
||||
}
|
||||
],
|
||||
"withdrawals": [
|
||||
{
|
||||
"amount": "52.191666666",
|
||||
"user": "0xdc040917f80aC350460e55467e4B6c52Fc5e220E",
|
||||
"tranche_id": 5,
|
||||
"tx": "0xd1ded90c18e54cae27c885ec52af8db6260e3eebfd23eb61092de4ad4d20c301"
|
||||
},
|
||||
{
|
||||
"amount": "20.281506849",
|
||||
"user": "0xdc040917f80aC350460e55467e4B6c52Fc5e220E",
|
||||
@@ -83960,8 +84027,8 @@
|
||||
}
|
||||
],
|
||||
"total_tokens": "300",
|
||||
"withdrawn_tokens": "190.705698249",
|
||||
"remaining_tokens": "109.294301751"
|
||||
"withdrawn_tokens": "242.897364915",
|
||||
"remaining_tokens": "57.102635085"
|
||||
},
|
||||
{
|
||||
"address": "0x8D01053B4f4857Ff453CAeDBf8387Cd57a5a2A2b",
|
||||
|
||||
@@ -282,7 +282,6 @@ describe('capsule', { tags: '@slow' }, () => {
|
||||
});
|
||||
});
|
||||
});
|
||||
// comment because of bug #2695
|
||||
it('can edit order', function () {
|
||||
cy.getByTestId(ordersTab).click();
|
||||
cy.getByTestId('edit').first().should('be.visible').click();
|
||||
|
||||
@@ -52,6 +52,8 @@ describe('Console - market list - live env', { tags: '@live' }, () => {
|
||||
describe('Console - market info - live env', { tags: '@live' }, () => {
|
||||
before(() => {
|
||||
cy.visit('/');
|
||||
cy.contains('Loading market data...').should('not.exist');
|
||||
cy.getByTestId('link').should('be.visible');
|
||||
cy.getByTestId('dialog-close').click();
|
||||
cy.getByTestId(marketInfoBtn).click();
|
||||
});
|
||||
@@ -68,17 +70,20 @@ describe('Console - market info - live env', { tags: '@live' }, () => {
|
||||
'Risk model',
|
||||
'Risk parameters',
|
||||
'Risk factors',
|
||||
'Price monitoring trigger 1',
|
||||
'Price monitoring bounds 1',
|
||||
'Liquidity monitoring parameters',
|
||||
'Liquidity',
|
||||
'Liquidity price range',
|
||||
'Oracle',
|
||||
'Proposal',
|
||||
];
|
||||
|
||||
it('market info titles are displayed', () => {
|
||||
cy.get('.text-lg').each((element, index) => {
|
||||
cy.wrap(element).should('have.text', titles[index]);
|
||||
});
|
||||
cy.getByTestId('split-view-view')
|
||||
.find('.text-lg')
|
||||
.each((element, index) => {
|
||||
cy.wrap(element).should('have.text', titles[index]);
|
||||
});
|
||||
});
|
||||
|
||||
it('market info subtitles are displayed', () => {
|
||||
@@ -205,6 +210,8 @@ describe('Console - markets table - live env', { tags: '@live' }, () => {
|
||||
});
|
||||
|
||||
function openMarketDropDown() {
|
||||
cy.contains('Loading...').should('not.exist');
|
||||
cy.getByTestId('link').should('be.visible');
|
||||
cy.getByTestId('dialog-close').click();
|
||||
cy.getByTestId('popover-trigger').click();
|
||||
cy.contains('Loading market data...').should('not.exist');
|
||||
|
||||
@@ -75,8 +75,7 @@ describe('market info is displayed', { tags: '@smoke' }, () => {
|
||||
validateMarketDataRow(3, 'Quote Name', 'BTC');
|
||||
});
|
||||
|
||||
// need to check why data are not visible
|
||||
it.skip('settlement asset displayed', () => {
|
||||
it('settlement asset displayed', () => {
|
||||
cy.getByTestId(marketTitle).contains('Settlement asset').click();
|
||||
cy.window().then((win) => {
|
||||
cy.stub(win, 'prompt').returns('DISABLED WINDOW PROMPT');
|
||||
|
||||
@@ -35,6 +35,8 @@ do
|
||||
fi
|
||||
done < $env_vars_file
|
||||
|
||||
rm $env_vars_file
|
||||
|
||||
echo "}" >> $env_file
|
||||
|
||||
# start serving
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { t } from '@vegaprotocol/i18n';
|
||||
import * as Schema from '@vegaprotocol/types';
|
||||
import { memo, useCallback, useEffect, useState } from 'react';
|
||||
import { memo, useCallback, useEffect, useState, useRef } from 'react';
|
||||
import { Controller } from 'react-hook-form';
|
||||
import { DealTicketAmount } from './deal-ticket-amount';
|
||||
import { DealTicketButton } from './deal-ticket-button';
|
||||
@@ -75,6 +75,8 @@ export const DealTicket = ({
|
||||
handleSubmit,
|
||||
} = useOrderForm(market.id);
|
||||
|
||||
const lastSubmitTime = useRef(0);
|
||||
|
||||
const asset = market.tradableInstrument.instrument.product.settlementAsset;
|
||||
|
||||
const { accountBalance: marginAccountBalance } = useMarketAccountBalance(
|
||||
@@ -146,6 +148,10 @@ export const DealTicket = ({
|
||||
|
||||
const onSubmit = useCallback(
|
||||
(order: OrderSubmission) => {
|
||||
const now = new Date().getTime();
|
||||
if (lastSubmitTime.current && now - lastSubmitTime.current < 1000) {
|
||||
return;
|
||||
}
|
||||
submit(
|
||||
normalizeOrderSubmission(
|
||||
order,
|
||||
@@ -153,6 +159,7 @@ export const DealTicket = ({
|
||||
market.positionDecimalPlaces
|
||||
)
|
||||
);
|
||||
lastSubmitTime.current = now;
|
||||
},
|
||||
[submit, market.decimalPlaces, market.positionDecimalPlaces]
|
||||
);
|
||||
|
||||
@@ -24,11 +24,7 @@ export const PositionsManager = ({
|
||||
}: PositionsManagerProps) => {
|
||||
const gridRef = useRef<AgGridReact | null>(null);
|
||||
const [dataCount, setDataCount] = useState(0);
|
||||
const { data, error, loading, reload } = usePositionsData(
|
||||
partyId,
|
||||
gridRef,
|
||||
true
|
||||
);
|
||||
const { data, error, loading, reload } = usePositionsData(partyId, gridRef);
|
||||
const create = useVegaTransactionStore((store) => store.create);
|
||||
const onClose = ({
|
||||
marketId,
|
||||
@@ -72,7 +68,7 @@ export const PositionsManager = ({
|
||||
});
|
||||
useEffect(() => {
|
||||
setDataCount(gridRef.current?.api?.getModel().getRowCount() ?? 0);
|
||||
}, [data?.length]);
|
||||
}, [data]);
|
||||
const onFilterChanged = useCallback((event: FilterChangedEvent) => {
|
||||
setDataCount(gridRef.current?.api?.getModel().getRowCount() ?? 0);
|
||||
}, []);
|
||||
|
||||
@@ -6,13 +6,13 @@ import { positionsMetricsProvider } from './positions-data-providers';
|
||||
import type { PositionsQueryVariables } from './__generated__/Positions';
|
||||
import { useDataProvider, updateGridData } from '@vegaprotocol/react-helpers';
|
||||
import type { GetRowsParams } from '@vegaprotocol/datagrid';
|
||||
import isEqual from 'lodash/isEqual';
|
||||
|
||||
export const getRowId = ({ data }: { data: Position }) => data.marketId;
|
||||
|
||||
export const usePositionsData = (
|
||||
partyId: string,
|
||||
gridRef: RefObject<AgGridReact>,
|
||||
clientSideModel?: boolean
|
||||
gridRef: RefObject<AgGridReact>
|
||||
) => {
|
||||
const variables = useMemo<PositionsQueryVariables>(
|
||||
() => ({ partyId }),
|
||||
@@ -21,9 +21,30 @@ export const usePositionsData = (
|
||||
const dataRef = useRef<Position[] | null>(null);
|
||||
const update = useCallback(
|
||||
({ data }: { data: Position[] | null }) => {
|
||||
return clientSideModel ? false : updateGridData(dataRef, data, gridRef);
|
||||
if (gridRef.current?.api?.getModel().getType() === 'infinite') {
|
||||
return updateGridData(dataRef, data, gridRef);
|
||||
}
|
||||
|
||||
const update: Position[] = [];
|
||||
const add: Position[] = [];
|
||||
data?.forEach((d) => {
|
||||
const rowNode = gridRef.current?.api?.getRowNode(d.marketId);
|
||||
if (rowNode) {
|
||||
if (!isEqual(rowNode.data, d)) {
|
||||
update.push(d);
|
||||
}
|
||||
} else {
|
||||
add.push(d);
|
||||
}
|
||||
});
|
||||
gridRef.current?.api?.applyTransaction({
|
||||
update,
|
||||
add,
|
||||
addIndex: 0,
|
||||
});
|
||||
return true;
|
||||
},
|
||||
[gridRef, clientSideModel]
|
||||
[gridRef]
|
||||
);
|
||||
const { data, error, loading, reload } = useDataProvider({
|
||||
dataProvider: positionsMetricsProvider,
|
||||
|
||||
Reference in New Issue
Block a user