From 282f714d5b8d5c9d1a455987695eef24749f470d Mon Sep 17 00:00:00 2001 From: Sam Keen Date: Thu, 30 Jun 2022 14:38:32 +0100 Subject: [PATCH 1/7] frontend-monorepo-678: Improved text colour for syntax highlighter light theme (#679) --- libs/tailwindcss-config/src/vega-custom-classes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/tailwindcss-config/src/vega-custom-classes.js b/libs/tailwindcss-config/src/vega-custom-classes.js index 796eb8f02..35a174bf2 100644 --- a/libs/tailwindcss-config/src/vega-custom-classes.js +++ b/libs/tailwindcss-config/src/vega-custom-classes.js @@ -13,7 +13,7 @@ const vegaCustomClasses = plugin(function ({ addUtilities }) { overflowX: 'auto', padding: '1em', background: theme.colors.white.DEFAULT, - color: theme.colors.black[25], + color: theme.colors.black[70], border: `1px solid #${theme.colors.black[40]}`, }, '.dark .syntax-highlighter-wrapper .hljs': { From 50693d2df9f601741d36b91ada76ac0c9b489bac Mon Sep 17 00:00:00 2001 From: Sam Keen Date: Thu, 30 Jun 2022 14:57:06 +0100 Subject: [PATCH 2/7] frontend-monorepo-684: Txs list item dialog close button fixed (#685) --- .../app/components/txs/txs-infinite-list-item.tsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/apps/explorer/src/app/components/txs/txs-infinite-list-item.tsx b/apps/explorer/src/app/components/txs/txs-infinite-list-item.tsx index caaad0bf7..d5870ee83 100644 --- a/apps/explorer/src/app/components/txs/txs-infinite-list-item.tsx +++ b/apps/explorer/src/app/components/txs/txs-infinite-list-item.tsx @@ -56,14 +56,14 @@ export const TxsInfiniteListItem = ({ data-testid="command-details" > - setOpen(isOpen)} - intent={Intent.None} - > - - + setOpen(false)} + intent={Intent.None} + > + + ); From 8c7a0e24a3e338b71a88b03ce5a2ae74b3f53a11 Mon Sep 17 00:00:00 2001 From: Dexter Edwards Date: Thu, 30 Jun 2022 17:27:12 +0100 Subject: [PATCH 3/7] fix: safari crashing because of date value (#692) --- libs/order-list/src/lib/components/mocks/generate-orders.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/order-list/src/lib/components/mocks/generate-orders.ts b/libs/order-list/src/lib/components/mocks/generate-orders.ts index d9c598380..2c753aa68 100644 --- a/libs/order-list/src/lib/components/mocks/generate-orders.ts +++ b/libs/order-list/src/lib/components/mocks/generate-orders.ts @@ -61,8 +61,8 @@ export const limitOrder = generateOrder({ type: OrderType.Limit, status: OrderStatus.Active, timeInForce: OrderTimeInForce.GTT, - createdAt: new Date('2022-3-3').toISOString(), - expiresAt: new Date('2022-3-5').toISOString(), + createdAt: new Date(2022, 3, 3).toISOString(), + expiresAt: new Date(2022, 3, 5).toISOString(), }); export const marketOrder = generateOrder({ From 3b4bf832c8b474fc61903ee7acfcdc17c2721f6b Mon Sep 17 00:00:00 2001 From: mattrussell36 Date: Thu, 30 Jun 2022 18:05:03 +0000 Subject: [PATCH 4/7] chore: update tranches Signed-off-by: github-actions[bot] --- apps/static/src/assets/mainnet-tranches.json | 28 +++++++++---------- apps/static/src/assets/stagnet1-tranches.json | 4 +-- apps/static/src/assets/testnet-tranches.json | 2 +- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/apps/static/src/assets/mainnet-tranches.json b/apps/static/src/assets/mainnet-tranches.json index 12291450d..dda58773b 100644 --- a/apps/static/src/assets/mainnet-tranches.json +++ b/apps/static/src/assets/mainnet-tranches.json @@ -38,7 +38,7 @@ "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "129999.45", "total_removed": "0", - "locked_amount": "123949.3351449367653555", + "locked_amount": "123890.067265786566701565", "deposits": [ { "amount": "129999.45", @@ -488,7 +488,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "97499.58", "total_removed": "0", - "locked_amount": "64804.952997247079204604", + "locked_amount": "64746.816728853410405574", "deposits": [ { "amount": "97499.58", @@ -521,7 +521,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "135173.4239508", "total_removed": "0", - "locked_amount": "88577.18263884362270361639432", + "locked_amount": "88497.72039675751099915064844", "deposits": [ { "amount": "135173.4239508", @@ -554,7 +554,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "32499.86", "total_removed": "0", - "locked_amount": "27262.324604263582721104", + "locked_amount": "27237.867680110024097052", "deposits": [ { "amount": "32499.86", @@ -587,7 +587,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "10833.29", "total_removed": "0", - "locked_amount": "8873.622111351784071168", + "locked_amount": "8865.661619864174723312", "deposits": [ { "amount": "10833.29", @@ -675,7 +675,7 @@ "tranche_end": "2022-11-01T00:00:00.000Z", "total_added": "22500", "total_removed": "0", - "locked_amount": "15101.45352128623275", + "locked_amount": "15070.90268342391525", "deposits": [ { "amount": "15000", @@ -761,7 +761,7 @@ "tranche_end": "2023-06-02T00:00:00.000Z", "total_added": "1939928.38", "total_removed": "0", - "locked_amount": "1788435.020023831121162896", + "locked_amount": "1787107.163161493363488688", "deposits": [ { "amount": "1852091.69", @@ -1777,7 +1777,7 @@ "tranche_end": "2022-09-30T00:00:00.000Z", "total_added": "60916.66666633337", "total_removed": "18705.279504739679372649", - "locked_amount": "14291.414097045104884895635487211", + "locked_amount": "14252.3902613773876264604107209508", "deposits": [ { "amount": "2833.333333", @@ -5228,7 +5228,7 @@ "tranche_end": "2022-09-03T00:00:00.000Z", "total_added": "19457.000000000000000003", "total_removed": "5056.88782409978", - "locked_amount": "3438.09619897894364166053010683028919314", + "locked_amount": "3424.7781243340945253005280533675799087", "deposits": [ { "amount": "75", @@ -14143,7 +14143,7 @@ "tranche_end": "2023-06-05T00:00:00.000Z", "total_added": "3732368.4671", "total_removed": "74162.9780761646031", - "locked_amount": "2772703.2835660003368440463", + "locked_amount": "2770662.82987924405559294256", "deposits": [ { "amount": "1998.95815", @@ -14856,7 +14856,7 @@ "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "15788853.065470999700000001", "total_removed": "8977.81072959055965", - "locked_amount": "15054047.07609322321427388182456345806299", + "locked_amount": "15046848.8007512538538970503922690393714517", "deposits": [ { "amount": "16249.93", @@ -16996,7 +16996,7 @@ "tranche_end": "2023-05-05T00:00:00.000Z", "total_added": "14597706.0446472999", "total_removed": "2158746.556523576443330677", - "locked_amount": "8247873.1795980633455589418403988", + "locked_amount": "8241193.58043665824665157181165334", "deposits": [ { "amount": "129284.449", @@ -21176,7 +21176,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "5778205.3912159303", "total_removed": "1417003.438054406291892727", - "locked_amount": "2941881.17244069509858904234270872", + "locked_amount": "2939242.02241414458373538327057732", "deposits": [ { "amount": "552496.6455", @@ -22332,7 +22332,7 @@ "tranche_end": "2023-06-05T00:00:00.000Z", "total_added": "472355.6199999996", "total_removed": "75.634316334", - "locked_amount": "439350.6847287052296870462810756", + "locked_amount": "439027.3631783082433762113089802", "deposits": [ { "amount": "3000", diff --git a/apps/static/src/assets/stagnet1-tranches.json b/apps/static/src/assets/stagnet1-tranches.json index bd07f8956..0e75a812d 100644 --- a/apps/static/src/assets/stagnet1-tranches.json +++ b/apps/static/src/assets/stagnet1-tranches.json @@ -38,7 +38,7 @@ "tranche_end": "2022-11-26T13:48:10.000Z", "total_added": "100", "total_removed": "0", - "locked_amount": "40.84151128868595", + "locked_amount": "40.7730561897514", "deposits": [ { "amount": "100", @@ -242,7 +242,7 @@ "tranche_end": "2022-10-12T00:53:20.000Z", "total_added": "1100", "total_removed": "673.04388635", - "locked_amount": "312.01857876712325", + "locked_amount": "311.2655726788432", "deposits": [ { "amount": "1000", diff --git a/apps/static/src/assets/testnet-tranches.json b/apps/static/src/assets/testnet-tranches.json index d502d2247..e040145e5 100644 --- a/apps/static/src/assets/testnet-tranches.json +++ b/apps/static/src/assets/testnet-tranches.json @@ -69,7 +69,7 @@ "tranche_end": "2022-10-12T00:53:20.000Z", "total_added": "1010.000000000000000001", "total_removed": "668.4622323651", - "locked_amount": "286.4897859589040750002836532534246575", + "locked_amount": "285.798389459665120000282968702435312", "deposits": [ { "amount": "1000", From d644988aafa88657f8c4253344df211cab026632 Mon Sep 17 00:00:00 2001 From: mattrussell36 Date: Fri, 1 Jul 2022 00:09:56 +0000 Subject: [PATCH 5/7] chore: update tranches Signed-off-by: github-actions[bot] --- apps/static/src/assets/mainnet-tranches.json | 28 +++++++++---------- apps/static/src/assets/stagnet1-tranches.json | 4 +-- apps/static/src/assets/testnet-tranches.json | 2 +- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/apps/static/src/assets/mainnet-tranches.json b/apps/static/src/assets/mainnet-tranches.json index dda58773b..9d13ebfaa 100644 --- a/apps/static/src/assets/mainnet-tranches.json +++ b/apps/static/src/assets/mainnet-tranches.json @@ -38,7 +38,7 @@ "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "129999.45", "total_removed": "0", - "locked_amount": "123890.067265786566701565", + "locked_amount": "123829.959213791937505035", "deposits": [ { "amount": "129999.45", @@ -488,7 +488,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "97499.58", "total_removed": "0", - "locked_amount": "64746.816728853410405574", + "locked_amount": "64687.856329165009438212", "deposits": [ { "amount": "97499.58", @@ -521,7 +521,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "135173.4239508", "total_removed": "0", - "locked_amount": "88497.72039675751099915064844", + "locked_amount": "88417.13170947180028312330584", "deposits": [ { "amount": "135173.4239508", @@ -554,7 +554,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "32499.86", "total_removed": "0", - "locked_amount": "27237.867680110024097052", + "locked_amount": "27213.064058152751618578", "deposits": [ { "amount": "32499.86", @@ -587,7 +587,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "10833.29", "total_removed": "0", - "locked_amount": "8865.661619864174723312", + "locked_amount": "8857.588281605732764342", "deposits": [ { "amount": "10833.29", @@ -675,7 +675,7 @@ "tranche_end": "2022-11-01T00:00:00.000Z", "total_added": "22500", "total_removed": "0", - "locked_amount": "15070.90268342391525", + "locked_amount": "15039.918761322465", "deposits": [ { "amount": "15000", @@ -761,7 +761,7 @@ "tranche_end": "2023-06-02T00:00:00.000Z", "total_added": "1939928.38", "total_removed": "0", - "locked_amount": "1787107.163161493363488688", + "locked_amount": "1785760.482793185542179458", "deposits": [ { "amount": "1852091.69", @@ -1777,7 +1777,7 @@ "tranche_end": "2022-09-30T00:00:00.000Z", "total_added": "60916.66666633337", "total_removed": "18705.279504739679372649", - "locked_amount": "14252.3902613773876264604107209508", + "locked_amount": "14212.813229484597088091069173377", "deposits": [ { "amount": "2833.333333", @@ -5228,7 +5228,7 @@ "tranche_end": "2022-09-03T00:00:00.000Z", "total_added": "19457.000000000000000003", "total_removed": "5056.88782409978", - "locked_amount": "3424.7781243340945253005280533675799087", + "locked_amount": "3411.27063762049752395052597070015220705", "deposits": [ { "amount": "75", @@ -14143,7 +14143,7 @@ "tranche_end": "2023-06-05T00:00:00.000Z", "total_added": "3732368.4671", "total_removed": "74162.9780761646031", - "locked_amount": "2770662.82987924405559294256", + "locked_amount": "2768593.35649074479045464265", "deposits": [ { "amount": "1998.95815", @@ -14856,7 +14856,7 @@ "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "15788853.065470999700000001", "total_removed": "8977.81072959055965", - "locked_amount": "15046848.8007512538538970503922690393714517", + "locked_amount": "15039548.1502341726153932886205531966639632", "deposits": [ { "amount": "16249.93", @@ -16996,7 +16996,7 @@ "tranche_end": "2023-05-05T00:00:00.000Z", "total_added": "14597706.0446472999", "total_removed": "2158746.556523576443330677", - "locked_amount": "8241193.58043665824665157181165334", + "locked_amount": "8234418.98280668367809624879548032", "deposits": [ { "amount": "129284.449", @@ -21176,7 +21176,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "5778205.3912159303", "total_removed": "1417003.438054406291892727", - "locked_amount": "2939242.02241414458373538327057732", + "locked_amount": "2936565.33791811688112836828641782", "deposits": [ { "amount": "552496.6455", @@ -22332,7 +22332,7 @@ "tranche_end": "2023-06-05T00:00:00.000Z", "total_added": "472355.6199999996", "total_removed": "75.634316334", - "locked_amount": "439027.3631783082433762113089802", + "locked_amount": "438699.44329028628068252829934044", "deposits": [ { "amount": "3000", diff --git a/apps/static/src/assets/stagnet1-tranches.json b/apps/static/src/assets/stagnet1-tranches.json index 0e75a812d..91d315d15 100644 --- a/apps/static/src/assets/stagnet1-tranches.json +++ b/apps/static/src/assets/stagnet1-tranches.json @@ -38,7 +38,7 @@ "tranche_end": "2022-11-26T13:48:10.000Z", "total_added": "100", "total_removed": "0", - "locked_amount": "40.7730561897514", + "locked_amount": "40.70363077118214", "deposits": [ { "amount": "100", @@ -242,7 +242,7 @@ "tranche_end": "2022-10-12T00:53:20.000Z", "total_added": "1100", "total_removed": "673.04388635", - "locked_amount": "311.2655726788432", + "locked_amount": "310.501893074581395", "deposits": [ { "amount": "1000", diff --git a/apps/static/src/assets/testnet-tranches.json b/apps/static/src/assets/testnet-tranches.json index e040145e5..57f21c241 100644 --- a/apps/static/src/assets/testnet-tranches.json +++ b/apps/static/src/assets/testnet-tranches.json @@ -69,7 +69,7 @@ "tranche_end": "2022-10-12T00:53:20.000Z", "total_added": "1010.000000000000000001", "total_removed": "668.4622323651", - "locked_amount": "285.798389459665120000282968702435312", + "locked_amount": "285.09719273211564450028227444824961945", "deposits": [ { "amount": "1000", From ba7d0ec6c928730997e612518534c0ee9ba883ba Mon Sep 17 00:00:00 2001 From: mattrussell36 Date: Fri, 1 Jul 2022 06:04:50 +0000 Subject: [PATCH 6/7] chore: update tranches Signed-off-by: github-actions[bot] --- apps/static/src/assets/mainnet-tranches.json | 62 +++++++++++++------ apps/static/src/assets/stagnet1-tranches.json | 4 +- apps/static/src/assets/testnet-tranches.json | 2 +- 3 files changed, 45 insertions(+), 23 deletions(-) diff --git a/apps/static/src/assets/mainnet-tranches.json b/apps/static/src/assets/mainnet-tranches.json index 9d13ebfaa..a521fa343 100644 --- a/apps/static/src/assets/mainnet-tranches.json +++ b/apps/static/src/assets/mainnet-tranches.json @@ -38,7 +38,7 @@ "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "129999.45", "total_removed": "0", - "locked_amount": "123829.959213791937505035", + "locked_amount": "123771.490322542830121935", "deposits": [ { "amount": "129999.45", @@ -488,7 +488,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "97499.58", "total_removed": "0", - "locked_amount": "64687.856329165009438212", + "locked_amount": "64630.503793473215764854", "deposits": [ { "amount": "97499.58", @@ -521,7 +521,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "135173.4239508", "total_removed": "0", - "locked_amount": "88417.13170947180028312330584", + "locked_amount": "88338.74069468335043789037108", "deposits": [ { "amount": "135173.4239508", @@ -554,7 +554,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "32499.86", "total_removed": "0", - "locked_amount": "27213.064058152751618578", + "locked_amount": "27188.936836812527603638", "deposits": [ { "amount": "32499.86", @@ -587,7 +587,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "10833.29", "total_removed": "0", - "locked_amount": "8857.588281605732764342", + "locked_amount": "8849.73510518450376725", "deposits": [ { "amount": "10833.29", @@ -675,7 +675,7 @@ "tranche_end": "2022-11-01T00:00:00.000Z", "total_added": "22500", "total_removed": "0", - "locked_amount": "15039.918761322465", + "locked_amount": "15009.77977807970925", "deposits": [ { "amount": "15000", @@ -761,7 +761,7 @@ "tranche_end": "2023-06-02T00:00:00.000Z", "total_added": "1939928.38", "total_removed": "0", - "locked_amount": "1785760.482793185542179458", + "locked_amount": "1784450.526715937253657224", "deposits": [ { "amount": "1852091.69", @@ -1777,7 +1777,7 @@ "tranche_end": "2022-09-30T00:00:00.000Z", "total_added": "60916.66666633337", "total_removed": "18705.279504739679372649", - "locked_amount": "14212.813229484597088091069173377", + "locked_amount": "14174.3154725799324512925372029368", "deposits": [ { "amount": "2833.333333", @@ -5228,7 +5228,7 @@ "tranche_end": "2022-09-03T00:00:00.000Z", "total_added": "19457.000000000000000003", "total_removed": "5056.88782409978", - "locked_amount": "3411.27063762049752395052597070015220705", + "locked_amount": "3398.13272038305485656052394501522070024", "deposits": [ { "amount": "75", @@ -14143,7 +14143,7 @@ "tranche_end": "2023-06-05T00:00:00.000Z", "total_added": "3732368.4671", "total_removed": "74162.9780761646031", - "locked_amount": "2768593.35649074479045464265", + "locked_amount": "2766580.5046049960554378523", "deposits": [ { "amount": "1998.95815", @@ -14855,8 +14855,8 @@ "tranche_start": "2022-06-05T00:00:00.000Z", "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "15788853.065470999700000001", - "total_removed": "8977.81072959055965", - "locked_amount": "15039548.1502341726153932886205531966639632", + "total_removed": "9334.9335972441156", + "locked_amount": "15032447.2480229303798974414774589251797783", "deposits": [ { "amount": "16249.93", @@ -15400,6 +15400,11 @@ "user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b", "tx": "0x57a5f040ac80c34cc5c90c2cf939c21fa2ef872042998703d69995c71184ab44" }, + { + "amount": "357.12286765355595", + "user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b", + "tx": "0xa8bd86154d3a5c4db84fa8f2f26199b14625b9977690fc175d349a668f2e26b8" + }, { "amount": "2446.31552516990115", "user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b", @@ -15546,6 +15551,12 @@ "tranche_id": 2, "tx": "0x57a5f040ac80c34cc5c90c2cf939c21fa2ef872042998703d69995c71184ab44" }, + { + "amount": "357.12286765355595", + "user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b", + "tranche_id": 2, + "tx": "0xa8bd86154d3a5c4db84fa8f2f26199b14625b9977690fc175d349a668f2e26b8" + }, { "amount": "2446.31552516990115", "user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b", @@ -15590,8 +15601,8 @@ } ], "total_tokens": "194999.1675", - "withdrawn_tokens": "8977.81072959055965", - "remaining_tokens": "186021.35677040944035" + "withdrawn_tokens": "9334.9335972441156", + "remaining_tokens": "185664.2339027558844" }, { "address": "0x89051CAb67Bc7F8CC44F7e270c6EDaf1EC57676c", @@ -16995,8 +17006,8 @@ "tranche_start": "2021-11-05T00:00:00.000Z", "tranche_end": "2023-05-05T00:00:00.000Z", "total_added": "14597706.0446472999", - "total_removed": "2158746.556523576443330677", - "locked_amount": "8234418.98280668367809624879548032", + "total_removed": "2159399.571956092952408927", + "locked_amount": "8227829.74049486209436849383466922", "deposits": [ { "amount": "129284.449", @@ -17280,6 +17291,11 @@ "user": "0xcc2cf726A84e71301f9079FC177BA946aa98A694", "tx": "0x1f9f8184e28b9dabb8878b08ea6e50c93b7f18a724b1070a62c0223f12256339" }, + { + "amount": "653.01543251650907825", + "user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b", + "tx": "0xab622bab50344a6084b801420f43550a461b7d47402f9db0323258d02489ee9b" + }, { "amount": "652.48254356494551875", "user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b", @@ -18922,6 +18938,12 @@ "tranche_id": 3, "tx": "0x4ef5e959da18a286e010bc26fdc2bdda73f3e612334b232cb3e4af4c8c3d018d" }, + { + "amount": "653.01543251650907825", + "user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b", + "tranche_id": 3, + "tx": "0xab622bab50344a6084b801420f43550a461b7d47402f9db0323258d02489ee9b" + }, { "amount": "652.48254356494551875", "user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b", @@ -20160,8 +20182,8 @@ } ], "total_tokens": "359123.469575", - "withdrawn_tokens": "156040.35185448395445825", - "remaining_tokens": "203083.11772051604554175" + "withdrawn_tokens": "156693.3672870004635365", + "remaining_tokens": "202430.1022879995364635" }, { "address": "0xBdd412797c1B78535Afc5F71503b91fAbD0160fB", @@ -21176,7 +21198,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "5778205.3912159303", "total_removed": "1417003.438054406291892727", - "locked_amount": "2936565.33791811688112836828641782", + "locked_amount": "2933961.88842931001107719366680201", "deposits": [ { "amount": "552496.6455", @@ -22332,7 +22354,7 @@ "tranche_end": "2023-06-05T00:00:00.000Z", "total_added": "472355.6199999996", "total_removed": "75.634316334", - "locked_amount": "438699.44329028628068252829934044", + "locked_amount": "438380.49540303746176025562354132", "deposits": [ { "amount": "3000", diff --git a/apps/static/src/assets/stagnet1-tranches.json b/apps/static/src/assets/stagnet1-tranches.json index 91d315d15..f60b21a07 100644 --- a/apps/static/src/assets/stagnet1-tranches.json +++ b/apps/static/src/assets/stagnet1-tranches.json @@ -38,7 +38,7 @@ "tranche_end": "2022-11-26T13:48:10.000Z", "total_added": "100", "total_removed": "0", - "locked_amount": "40.70363077118214", + "locked_amount": "40.63611745306951", "deposits": [ { "amount": "100", @@ -242,7 +242,7 @@ "tranche_end": "2022-10-12T00:53:20.000Z", "total_added": "1100", "total_removed": "673.04388635", - "locked_amount": "310.501893074581395", + "locked_amount": "309.75924657534241", "deposits": [ { "amount": "1000", diff --git a/apps/static/src/assets/testnet-tranches.json b/apps/static/src/assets/testnet-tranches.json index 57f21c241..82f032d4a 100644 --- a/apps/static/src/assets/testnet-tranches.json +++ b/apps/static/src/assets/testnet-tranches.json @@ -69,7 +69,7 @@ "tranche_end": "2022-10-12T00:53:20.000Z", "total_added": "1010.000000000000000001", "total_removed": "668.4622323651", - "locked_amount": "285.09719273211564450028227444824961945", + "locked_amount": "284.4153082191780310002815993150684931", "deposits": [ { "amount": "1000", From 18c857a0ce99a3594fd5bf9ab3d240ee9544f249 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Szpiech?= Date: Fri, 1 Jul 2022 12:39:20 +0200 Subject: [PATCH 7/7] test(token): added validations for staking page without wallets connected (#686) * test(token): added validations for staking page without wallets connected * chore: formatting Co-authored-by: Rado --- apps/token-e2e/src/integration/staking.cy.js | 108 ++++++++++++++++++ apps/token-e2e/src/integration/vesting.cy.js | 4 +- .../token-e2e/src/locators/common.locators.js | 6 + .../src/locators/staking.locators.js | 11 ++ .../src/locators/vesting.locators.js | 4 +- .../src/routes/staking/connect-to-vega.tsx | 2 +- apps/token/src/routes/staking/staking.tsx | 7 +- 7 files changed, 136 insertions(+), 6 deletions(-) create mode 100644 apps/token-e2e/src/integration/staking.cy.js create mode 100644 apps/token-e2e/src/locators/common.locators.js create mode 100644 apps/token-e2e/src/locators/staking.locators.js diff --git a/apps/token-e2e/src/integration/staking.cy.js b/apps/token-e2e/src/integration/staking.cy.js new file mode 100644 index 000000000..93d75143c --- /dev/null +++ b/apps/token-e2e/src/integration/staking.cy.js @@ -0,0 +1,108 @@ +import navigation from '../locators/navigation.locators'; +import staking from '../locators/staking.locators'; + +context('Staking Page - verify elements on page', function () { + before('navigate to staking page', function () { + cy.visit('/') + .get(navigation.section) + .within(() => { + cy.get(navigation.staking).click(); + }); + }); + + describe('with wallets disconnected', function () { + describe('description section', function () { + it('should have staking tab highlighted', function () { + cy.get(navigation.section).within(() => { + cy.get(navigation.staking).should('have.attr', 'aria-current'); + }); + }); + + it('should have STAKING ON VEGA header visible', function () { + cy.get(staking.pageHeader) + .should('be.visible') + .and('have.text', 'Staking on Vega'); + }); + + it('should have Staking Guide link visible', function () { + cy.get(staking.guideLink) + .should('be.visible') + .and('have.text', 'Read more about staking on Vega') + .and( + 'have.attr', + 'href', + 'https://docs.vega.xyz/docs/mainnet/concepts/vega-chain/#staking-on-vega' + ); + }); + }); + + describe('step 1 section', function () { + it('should have header visible', function () { + cy.get(staking.step1).within(() => { + cy.get(staking.sectionHeader) + .should('be.visible') + .and('have.text', 'Step 1. Connect to a Vega Wallet'); + }); + }); + + it('should have text visible', function () { + cy.get(staking.step1).within(() => { + cy.get(staking.link) + .should('be.visible') + .and('have.text', 'Vega Wallet') + .and('have.attr', 'href', 'https://vega.xyz/wallet'); + }); + }); + + it('should have connect to eth button visible', function () { + cy.get(staking.step1).within(() => { + cy.get(staking.connectToEthBtn) + .should('be.visible') + .and('have.text', 'Connect Ethereum wallet'); + }); + }); + + it('should have connect to vega button visible', function () { + cy.get(staking.step1).within(() => { + cy.get(staking.connectToVegaBtn) + .should('be.visible') + .and('have.text', 'Connect Vega wallet'); + }); + }); + }); + + describe('step 2 section', function () { + it('should have header visible', function () { + cy.get(staking.step2).within(() => { + cy.get(staking.sectionHeader) + .should('be.visible') + .and('have.text', 'Step 2. Associate tokens with a Vega Wallet'); + }); + }); + + it('should have warning visible', function () { + cy.get(staking.step2).within(() => { + cy.get(staking.warning) + .should('be.visible') + .and( + 'have.text', + 'You need to connect to an Ethereum wallet first' + ); + }); + }); + }); + + describe('step 3 section', function () { + it('should have header visible', function () { + cy.get(staking.step3).within(() => { + cy.get(staking.sectionHeader) + .should('be.visible') + .and( + 'have.text', + "Step 3. Select the validator you'd like to nominate" + ); + }); + }); + }); + }); +}); diff --git a/apps/token-e2e/src/integration/vesting.cy.js b/apps/token-e2e/src/integration/vesting.cy.js index 56302b535..0534c230b 100644 --- a/apps/token-e2e/src/integration/vesting.cy.js +++ b/apps/token-e2e/src/integration/vesting.cy.js @@ -18,7 +18,9 @@ context('Vesting Page - verify elements on page', function () { }); it('should have VESTING header visible', function () { - cy.get(vesting.header).should('be.visible').and('have.text', 'Vesting'); + cy.get(vesting.pageHeader) + .should('be.visible') + .and('have.text', 'Vesting'); }); it('should have connect Eth wallet info', function () { diff --git a/apps/token-e2e/src/locators/common.locators.js b/apps/token-e2e/src/locators/common.locators.js new file mode 100644 index 000000000..8886e2115 --- /dev/null +++ b/apps/token-e2e/src/locators/common.locators.js @@ -0,0 +1,6 @@ +export default { + pageHeader: 'header h1', + sectionHeader: 'h2', + link: '[data-testid="link"]', + warning: '[data-testid="callout"]', +}; diff --git a/apps/token-e2e/src/locators/staking.locators.js b/apps/token-e2e/src/locators/staking.locators.js new file mode 100644 index 000000000..ffebddbae --- /dev/null +++ b/apps/token-e2e/src/locators/staking.locators.js @@ -0,0 +1,11 @@ +import common from './common.locators'; + +export default { + ...common, + guideLink: '[data-testid="staking-guide-link"]', + step1: '[data-testid="staking-step-1"]', + step2: '[data-testid="staking-step-2"]', + step3: '[data-testid="staking-step-3"]', + connectToEthBtn: '[data-testid="connect-to-eth-btn"]', + connectToVegaBtn: '[data-testid="connect-to-vega-wallet-btn"]', +}; diff --git a/apps/token-e2e/src/locators/vesting.locators.js b/apps/token-e2e/src/locators/vesting.locators.js index 9a78ad757..90eb929cb 100644 --- a/apps/token-e2e/src/locators/vesting.locators.js +++ b/apps/token-e2e/src/locators/vesting.locators.js @@ -1,5 +1,7 @@ +import common from './common.locators'; + export default { - header: 'header h1', + ...common, connectPrompt: '[data-testid="eth-connect-prompt"]', connectButton: '[data-testid="connect-to-eth-btn"]', }; diff --git a/apps/token/src/routes/staking/connect-to-vega.tsx b/apps/token/src/routes/staking/connect-to-vega.tsx index fed6b2032..2421a35c1 100644 --- a/apps/token/src/routes/staking/connect-to-vega.tsx +++ b/apps/token/src/routes/staking/connect-to-vega.tsx @@ -18,7 +18,7 @@ export const ConnectToVega = () => { isOpen: true, }) } - data-test-id="connect-to-vega-wallet-btn" + data-testid="connect-to-vega-wallet-btn" > {t('connectVegaWallet')} diff --git a/apps/token/src/routes/staking/staking.tsx b/apps/token/src/routes/staking/staking.tsx index fdd5b18f7..d053119cb 100644 --- a/apps/token/src/routes/staking/staking.tsx +++ b/apps/token/src/routes/staking/staking.tsx @@ -36,19 +36,20 @@ export const Staking = ({ data }: { data?: StakingQueryResult }) => { href={Links.STAKING_GUIDE} className="text-white underline" target="_blank" + data-testid="staking-guide-link" > {t('readMoreStaking')}

-
+
{t('stakingStep1')}
-
+
{t('stakingStep2')} @@ -60,7 +61,7 @@ export const Staking = ({ data }: { data?: StakingQueryResult }) => { } />
-
+
{t('stakingStep3')}