diff --git a/apps/explorer/src/app/components/markets/market-details.tsx b/apps/explorer/src/app/components/markets/market-details.tsx
index 405f354a9..2b642a6d3 100644
--- a/apps/explorer/src/app/components/markets/market-details.tsx
+++ b/apps/explorer/src/app/components/markets/market-details.tsx
@@ -184,9 +184,8 @@ export const MarketDetails = ({
content: (
<>
- {`For liquidity orders count towards a commitment they have to be
- within either the liquidity or price monitoring bounds (whichever is
- tighter).`}
+ {`For liquidity orders to count towards a commitment, they must be
+ within the liquidity monitoring bounds.`}
{`The liquidity price range is a ${liquidityPriceRange} difference from the mid
diff --git a/apps/static/src/assets/mainnet-tranches.json b/apps/static/src/assets/mainnet-tranches.json
index 5a7d0565d..b10594895 100644
--- a/apps/static/src/assets/mainnet-tranches.json
+++ b/apps/static/src/assets/mainnet-tranches.json
@@ -2761,7 +2761,7 @@
"tranche_end": "2023-12-05T00:00:00.000Z",
"total_added": "86666.297",
"total_removed": "0",
- "locked_amount": "66600.6885662553549491123",
+ "locked_amount": "66423.0550858143113891258",
"deposits": [
{
"amount": "86666.297",
@@ -2827,7 +2827,7 @@
"tranche_end": "2023-06-01T00:00:00.000Z",
"total_added": "2500",
"total_removed": "0",
- "locked_amount": "1284.23843228530725",
+ "locked_amount": "1273.962148962149",
"deposits": [
{
"amount": "2500",
@@ -3214,8 +3214,8 @@
"tranche_start": "2023-02-01T00:00:00.000Z",
"tranche_end": "2023-08-01T00:00:00.000Z",
"total_added": "37500",
- "total_removed": "3295.491386325",
- "locked_amount": "32008.126630601595",
+ "total_removed": "3376.096819125",
+ "locked_amount": "31853.1307550644575",
"deposits": [
{
"amount": "7500",
@@ -3234,6 +3234,11 @@
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
"tx": "0xe69c28fbcb90092d264d098874523f580e45052a36a71b3f423431e84d4ca074"
},
+ {
+ "amount": "80.6054328",
+ "user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
+ "tx": "0x1a73c48a20c37eb5f8214ecb3c1986d0b6a24ae6472533c556ec6c264814abb6"
+ },
{
"amount": "142.173112275",
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
@@ -3288,6 +3293,12 @@
"tranche_id": 34,
"tx": "0xe69c28fbcb90092d264d098874523f580e45052a36a71b3f423431e84d4ca074"
},
+ {
+ "amount": "80.6054328",
+ "user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
+ "tranche_id": 34,
+ "tx": "0x1a73c48a20c37eb5f8214ecb3c1986d0b6a24ae6472533c556ec6c264814abb6"
+ },
{
"amount": "142.173112275",
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
@@ -3326,8 +3337,8 @@
}
],
"total_tokens": "7500",
- "withdrawn_tokens": "1020.378203625",
- "remaining_tokens": "6479.621796375"
+ "withdrawn_tokens": "1100.983636425",
+ "remaining_tokens": "6399.016363575"
},
{
"address": "0x0B4e6fcE839B01ef43DA6F890FAC7B1Afb004600",
@@ -3359,7 +3370,7 @@
"tranche_end": "2023-12-05T00:00:00.000Z",
"total_added": "129999.45",
"total_removed": "0",
- "locked_amount": "66539.923817958609949455",
+ "locked_amount": "66362.45240571775784592",
"deposits": [
{
"amount": "129999.45",
@@ -3425,7 +3436,7 @@
"tranche_end": "2023-09-03T00:00:00.000Z",
"total_added": "62600",
"total_removed": "0",
- "locked_amount": "32156.25787037037408",
+ "locked_amount": "32027.95129375950986",
"deposits": [
{
"amount": "10000",
@@ -3618,7 +3629,7 @@
"tranche_end": "2023-09-17T00:00:00.000Z",
"total_added": "5000",
"total_removed": "0",
- "locked_amount": "2760.1720256215125",
+ "locked_amount": "2749.923896499239",
"deposits": [
{
"amount": "5000",
@@ -3829,7 +3840,7 @@
"tranche_end": "2023-04-05T00:00:00.000Z",
"total_added": "97499.58",
"total_removed": "0",
- "locked_amount": "8491.6684140496565878092",
+ "locked_amount": "8317.5854908512324839724",
"deposits": [
{
"amount": "97499.58",
@@ -3862,7 +3873,7 @@
"tranche_end": "2023-04-05T00:00:00.000Z",
"total_added": "135173.4239508",
"total_removed": "98230.390980249184455396",
- "locked_amount": "11606.644696613363239057508256",
+ "locked_amount": "11368.703394764008547704146912",
"deposits": [
{
"amount": "135173.4239508",
@@ -3908,7 +3919,7 @@
"tranche_end": "2023-04-05T00:00:00.000Z",
"total_added": "32499.86",
"total_removed": "0",
- "locked_amount": "3572.2982585208873489478",
+ "locked_amount": "3499.0645789825988556482",
"deposits": [
{
"amount": "32499.86",
@@ -3941,7 +3952,7 @@
"tranche_end": "2023-04-05T00:00:00.000Z",
"total_added": "10833.29",
"total_removed": "0",
- "locked_amount": "1162.7484183867779537778",
+ "locked_amount": "1138.9115663398697575689",
"deposits": [
{
"amount": "10833.29",
@@ -3974,7 +3985,7 @@
"tranche_end": "2023-04-05T00:00:00.000Z",
"total_added": "22749.93",
"total_removed": "4720.860935375",
- "locked_amount": "4346.6132830988218703751",
+ "locked_amount": "4257.5058062827227483966",
"deposits": [
{
"amount": "6500",
@@ -4125,8 +4136,8 @@
"tranche_start": "2022-11-01T00:00:00.000Z",
"tranche_end": "2023-05-01T00:00:00.000Z",
"total_added": "22500",
- "total_removed": "4832.532899775",
- "locked_amount": "7768.411889963167125",
+ "total_removed": "4913.13257745",
+ "locked_amount": "7675.414364640885075",
"deposits": [
{
"amount": "7500",
@@ -4145,6 +4156,11 @@
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
"tx": "0xe098f85d049dae2f5ab1d8057e7ca1d1a02bc6c95602a8db87e2d78013e236a3"
},
+ {
+ "amount": "80.599677675",
+ "user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
+ "tx": "0xe5b0236fdb114d861139db0bdec5bdc26b4e107ff73eb66bc4ba262a003fd872"
+ },
{
"amount": "142.17311235",
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
@@ -4254,6 +4270,12 @@
"tranche_id": 33,
"tx": "0xe098f85d049dae2f5ab1d8057e7ca1d1a02bc6c95602a8db87e2d78013e236a3"
},
+ {
+ "amount": "80.599677675",
+ "user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
+ "tranche_id": 33,
+ "tx": "0xe5b0236fdb114d861139db0bdec5bdc26b4e107ff73eb66bc4ba262a003fd872"
+ },
{
"amount": "142.17311235",
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
@@ -4364,8 +4386,8 @@
}
],
"total_tokens": "7500",
- "withdrawn_tokens": "4832.532899775",
- "remaining_tokens": "2667.467100225"
+ "withdrawn_tokens": "4913.13257745",
+ "remaining_tokens": "2586.86742255"
},
{
"address": "0x2539b51EbDE65a75672aBcfE9439a706a99D18D1",
@@ -4390,7 +4412,7 @@
"tranche_end": "2023-06-02T00:00:00.000Z",
"total_added": "1939928.38",
"total_removed": "928642.9598472029154",
- "locked_amount": "502215.87592198306198629",
+ "locked_amount": "498239.748616742685424742",
"deposits": [
{
"amount": "1852091.69",
@@ -36770,7 +36792,7 @@
"tranche_end": "2023-06-05T00:00:00.000Z",
"total_added": "3732368.4671",
"total_removed": "615950.831401702010493",
- "locked_amount": "796232.273024709558568810279",
+ "locked_amount": "790122.349697050685985728513",
"deposits": [
{
"amount": "1998.95815",
@@ -38118,8 +38140,8 @@
"tranche_start": "2022-06-05T00:00:00.000Z",
"tranche_end": "2023-12-05T00:00:00.000Z",
"total_added": "15870102.715470999700000001",
- "total_removed": "581409.88924190582035452",
- "locked_amount": "8123076.1027882686093883722947201633400919",
+ "total_removed": "581783.18955280438622952",
+ "locked_amount": "8101410.7069629630393713585116348828548256",
"deposits": [
{
"amount": "16249.93",
@@ -38638,6 +38660,11 @@
"user": "0xe3eB4CF43C072658401996b71D43eE26E573562D",
"tx": "0x525f9427c131bc2fdea7f556d16b7781faaa41e09c7735d1c02d1f7585cc49ab"
},
+ {
+ "amount": "373.300310898565875",
+ "user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
+ "tx": "0x9e97de704d81fdca889591198e04f05367514f11f4a1eddcbd6363aadb861955"
+ },
{
"amount": "535.4042378778335",
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
@@ -40413,6 +40440,12 @@
"tranche_id": 2,
"tx": "0x2d99d4051c6ac81037db1eebf0f86b335ed9d1957f281134d07da192644a6a8c"
},
+ {
+ "amount": "373.300310898565875",
+ "user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
+ "tranche_id": 2,
+ "tx": "0x9e97de704d81fdca889591198e04f05367514f11f4a1eddcbd6363aadb861955"
+ },
{
"amount": "535.4042378778335",
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
@@ -41627,8 +41660,8 @@
}
],
"total_tokens": "259998.8875",
- "withdrawn_tokens": "126575.552865965027",
- "remaining_tokens": "133423.334634034973"
+ "withdrawn_tokens": "126948.853176863592875",
+ "remaining_tokens": "133050.034323136407125"
},
{
"address": "0x89051CAb67Bc7F8CC44F7e270c6EDaf1EC57676c",
@@ -43871,8 +43904,8 @@
"tranche_start": "2021-11-05T00:00:00.000Z",
"tranche_end": "2023-05-05T00:00:00.000Z",
"total_added": "14597706.0446472999",
- "total_removed": "5576016.212508497282613906",
- "locked_amount": "1777726.765473197066260457387430519",
+ "total_removed": "5576533.539587892391509156",
+ "locked_amount": "1757725.410382134892287839107650954",
"deposits": [
{
"amount": "129284.449",
@@ -44091,6 +44124,11 @@
"user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b",
"tx": "0xb4d9a135d2cfa85e52b9bb68a09ffaecde4ae4d1fab95e6f44d4dd902e2a45c9"
},
+ {
+ "amount": "517.32707939510889525",
+ "user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b",
+ "tx": "0x07f42fed87b386a135f1b3be72112768a812687d6751cfd74e287ed3af3c16b7"
+ },
{
"amount": "800.792718381487871",
"user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b",
@@ -47058,6 +47096,12 @@
"tranche_id": 3,
"tx": "0xb4d9a135d2cfa85e52b9bb68a09ffaecde4ae4d1fab95e6f44d4dd902e2a45c9"
},
+ {
+ "amount": "517.32707939510889525",
+ "user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b",
+ "tranche_id": 3,
+ "tx": "0x07f42fed87b386a135f1b3be72112768a812687d6751cfd74e287ed3af3c16b7"
+ },
{
"amount": "800.792718381487871",
"user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b",
@@ -49574,8 +49618,8 @@
}
],
"total_tokens": "359123.469575",
- "withdrawn_tokens": "314913.2361779904076005",
- "remaining_tokens": "44210.2333970095923995"
+ "withdrawn_tokens": "315430.56325738551649575",
+ "remaining_tokens": "43692.90631761448350425"
},
{
"address": "0xBdd412797c1B78535Afc5F71503b91fAbD0160fB",
@@ -50918,8 +50962,8 @@
"tranche_start": "2021-10-05T00:00:00.000Z",
"tranche_end": "2023-04-05T00:00:00.000Z",
"total_added": "5778205.3912159303",
- "total_removed": "3055768.040200763217391295",
- "locked_amount": "385487.193100244108102591696423251",
+ "total_removed": "3063522.787392713967070295",
+ "locked_amount": "377584.536736576014422212956155541",
"deposits": [
{
"amount": "552496.6455",
@@ -51063,6 +51107,11 @@
}
],
"withdrawals": [
+ {
+ "amount": "7754.747191950749679",
+ "user": "0xafa64cCa337eFEE0AD827F6C2684e69275226e90",
+ "tx": "0xb1d21b6f9cce4bfaf8870592e4cbc7a40f1ca7c13cd7c8c8bb1defeb49bc31b8"
+ },
{
"amount": "990.74735267405816",
"user": "0xBc934494675a6ceB639B9EfEe5b9C0f017D35a75",
@@ -52606,6 +52655,12 @@
}
],
"withdrawals": [
+ {
+ "amount": "7754.747191950749679",
+ "user": "0xafa64cCa337eFEE0AD827F6C2684e69275226e90",
+ "tranche_id": 4,
+ "tx": "0xb1d21b6f9cce4bfaf8870592e4cbc7a40f1ca7c13cd7c8c8bb1defeb49bc31b8"
+ },
{
"amount": "4961.957448767374506",
"user": "0xafa64cCa337eFEE0AD827F6C2684e69275226e90",
@@ -52854,8 +52909,8 @@
}
],
"total_tokens": "331498.5873",
- "withdrawn_tokens": "301699.732563421740393",
- "remaining_tokens": "29798.854736578259607"
+ "withdrawn_tokens": "309454.479755372490072",
+ "remaining_tokens": "22044.107544627509928"
},
{
"address": "0x16da609341ed67750A8BCC5AAa2005471006Cd77",
@@ -52957,8 +53012,8 @@
"tranche_start": "2022-06-05T00:00:00.000Z",
"tranche_end": "2023-06-05T00:00:00.000Z",
"total_added": "472355.6199999996",
- "total_removed": "34416.2282090650685",
- "locked_amount": "126167.555118478468636691490005064",
+ "total_removed": "34799.2735287010685",
+ "locked_amount": "125199.40284140018681746501978692",
"deposits": [
{
"amount": "3000",
@@ -59592,6 +59647,16 @@
"user": "0x7708B79e2bc3b7ab816E66aF33A8c9385f0FcA4b",
"tx": "0x1c5bff9afd9ddc3c385d5a089f9784606b0bac24e59dba9f16e1445e52a9c41b"
},
+ {
+ "amount": "191.524581432",
+ "user": "0x256274a216e0a349dC18cae08Ca45631176AF437",
+ "tx": "0xdc17c6673a771c209d6a3f8aaf89d12289034073da28c19047ff704b1fbf4fe2"
+ },
+ {
+ "amount": "191.520738204",
+ "user": "0xB3ae40b11af91BbD456022Bd42B4f36A8C0AEA9D",
+ "tx": "0x7d1caeef005902492763cabe888b5dc76fd9f224520323ac30c1927ae91a1778"
+ },
{
"amount": "57.900076104",
"user": "0x96d882E908C06cD697Ea07266Fb8D14ae129A50b",
@@ -81501,6 +81566,12 @@
}
],
"withdrawals": [
+ {
+ "amount": "191.520738204",
+ "user": "0xB3ae40b11af91BbD456022Bd42B4f36A8C0AEA9D",
+ "tranche_id": 5,
+ "tx": "0x7d1caeef005902492763cabe888b5dc76fd9f224520323ac30c1927ae91a1778"
+ },
{
"amount": "102.196144088",
"user": "0xB3ae40b11af91BbD456022Bd42B4f36A8C0AEA9D",
@@ -81509,8 +81580,8 @@
}
],
"total_tokens": "400",
- "withdrawn_tokens": "102.196144088",
- "remaining_tokens": "297.803855912"
+ "withdrawn_tokens": "293.716882292",
+ "remaining_tokens": "106.283117708"
},
{
"address": "0x256274a216e0a349dC18cae08Ca45631176AF437",
@@ -81523,6 +81594,12 @@
}
],
"withdrawals": [
+ {
+ "amount": "191.524581432",
+ "user": "0x256274a216e0a349dC18cae08Ca45631176AF437",
+ "tranche_id": 5,
+ "tx": "0xdc17c6673a771c209d6a3f8aaf89d12289034073da28c19047ff704b1fbf4fe2"
+ },
{
"amount": "102.190930996",
"user": "0x256274a216e0a349dC18cae08Ca45631176AF437",
@@ -81531,8 +81608,8 @@
}
],
"total_tokens": "400",
- "withdrawn_tokens": "102.190930996",
- "remaining_tokens": "297.809069004"
+ "withdrawn_tokens": "293.715512428",
+ "remaining_tokens": "106.284487572"
},
{
"address": "0xB0473C4FeBd722a6d7eE561329d3134030318132",
diff --git a/apps/token/src/routes/rewards/epoch-individual-rewards/epoch-individual-rewards-table.tsx b/apps/token/src/routes/rewards/epoch-individual-rewards/epoch-individual-rewards-table.tsx
index 60f9affb2..3a38e8098 100644
--- a/apps/token/src/routes/rewards/epoch-individual-rewards/epoch-individual-rewards-table.tsx
+++ b/apps/token/src/routes/rewards/epoch-individual-rewards/epoch-individual-rewards-table.tsx
@@ -50,10 +50,11 @@ const DisplayReward = ({
>
- {formatNumber(toBigNum(reward, decimals))}
+ {formatNumber(toBigNum(reward, decimals), 4)}
{percentageOfTotal && (
- ({formatNumber(toBigNum(percentageOfTotal, 4)).toString()}%)
+ ({formatNumber(percentageOfTotal, 4).toString()}
+ %)
)}
diff --git a/apps/token/src/routes/rewards/epoch-individual-rewards/generate-epoch-individual-rewards-list.spec.ts b/apps/token/src/routes/rewards/epoch-individual-rewards/generate-epoch-individual-rewards-list.spec.ts
index 9ac901f4f..f0e390136 100644
--- a/apps/token/src/routes/rewards/epoch-individual-rewards/generate-epoch-individual-rewards-list.spec.ts
+++ b/apps/token/src/routes/rewards/epoch-individual-rewards/generate-epoch-individual-rewards-list.spec.ts
@@ -8,7 +8,7 @@ describe('generateEpochIndividualRewardsList', () => {
amount: '100',
percentageOfTotal: '0.1',
receivedAt: new Date(),
- asset: { id: 'usd', symbol: 'USD' },
+ asset: { id: 'usd', symbol: 'USD', name: 'USD' },
party: { id: 'blah' },
epoch: { id: '1' },
};
@@ -18,7 +18,7 @@ describe('generateEpochIndividualRewardsList', () => {
amount: '50',
percentageOfTotal: '0.05',
receivedAt: new Date(),
- asset: { id: 'eur', symbol: 'EUR' },
+ asset: { id: 'eur', symbol: 'EUR', name: 'EUR' },
party: { id: 'blah' },
epoch: { id: '2' },
};
@@ -28,7 +28,7 @@ describe('generateEpochIndividualRewardsList', () => {
amount: '200',
percentageOfTotal: '0.2',
receivedAt: new Date(),
- asset: { id: 'gbp', symbol: 'GBP' },
+ asset: { id: 'gbp', symbol: 'GBP', name: 'GBP' },
party: { id: 'blah' },
epoch: { id: '2' },
};
@@ -38,7 +38,7 @@ describe('generateEpochIndividualRewardsList', () => {
amount: '100',
percentageOfTotal: '0.1',
receivedAt: new Date(),
- asset: { id: 'usd', symbol: 'USD' },
+ asset: { id: 'usd', symbol: 'USD', name: 'USD' },
party: { id: 'blah' },
epoch: { id: '1' },
};
@@ -48,7 +48,7 @@ describe('generateEpochIndividualRewardsList', () => {
amount: '50',
percentageOfTotal: '0.05',
receivedAt: new Date(),
- asset: { id: 'eur', symbol: 'EUR' },
+ asset: { id: 'eur', symbol: 'EUR', name: 'EUR' },
party: { id: 'blah' },
epoch: { id: '2' },
};
@@ -134,20 +134,20 @@ describe('generateEpochIndividualRewardsList', () => {
epoch: '2',
rewards: [
{
- asset: 'EUR',
- totalAmount: '50',
+ asset: 'GBP',
+ totalAmount: '200',
rewardTypes: {
[AccountType.ACCOUNT_TYPE_FEES_INFRASTRUCTURE]: {
amount: '0',
percentageOfTotal: '0',
},
[AccountType.ACCOUNT_TYPE_FEES_LIQUIDITY]: {
- amount: '0',
- percentageOfTotal: '0',
+ amount: '200',
+ percentageOfTotal: '0.2',
},
[AccountType.ACCOUNT_TYPE_GLOBAL_REWARD]: {
- amount: '50',
- percentageOfTotal: '0.05',
+ amount: '0',
+ percentageOfTotal: '0',
},
[AccountType.ACCOUNT_TYPE_REWARD_MAKER_PAID_FEES]: {
amount: '0',
@@ -164,21 +164,21 @@ describe('generateEpochIndividualRewardsList', () => {
},
},
{
- asset: 'GBP',
- totalAmount: '200',
+ asset: 'EUR',
+ totalAmount: '50',
rewardTypes: {
[AccountType.ACCOUNT_TYPE_FEES_INFRASTRUCTURE]: {
amount: '0',
percentageOfTotal: '0',
},
[AccountType.ACCOUNT_TYPE_FEES_LIQUIDITY]: {
- amount: '200',
- percentageOfTotal: '0.2',
- },
- [AccountType.ACCOUNT_TYPE_GLOBAL_REWARD]: {
amount: '0',
percentageOfTotal: '0',
},
+ [AccountType.ACCOUNT_TYPE_GLOBAL_REWARD]: {
+ amount: '50',
+ percentageOfTotal: '0.05',
+ },
[AccountType.ACCOUNT_TYPE_REWARD_MAKER_PAID_FEES]: {
amount: '0',
percentageOfTotal: '0',
diff --git a/apps/token/src/routes/rewards/epoch-individual-rewards/generate-epoch-individual-rewards-list.ts b/apps/token/src/routes/rewards/epoch-individual-rewards/generate-epoch-individual-rewards-list.ts
index 712d9f5c5..285afa1a2 100644
--- a/apps/token/src/routes/rewards/epoch-individual-rewards/generate-epoch-individual-rewards-list.ts
+++ b/apps/token/src/routes/rewards/epoch-individual-rewards/generate-epoch-individual-rewards-list.ts
@@ -33,7 +33,7 @@ export const generateEpochIndividualRewardsList = (
// We take the rewards and aggregate them by epoch and asset.
const epochIndividualRewards = rewards.reduce((map, reward) => {
const epochId = reward.epoch.id;
- const assetName = reward.asset.symbol;
+ const assetName = reward.asset.name;
const rewardType = reward.rewardType;
const amount = reward.amount;
const percentageOfTotal = reward.percentageOfTotal;
@@ -70,6 +70,12 @@ export const generateEpochIndividualRewardsList = (
'0'
);
+ if (epoch) {
+ epoch.rewards = epoch.rewards.sort((a, b) => {
+ return new BigNumber(b.totalAmount).comparedTo(a.totalAmount);
+ });
+ }
+
return map;
}, new Map());
diff --git a/apps/token/src/routes/rewards/epoch-total-rewards/generate-epoch-total-rewards-list.ts b/apps/token/src/routes/rewards/epoch-total-rewards/generate-epoch-total-rewards-list.ts
index 35407846c..dc35bf97a 100644
--- a/apps/token/src/routes/rewards/epoch-total-rewards/generate-epoch-total-rewards-list.ts
+++ b/apps/token/src/routes/rewards/epoch-total-rewards/generate-epoch-total-rewards-list.ts
@@ -5,6 +5,7 @@ import type {
import { removePaginationWrapper } from '@vegaprotocol/react-helpers';
import { RowAccountTypes } from '../shared-rewards-table-assets/shared-rewards-table-assets';
import type { AccountType } from '@vegaprotocol/types';
+import { BigNumber } from '../../../lib/bignumber';
interface EpochSummaryWithNamedReward extends EpochRewardSummaryFieldsFragment {
name: string;
@@ -120,7 +121,9 @@ export const generateEpochTotalRewardsList = (
return {
epoch: epochSummaries[0].epoch,
- assetRewards,
+ assetRewards: assetRewards.sort((a, b) => {
+ return new BigNumber(b.totalAmount).comparedTo(a.totalAmount);
+ }),
};
});
diff --git a/apps/token/src/routes/rewards/home/Rewards.graphql b/apps/token/src/routes/rewards/home/Rewards.graphql
index ec4e71345..0959973e8 100644
--- a/apps/token/src/routes/rewards/home/Rewards.graphql
+++ b/apps/token/src/routes/rewards/home/Rewards.graphql
@@ -3,6 +3,7 @@ fragment RewardFields on Reward {
asset {
id
symbol
+ name
}
party {
id
diff --git a/apps/token/src/routes/rewards/home/__generated__/Rewards.ts b/apps/token/src/routes/rewards/home/__generated__/Rewards.ts
index 1d48da049..5242823d1 100644
--- a/apps/token/src/routes/rewards/home/__generated__/Rewards.ts
+++ b/apps/token/src/routes/rewards/home/__generated__/Rewards.ts
@@ -3,7 +3,7 @@ import * as Types from '@vegaprotocol/types';
import { gql } from '@apollo/client';
import * as Apollo from '@apollo/client';
const defaultOptions = {} as const;
-export type RewardFieldsFragment = { __typename?: 'Reward', rewardType: Types.AccountType, amount: string, percentageOfTotal: string, receivedAt: any, asset: { __typename?: 'Asset', id: string, symbol: string }, party: { __typename?: 'Party', id: string }, epoch: { __typename?: 'Epoch', id: string } };
+export type RewardFieldsFragment = { __typename?: 'Reward', rewardType: Types.AccountType, amount: string, percentageOfTotal: string, receivedAt: any, asset: { __typename?: 'Asset', id: string, symbol: string, name: string }, party: { __typename?: 'Party', id: string }, epoch: { __typename?: 'Epoch', id: string } };
export type DelegationFieldsFragment = { __typename?: 'Delegation', amount: string, epoch: number };
@@ -13,7 +13,7 @@ export type RewardsQueryVariables = Types.Exact<{
}>;
-export type RewardsQuery = { __typename?: 'Query', party?: { __typename?: 'Party', id: string, rewardsConnection?: { __typename?: 'RewardsConnection', edges?: Array<{ __typename?: 'RewardEdge', node: { __typename?: 'Reward', rewardType: Types.AccountType, amount: string, percentageOfTotal: string, receivedAt: any, asset: { __typename?: 'Asset', id: string, symbol: string }, party: { __typename?: 'Party', id: string }, epoch: { __typename?: 'Epoch', id: string } } } | null> | null } | null, delegationsConnection?: { __typename?: 'DelegationsConnection', edges?: Array<{ __typename?: 'DelegationEdge', node: { __typename?: 'Delegation', amount: string, epoch: number } } | null> | null } | null } | null, epoch: { __typename?: 'Epoch', id: string, timestamps: { __typename?: 'EpochTimestamps', start?: any | null, end?: any | null, expiry?: any | null } } };
+export type RewardsQuery = { __typename?: 'Query', party?: { __typename?: 'Party', id: string, rewardsConnection?: { __typename?: 'RewardsConnection', edges?: Array<{ __typename?: 'RewardEdge', node: { __typename?: 'Reward', rewardType: Types.AccountType, amount: string, percentageOfTotal: string, receivedAt: any, asset: { __typename?: 'Asset', id: string, symbol: string, name: string }, party: { __typename?: 'Party', id: string }, epoch: { __typename?: 'Epoch', id: string } } } | null> | null } | null, delegationsConnection?: { __typename?: 'DelegationsConnection', edges?: Array<{ __typename?: 'DelegationEdge', node: { __typename?: 'Delegation', amount: string, epoch: number } } | null> | null } | null } | null, epoch: { __typename?: 'Epoch', id: string, timestamps: { __typename?: 'EpochTimestamps', start?: any | null, end?: any | null, expiry?: any | null } } };
export type EpochRewardSummaryFieldsFragment = { __typename?: 'EpochRewardSummary', epoch: number, assetId: string, amount: string, rewardType: Types.AccountType };
@@ -37,6 +37,7 @@ export const RewardFieldsFragmentDoc = gql`
asset {
id
symbol
+ name
}
party {
id
diff --git a/apps/trading-e2e/src/integration/market-info.cy.ts b/apps/trading-e2e/src/integration/market-info.cy.ts
index 635d388e8..0ddb90747 100644
--- a/apps/trading-e2e/src/integration/market-info.cy.ts
+++ b/apps/trading-e2e/src/integration/market-info.cy.ts
@@ -125,20 +125,12 @@ describe('market info is displayed', { tags: '@smoke' }, () => {
validateMarketDataRow(1, 'Long', '0.008508132993273576');
});
- it('price monitoring trigger displayed', () => {
- cy.getByTestId(marketTitle).contains('Price monitoring trigger 1').click();
-
- validateMarketDataRow(0, 'Horizon Secs', '43,200');
- validateMarketDataRow(1, 'Probability', '1');
- validateMarketDataRow(2, 'Auction Extension Secs', '600');
- });
-
it('price monitoring bound displayed', () => {
cy.getByTestId(marketTitle).contains('Price monitoring bound 1').click();
- validateMarketDataRow(0, 'Min Valid Price', '6.54701 ');
- validateMarketDataRow(1, 'Max Valid Price', '7.97323 ');
- validateMarketDataRow(2, 'Reference Price', '7.22625 ');
+ validateMarketDataRow(0, 'Highest Price', '6.54701 BTC');
+ validateMarketDataRow(1, 'Lowest Price', '7.97323 BTC');
+ validateMarketDataRow(2, 'Reference Price', '7.22625 BTC');
});
it('liquidity monitoring parameters displayed', () => {
diff --git a/libs/assets/src/lib/asset-details-dialog.tsx b/libs/assets/src/lib/asset-details-dialog.tsx
index 4c581df8f..a45789b3a 100644
--- a/libs/assets/src/lib/asset-details-dialog.tsx
+++ b/libs/assets/src/lib/asset-details-dialog.tsx
@@ -98,7 +98,7 @@ export const AssetDetailsDialog = ({
}}
>
{content}
-
+
{t(
'There is 1 unit of the settlement asset (%s) to every 1 quote unit.',
[assetSymbol]
diff --git a/libs/deal-ticket/src/components/deal-ticket/deal-ticket-button.tsx b/libs/deal-ticket/src/components/deal-ticket/deal-ticket-button.tsx
index 5960612bd..1eae3d5a6 100644
--- a/libs/deal-ticket/src/components/deal-ticket/deal-ticket-button.tsx
+++ b/libs/deal-ticket/src/components/deal-ticket/deal-ticket-button.tsx
@@ -12,7 +12,7 @@ export const DealTicketButton = ({ disabled, variant }: Props) => {
const { pubKey, isReadOnly } = useVegaWallet();
const isDisabled = !pubKey || isReadOnly || disabled;
return (
-
+
{details.map(({ label, value, labelDescription, symbol }) => (
diff --git a/libs/deal-ticket/src/components/deal-ticket/deal-ticket-limit-amount.tsx b/libs/deal-ticket/src/components/deal-ticket/deal-ticket-limit-amount.tsx
index f990b2a26..31136e5c2 100644
--- a/libs/deal-ticket/src/components/deal-ticket/deal-ticket-limit-amount.tsx
+++ b/libs/deal-ticket/src/components/deal-ticket/deal-ticket-limit-amount.tsx
@@ -38,7 +38,7 @@ export const DealTicketLimitAmount = ({
};
return (
-
+
+
-
Size
+
{t('Size')}
{isMarketInAuction(marketData.marketTradingMode) && (
diff --git a/libs/deal-ticket/src/components/deal-ticket/deal-ticket.tsx b/libs/deal-ticket/src/components/deal-ticket/deal-ticket.tsx
index ac7848783..0b0aaefa0 100644
--- a/libs/deal-ticket/src/components/deal-ticket/deal-ticket.tsx
+++ b/libs/deal-ticket/src/components/deal-ticket/deal-ticket.tsx
@@ -307,7 +307,7 @@ const SummaryMessage = memo(
);
if (isReadOnly) {
return (
-
+
{
'You need to connect your own wallet to start trading on this market'
@@ -318,7 +318,7 @@ const SummaryMessage = memo(
}
if (!pubKey) {
return (
-
+
+
+
{errorMessage}
@@ -368,7 +368,7 @@ const SummaryMessage = memo(
// balance render the margin warning, but still allow submission
if (balanceError) {
return (
-
+
;
);
@@ -383,7 +383,7 @@ const SummaryMessage = memo(
].includes(marketData.marketTradingMode)
) {
return (
-
+
{
}}
decimalPlaces={market.decimalPlaces}
/>
-
+
{t(
'There is 1 unit of the settlement asset (%s) to every 1 quote unit (%s).',
[assetSymbol, quoteUnit]
@@ -249,7 +249,7 @@ export const Info = ({ market, onSelect }: InfoProps) => {
dtClassName="text-black dark:text-white text-ui !px-0 !font-normal"
ddClassName="text-black dark:text-white text-ui !px-0 !font-normal max-w-full"
/>
-
+
{t(
'There is 1 unit of the settlement asset (%s) to every 1 quote unit (%s).',
[assetSymbol, quoteUnit]
@@ -309,27 +309,40 @@ export const Info = ({ market, onSelect }: InfoProps) => {
),
},
...(market.priceMonitoringSettings?.parameters?.triggers || []).map(
- (trigger, i) => ({
- title: t(`Price monitoring trigger ${i + 1}`),
- content: ,
- })
+ (trigger, i) => {
+ const bounds = market.data?.priceMonitoringBounds?.[i];
+ return {
+ title: t(`Price monitoring bounds ${i + 1}`),
+ content: (
+
+
+
+ {t('%s% probability of trading', [
+ formatNumber(trigger.probability * 100),
+ ])}
+
+
+ {t('Within %s seconds', [formatNumber(trigger.horizonSecs)])}
+
+
+
+ {bounds && (
+
+ )}
+
+
+ ),
+ };
+ }
),
- ...(market.data?.priceMonitoringBounds || []).map((trigger, i) => ({
- title: t(`Price monitoring bound ${i + 1}`),
- content: (
- <>
-
-
- >
- ),
- })),
{
title: t('Liquidity monitoring parameters'),
content: (
@@ -369,37 +382,38 @@ export const Info = ({ market, onSelect }: InfoProps) => {
content: (
<>
- {`For liquidity orders count towards a commitment they have to be
- within either the liquidity or price monitoring bounds (whichever is
- tighter).`}
+ {`For liquidity orders to count towards a commitment, they must be
+ within the liquidity monitoring bounds.`}
{`The liquidity price range is a ${liquidityPriceRange} difference from the mid
price.`}
-
+
+
+
>
),
},
diff --git a/libs/react-helpers/src/lib/format/number.spec.tsx b/libs/react-helpers/src/lib/format/number.spec.tsx
index 0dccbc44b..21a6bdb4d 100644
--- a/libs/react-helpers/src/lib/format/number.spec.tsx
+++ b/libs/react-helpers/src/lib/format/number.spec.tsx
@@ -6,6 +6,7 @@ import {
formatNumber,
formatNumberPercentage,
isNumeric,
+ toDecimal,
toNumberParts,
} from './number';
@@ -197,3 +198,20 @@ describe('compactNumber', () => {
}
);
});
+
+describe('toDecimal', () => {
+ it.each([
+ { v: 0, o: '1' },
+ { v: 1, o: '0.1' },
+ { v: 2, o: '0.01' },
+ { v: 3, o: '0.001' },
+ { v: 4, o: '0.0001' },
+ { v: 5, o: '0.00001' },
+ { v: 6, o: '0.000001' },
+ { v: 7, o: '0.0000001' },
+ { v: 8, o: '0.00000001' },
+ { v: 9, o: '0.000000001' },
+ ])('formats with toNumber given number correctly', ({ v, o }) => {
+ expect(toDecimal(v)).toStrictEqual(o);
+ });
+});
diff --git a/libs/ui-toolkit/package.json b/libs/ui-toolkit/package.json
index 1cf3c7443..2db4f5996 100644
--- a/libs/ui-toolkit/package.json
+++ b/libs/ui-toolkit/package.json
@@ -1,4 +1,4 @@
{
"name": "@vegaprotocol/ui-toolkit",
- "version": "0.0.1"
+ "version": "0.7.0"
}
diff --git a/libs/ui-toolkit/src/components/form-group/form-group.tsx b/libs/ui-toolkit/src/components/form-group/form-group.tsx
index 0ad57fc65..1242aea9f 100644
--- a/libs/ui-toolkit/src/components/form-group/form-group.tsx
+++ b/libs/ui-toolkit/src/components/form-group/form-group.tsx
@@ -20,7 +20,7 @@ export const FormGroup = ({
labelAlign = 'left',
hideLabel = false,
}: FormGroupProps) => {
- const wrapperClasses = classNames('relative mb-6', className);
+ const wrapperClasses = classNames('relative mb-2', className);
const labelClasses = classNames('block mb-2 text-sm', {
'text-right': labelAlign === 'right',
'sr-only': hideLabel,
diff --git a/libs/ui-toolkit/src/components/key-value-table/key-value-table.tsx b/libs/ui-toolkit/src/components/key-value-table/key-value-table.tsx
index 639cbaf57..c46a3183d 100644
--- a/libs/ui-toolkit/src/components/key-value-table/key-value-table.tsx
+++ b/libs/ui-toolkit/src/components/key-value-table/key-value-table.tsx
@@ -24,11 +24,7 @@ export const KeyValueTable = ({
return (
{title && {title} }
-
+
{children &&
React.Children.map(
diff --git a/libs/ui-toolkit/src/components/nav/nav.tsx b/libs/ui-toolkit/src/components/nav/nav.tsx
index 80eed0617..5b2e19ae8 100644
--- a/libs/ui-toolkit/src/components/nav/nav.tsx
+++ b/libs/ui-toolkit/src/components/nav/nav.tsx
@@ -50,7 +50,7 @@ export const Nav = ({
title,
}: NavbarProps) => {
const themeWrapperClasses = classNames(
- 'w-full overflow-y-hidden overflow-x-auto md:overflow-x-hidden font-alpha calt lg:text-lg',
+ 'w-full overflow-y-hidden overflow-x-auto md:overflow-x-hidden font-alpha lg:text-lg',
{
dark: navbarTheme === 'dark',
}
diff --git a/libs/ui-toolkit/src/components/toast/toast.tsx b/libs/ui-toolkit/src/components/toast/toast.tsx
index c8aaafcbe..5cbc7126b 100644
--- a/libs/ui-toolkit/src/components/toast/toast.tsx
+++ b/libs/ui-toolkit/src/components/toast/toast.tsx
@@ -155,7 +155,7 @@ export const Toast = ({
'w-[320px] rounded-md overflow-hidden',
'shadow-[8px_8px_16px_0_rgba(0,0,0,0.4)]',
'text-black dark:text-white',
- 'font-alpha calt text-[14px] leading-[19px]',
+ 'font-alpha text-[14px] leading-[19px]',
// background
{
'bg-vega-light-100 dark:bg-vega-dark-100 ': intent === Intent.None,
diff --git a/package.json b/package.json
index a0a4221d8..6a6ef04f9 100644
--- a/package.json
+++ b/package.json
@@ -14,7 +14,7 @@
"vegacapsule": "vegacapsule network bootstrap --config-path=../frontend-monorepo/vegacapsule/config.hcl"
},
"engines": {
- "node": ">=16.14.0"
+ "node": ">=16.15.1"
},
"private": true,
"dependencies": {