diff --git a/explorer/CHANGELOG.md b/explorer/CHANGELOG.md index a8434adf6e..4508cad620 100644 --- a/explorer/CHANGELOG.md +++ b/explorer/CHANGELOG.md @@ -9,12 +9,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added +- Add stake maturity information (Provisioners page) [#3218] + ### Changed +- Change Stake details labels [#3218] + ### Removed ### Fixed +- Fix inactive stake shown as active on mobile [#3218] + ## [0.3.0] - 2024-12-03 ### Added @@ -111,6 +117,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 [#3034]: https://github.com/dusk-network/rusk/issues/3034 [#3038]: https://github.com/dusk-network/rusk/issues/3038 [#3064]: https://github.com/dusk-network/rusk/issues/3064 +[#3218]: https://github.com/dusk-network/rusk/issues/3218 diff --git a/explorer/src/lib/components/__tests__/__snapshots__/ProvisionersCard.spec.js.snap b/explorer/src/lib/components/__tests__/__snapshots__/ProvisionersCard.spec.js.snap index a529936310..0c30f2f2bd 100644 --- a/explorer/src/lib/components/__tests__/__snapshots__/ProvisionersCard.spec.js.snap +++ b/explorer/src/lib/components/__tests__/__snapshots__/ProvisionersCard.spec.js.snap @@ -52,7 +52,7 @@ exports[`Provisioners Card > should disable the \`Show More\` button if there is - Stake Amount (DUSK) + Stake @@ -92,7 +92,7 @@ exports[`Provisioners Card > should disable the \`Show More\` button if there is - Reclaimable: + Active: 500,000 @@ -102,10 +102,21 @@ exports[`Provisioners Card > should disable the \`Show More\` button if there is - Locked: + Inactive: 0 + +
+ + + Matures At: + + + # + 0 @@ -157,7 +168,7 @@ exports[`Provisioners Card > should disable the \`Show More\` button if there is - Reclaimable: + Active: 500,000 @@ -167,10 +178,21 @@ exports[`Provisioners Card > should disable the \`Show More\` button if there is - Locked: + Inactive: 0 + +
+ + + Matures At: + + + # + 0 @@ -222,7 +244,7 @@ exports[`Provisioners Card > should disable the \`Show More\` button if there is - Reclaimable: + Active: 4,800 @@ -232,10 +254,21 @@ exports[`Provisioners Card > should disable the \`Show More\` button if there is - Locked: + Inactive: 0 + +
+ + + Matures At: + + + # + 4,320 @@ -287,7 +320,7 @@ exports[`Provisioners Card > should disable the \`Show More\` button if there is - Reclaimable: + Active: 1,234 @@ -297,10 +330,21 @@ exports[`Provisioners Card > should disable the \`Show More\` button if there is - Locked: + Inactive: 0 + +
+ + + Matures At: + + + # + 4,320 @@ -352,7 +396,7 @@ exports[`Provisioners Card > should disable the \`Show More\` button if there is - Reclaimable: + Active: 500,000 @@ -362,10 +406,21 @@ exports[`Provisioners Card > should disable the \`Show More\` button if there is - Locked: + Inactive: 0 + +
+ + + Matures At: + + + # + 0 @@ -417,7 +472,7 @@ exports[`Provisioners Card > should disable the \`Show More\` button if there is - Reclaimable: + Active: 4,800 @@ -427,10 +482,21 @@ exports[`Provisioners Card > should disable the \`Show More\` button if there is - Locked: + Inactive: 0 + +
+ + + Matures At: + + + # + 23,760 @@ -482,7 +548,7 @@ exports[`Provisioners Card > should disable the \`Show More\` button if there is - Reclaimable: + Active: 500,000 @@ -492,10 +558,21 @@ exports[`Provisioners Card > should disable the \`Show More\` button if there is - Locked: + Inactive: 0 + +
+ + + Matures At: + + + # + 0 @@ -547,7 +624,7 @@ exports[`Provisioners Card > should disable the \`Show More\` button if there is - Reclaimable: + Active: 1,000 @@ -557,10 +634,21 @@ exports[`Provisioners Card > should disable the \`Show More\` button if there is - Locked: + Inactive: 0 + +
+ + + Matures At: + + + # + 8,640 @@ -612,7 +700,7 @@ exports[`Provisioners Card > should disable the \`Show More\` button if there is - Reclaimable: + Active: 500,000 @@ -622,10 +710,21 @@ exports[`Provisioners Card > should disable the \`Show More\` button if there is - Locked: + Inactive: 0 + +
+ + + Matures At: + + + # + 0 @@ -677,7 +776,7 @@ exports[`Provisioners Card > should disable the \`Show More\` button if there is - Reclaimable: + Active: 500,000 @@ -687,10 +786,21 @@ exports[`Provisioners Card > should disable the \`Show More\` button if there is - Locked: + Inactive: 0 + +
+ + + Matures At: + + + # + 0 diff --git a/explorer/src/lib/components/__tests__/__snapshots__/ProvisionersList.spec.js.snap b/explorer/src/lib/components/__tests__/__snapshots__/ProvisionersList.spec.js.snap index 8185cd0d7c..f40574af8e 100644 --- a/explorer/src/lib/components/__tests__/__snapshots__/ProvisionersList.spec.js.snap +++ b/explorer/src/lib/components/__tests__/__snapshots__/ProvisionersList.spec.js.snap @@ -32,14 +32,14 @@ exports[`Provisioners List > renders the \`ProvisionersList\` component 1`] = ` class="details-list__term-layout" > - Locked Stake Amount + Active Stake
- 0 + 500,000 DUSK
@@ -50,17 +50,35 @@ exports[`Provisioners List > renders the \`ProvisionersList\` component 1`] = ` class="details-list__term-layout" > - Reclaimable Stake Amount + Inactive Stake
- 500,000 + 0 DUSK
+
+
+ + Matures At +
+
+ +
+ # + 0 +
+
diff --git a/explorer/src/lib/components/__tests__/__snapshots__/ProvisionersTable.spec.js.snap b/explorer/src/lib/components/__tests__/__snapshots__/ProvisionersTable.spec.js.snap index a64940d85f..baf57ea031 100644 --- a/explorer/src/lib/components/__tests__/__snapshots__/ProvisionersTable.spec.js.snap +++ b/explorer/src/lib/components/__tests__/__snapshots__/ProvisionersTable.spec.js.snap @@ -23,7 +23,7 @@ exports[`Provisioners Table > should render the \`ProvisionersTable\` component - Stake Amount (DUSK) + Stake @@ -63,7 +63,7 @@ exports[`Provisioners Table > should render the \`ProvisionersTable\` component - Reclaimable: + Active: 500,000 @@ -73,10 +73,21 @@ exports[`Provisioners Table > should render the \`ProvisionersTable\` component - Locked: + Inactive: 0 + +
+ + + Matures At: + + + # + 0 @@ -128,7 +139,7 @@ exports[`Provisioners Table > should render the \`ProvisionersTable\` component - Reclaimable: + Active: 500,000 @@ -138,10 +149,21 @@ exports[`Provisioners Table > should render the \`ProvisionersTable\` component - Locked: + Inactive: 0 + +
+ + + Matures At: + + + # + 0 @@ -193,7 +215,7 @@ exports[`Provisioners Table > should render the \`ProvisionersTable\` component - Reclaimable: + Active: 4,800 @@ -203,10 +225,21 @@ exports[`Provisioners Table > should render the \`ProvisionersTable\` component - Locked: + Inactive: 0 + +
+ + + Matures At: + + + # + 4,320 @@ -258,7 +291,7 @@ exports[`Provisioners Table > should render the \`ProvisionersTable\` component - Reclaimable: + Active: 1,234 @@ -268,10 +301,21 @@ exports[`Provisioners Table > should render the \`ProvisionersTable\` component - Locked: + Inactive: 0 + +
+ + + Matures At: + + + # + 4,320 @@ -323,7 +367,7 @@ exports[`Provisioners Table > should render the \`ProvisionersTable\` component - Reclaimable: + Active: 500,000 @@ -333,10 +377,21 @@ exports[`Provisioners Table > should render the \`ProvisionersTable\` component - Locked: + Inactive: 0 + +
+ + + Matures At: + + + # + 0 @@ -388,7 +443,7 @@ exports[`Provisioners Table > should render the \`ProvisionersTable\` component - Reclaimable: + Active: 4,800 @@ -398,10 +453,21 @@ exports[`Provisioners Table > should render the \`ProvisionersTable\` component - Locked: + Inactive: 0 + +
+ + + Matures At: + + + # + 23,760 @@ -453,7 +519,7 @@ exports[`Provisioners Table > should render the \`ProvisionersTable\` component - Reclaimable: + Active: 500,000 @@ -463,10 +529,21 @@ exports[`Provisioners Table > should render the \`ProvisionersTable\` component - Locked: + Inactive: 0 + +
+ + + Matures At: + + + # + 0 @@ -518,7 +595,7 @@ exports[`Provisioners Table > should render the \`ProvisionersTable\` component - Reclaimable: + Active: 1,000 @@ -528,10 +605,21 @@ exports[`Provisioners Table > should render the \`ProvisionersTable\` component - Locked: + Inactive: 0 + +
+ + + Matures At: + + + # + 8,640 @@ -583,7 +671,7 @@ exports[`Provisioners Table > should render the \`ProvisionersTable\` component - Reclaimable: + Active: 500,000 @@ -593,10 +681,21 @@ exports[`Provisioners Table > should render the \`ProvisionersTable\` component - Locked: + Inactive: 0 + +
+ + + Matures At: + + + # + 0 @@ -648,7 +747,7 @@ exports[`Provisioners Table > should render the \`ProvisionersTable\` component - Reclaimable: + Active: 500,000 @@ -658,10 +757,21 @@ exports[`Provisioners Table > should render the \`ProvisionersTable\` component - Locked: + Inactive: 0 + +
+ + + Matures At: + + + # + 0 diff --git a/explorer/src/lib/components/provisioners-list/ProvisionersList.svelte b/explorer/src/lib/components/provisioners-list/ProvisionersList.svelte index 7d9b0d3e1e..be58dce3be 100644 --- a/explorer/src/lib/components/provisioners-list/ProvisionersList.svelte +++ b/explorer/src/lib/components/provisioners-list/ProvisionersList.svelte @@ -47,19 +47,39 @@ > - - - Locked Stake Amount + + + Active Stake {formatter(luxToDusk(data.locked_amt))} DUSK{formatter(luxToDusk(data.amount))} DUSK - - - Reclaimable Stake Amount + + + Inactive Stake {formatter(luxToDusk(data.amount))} DUSK{formatter(luxToDusk(data.locked_amt))} DUSK + + + + + Matures At + + #{formatter(data.eligibility)} diff --git a/explorer/src/lib/components/provisioners-table/ProvisionersTable.svelte b/explorer/src/lib/components/provisioners-table/ProvisionersTable.svelte index 5cccf7a067..bbf67ccdab 100644 --- a/explorer/src/lib/components/provisioners-table/ProvisionersTable.svelte +++ b/explorer/src/lib/components/provisioners-table/ProvisionersTable.svelte @@ -31,7 +31,7 @@ Staking Address - Stake Amount (DUSK) + Stake Slashes Accumulated Reward (DUSK) @@ -43,13 +43,16 @@ {middleEllipsis(provisioner.key, HASH_CHARS_LENGTH)} - Reclaimable: + Active: {numberFormatter(luxToDusk(provisioner.amount))}
- Locked: + Inactive: {numberFormatter(luxToDusk(provisioner.locked_amt))} +
+ Matures At: + + #{numberFormatter(provisioner.eligibility)}
Soft: diff --git a/explorer/src/routes/provisioners/__tests__/__snapshots__/page.spec.js.snap b/explorer/src/routes/provisioners/__tests__/__snapshots__/page.spec.js.snap index 3a4c6867a0..f81f925af2 100644 --- a/explorer/src/routes/provisioners/__tests__/__snapshots__/page.spec.js.snap +++ b/explorer/src/routes/provisioners/__tests__/__snapshots__/page.spec.js.snap @@ -65,14 +65,14 @@ exports[`Provisioners page > should render the Provisioners page with the mobile class="details-list__term-layout" > - Locked Stake Amount + Active Stake
- 0 + 500,000 DUSK
@@ -83,17 +83,35 @@ exports[`Provisioners page > should render the Provisioners page with the mobile class="details-list__term-layout" > - Reclaimable Stake Amount + Inactive Stake
- 500,000 + 0 DUSK
+
+
+ + Matures At +
+
+ +
+ # + 0 +
+
@@ -178,14 +196,14 @@ exports[`Provisioners page > should render the Provisioners page with the mobile class="details-list__term-layout" > - Locked Stake Amount + Active Stake
- 0 + 500,000 DUSK
@@ -196,17 +214,35 @@ exports[`Provisioners page > should render the Provisioners page with the mobile class="details-list__term-layout" > - Reclaimable Stake Amount + Inactive Stake
- 500,000 + 0 DUSK
+
+
+ + Matures At +
+
+ +
+ # + 0 +
+
@@ -291,14 +327,14 @@ exports[`Provisioners page > should render the Provisioners page with the mobile class="details-list__term-layout" > - Locked Stake Amount + Active Stake
- 0 + 4,800 DUSK
@@ -309,17 +345,35 @@ exports[`Provisioners page > should render the Provisioners page with the mobile class="details-list__term-layout" > - Reclaimable Stake Amount + Inactive Stake
- 4,800 + 0 DUSK
+
+
+ + Matures At +
+
+ +
+ # + 4,320 +
+
@@ -404,14 +458,14 @@ exports[`Provisioners page > should render the Provisioners page with the mobile class="details-list__term-layout" > - Locked Stake Amount + Active Stake
- 0 + 1,234 DUSK
@@ -422,17 +476,35 @@ exports[`Provisioners page > should render the Provisioners page with the mobile class="details-list__term-layout" > - Reclaimable Stake Amount + Inactive Stake
- 1,234 + 0 DUSK
+
+
+ + Matures At +
+
+ +
+ # + 4,320 +
+
@@ -517,14 +589,14 @@ exports[`Provisioners page > should render the Provisioners page with the mobile class="details-list__term-layout" > - Locked Stake Amount + Active Stake
- 0 + 500,000 DUSK
@@ -535,17 +607,35 @@ exports[`Provisioners page > should render the Provisioners page with the mobile class="details-list__term-layout" > - Reclaimable Stake Amount + Inactive Stake
- 500,000 + 0 DUSK
+
+
+ + Matures At +
+
+ +
+ # + 0 +
+
@@ -630,14 +720,14 @@ exports[`Provisioners page > should render the Provisioners page with the mobile class="details-list__term-layout" > - Locked Stake Amount + Active Stake
- 0 + 4,800 DUSK
@@ -648,17 +738,35 @@ exports[`Provisioners page > should render the Provisioners page with the mobile class="details-list__term-layout" > - Reclaimable Stake Amount + Inactive Stake
- 4,800 + 0 DUSK
+
+
+ + Matures At +
+
+ +
+ # + 23,760 +
+
@@ -743,14 +851,14 @@ exports[`Provisioners page > should render the Provisioners page with the mobile class="details-list__term-layout" > - Locked Stake Amount + Active Stake
- 0 + 500,000 DUSK
@@ -761,17 +869,35 @@ exports[`Provisioners page > should render the Provisioners page with the mobile class="details-list__term-layout" > - Reclaimable Stake Amount + Inactive Stake
- 500,000 + 0 DUSK
+
+
+ + Matures At +
+
+ +
+ # + 0 +
+
@@ -856,14 +982,14 @@ exports[`Provisioners page > should render the Provisioners page with the mobile class="details-list__term-layout" > - Locked Stake Amount + Active Stake
- 0 + 1,000 DUSK
@@ -874,17 +1000,35 @@ exports[`Provisioners page > should render the Provisioners page with the mobile class="details-list__term-layout" > - Reclaimable Stake Amount + Inactive Stake
- 1,000 + 0 DUSK
+
+
+ + Matures At +
+
+ +
+ # + 8,640 +
+
@@ -969,14 +1113,14 @@ exports[`Provisioners page > should render the Provisioners page with the mobile class="details-list__term-layout" > - Locked Stake Amount + Active Stake
- 0 + 500,000 DUSK
@@ -987,17 +1131,35 @@ exports[`Provisioners page > should render the Provisioners page with the mobile class="details-list__term-layout" > - Reclaimable Stake Amount + Inactive Stake
- 500,000 + 0 DUSK
+
+
+ + Matures At +
+
+ +
+ # + 0 +
+
@@ -1082,14 +1244,14 @@ exports[`Provisioners page > should render the Provisioners page with the mobile class="details-list__term-layout" > - Locked Stake Amount + Active Stake
- 0 + 500,000 DUSK
@@ -1100,17 +1262,35 @@ exports[`Provisioners page > should render the Provisioners page with the mobile class="details-list__term-layout" > - Reclaimable Stake Amount + Inactive Stake
- 500,000 + 0 DUSK
+
+
+ + Matures At +
+
+ +
+ # + 0 +
+
@@ -1195,14 +1375,14 @@ exports[`Provisioners page > should render the Provisioners page with the mobile class="details-list__term-layout" > - Locked Stake Amount + Active Stake
- 0 + 500,000 DUSK
@@ -1213,17 +1393,35 @@ exports[`Provisioners page > should render the Provisioners page with the mobile class="details-list__term-layout" > - Reclaimable Stake Amount + Inactive Stake
- 500,000 + 0 DUSK
+
+
+ + Matures At +
+
+ +
+ # + 0 +
+
@@ -1308,14 +1506,14 @@ exports[`Provisioners page > should render the Provisioners page with the mobile class="details-list__term-layout" > - Locked Stake Amount + Active Stake
- 0 + 500,000 DUSK
@@ -1326,17 +1524,35 @@ exports[`Provisioners page > should render the Provisioners page with the mobile class="details-list__term-layout" > - Reclaimable Stake Amount + Inactive Stake
- 500,000 + 0 DUSK
+
+
+ + Matures At +
+
+ +
+ # + 0 +
+
@@ -1421,7 +1637,7 @@ exports[`Provisioners page > should render the Provisioners page with the mobile class="details-list__term-layout" > - Locked Stake Amount + Active Stake
@@ -1439,7 +1655,7 @@ exports[`Provisioners page > should render the Provisioners page with the mobile class="details-list__term-layout" > - Reclaimable Stake Amount + Inactive Stake @@ -1450,6 +1666,24 @@ exports[`Provisioners page > should render the Provisioners page with the mobile DUSK +
+
+ + Matures At +
+
+ +
+ # + 0 +
+
@@ -1534,14 +1768,14 @@ exports[`Provisioners page > should render the Provisioners page with the mobile class="details-list__term-layout" > - Locked Stake Amount + Active Stake
- 0 + 4,550 DUSK
@@ -1552,17 +1786,35 @@ exports[`Provisioners page > should render the Provisioners page with the mobile class="details-list__term-layout" > - Reclaimable Stake Amount + Inactive Stake
- 4,550 + 0 DUSK
+
+
+ + Matures At +
+
+ +
+ # + 4,320 +
+
@@ -1647,14 +1899,14 @@ exports[`Provisioners page > should render the Provisioners page with the mobile class="details-list__term-layout" > - Locked Stake Amount + Active Stake
- 0 + 500,000 DUSK
@@ -1665,17 +1917,35 @@ exports[`Provisioners page > should render the Provisioners page with the mobile class="details-list__term-layout" > - Reclaimable Stake Amount + Inactive Stake
- 500,000 + 0 DUSK
+
+
+ + Matures At +
+
+ +
+ # + 0 +
+
@@ -1834,7 +2104,7 @@ exports[`Provisioners page > should render the Provisioners page, start polling - Stake Amount (DUSK) + Stake @@ -1874,7 +2144,7 @@ exports[`Provisioners page > should render the Provisioners page, start polling - Reclaimable: + Active: 500,000 @@ -1884,10 +2154,21 @@ exports[`Provisioners page > should render the Provisioners page, start polling - Locked: + Inactive: 0 + +
+ + + Matures At: + + + # + 0 @@ -1939,7 +2220,7 @@ exports[`Provisioners page > should render the Provisioners page, start polling - Reclaimable: + Active: 500,000 @@ -1949,10 +2230,21 @@ exports[`Provisioners page > should render the Provisioners page, start polling - Locked: + Inactive: 0 + +
+ + + Matures At: + + + # + 0 @@ -2004,7 +2296,7 @@ exports[`Provisioners page > should render the Provisioners page, start polling - Reclaimable: + Active: 4,800 @@ -2014,10 +2306,21 @@ exports[`Provisioners page > should render the Provisioners page, start polling - Locked: + Inactive: 0 + +
+ + + Matures At: + + + # + 4,320 @@ -2069,7 +2372,7 @@ exports[`Provisioners page > should render the Provisioners page, start polling - Reclaimable: + Active: 1,234 @@ -2079,10 +2382,21 @@ exports[`Provisioners page > should render the Provisioners page, start polling - Locked: + Inactive: 0 + +
+ + + Matures At: + + + # + 4,320 @@ -2134,7 +2448,7 @@ exports[`Provisioners page > should render the Provisioners page, start polling - Reclaimable: + Active: 500,000 @@ -2144,10 +2458,21 @@ exports[`Provisioners page > should render the Provisioners page, start polling - Locked: + Inactive: 0 + +
+ + + Matures At: + + + # + 0 @@ -2199,7 +2524,7 @@ exports[`Provisioners page > should render the Provisioners page, start polling - Reclaimable: + Active: 4,800 @@ -2209,10 +2534,21 @@ exports[`Provisioners page > should render the Provisioners page, start polling - Locked: + Inactive: 0 + +
+ + + Matures At: + + + # + 23,760 @@ -2264,7 +2600,7 @@ exports[`Provisioners page > should render the Provisioners page, start polling - Reclaimable: + Active: 500,000 @@ -2274,10 +2610,21 @@ exports[`Provisioners page > should render the Provisioners page, start polling - Locked: + Inactive: 0 + +
+ + + Matures At: + + + # + 0 @@ -2329,7 +2676,7 @@ exports[`Provisioners page > should render the Provisioners page, start polling - Reclaimable: + Active: 1,000 @@ -2339,10 +2686,21 @@ exports[`Provisioners page > should render the Provisioners page, start polling - Locked: + Inactive: 0 + +
+ + + Matures At: + + + # + 8,640 @@ -2394,7 +2752,7 @@ exports[`Provisioners page > should render the Provisioners page, start polling - Reclaimable: + Active: 500,000 @@ -2404,10 +2762,21 @@ exports[`Provisioners page > should render the Provisioners page, start polling - Locked: + Inactive: 0 + +
+ + + Matures At: + + + # + 0 @@ -2459,7 +2828,7 @@ exports[`Provisioners page > should render the Provisioners page, start polling - Reclaimable: + Active: 500,000 @@ -2469,10 +2838,21 @@ exports[`Provisioners page > should render the Provisioners page, start polling - Locked: + Inactive: 0 + +
+ + + Matures At: + + + # + 0 @@ -2524,7 +2904,7 @@ exports[`Provisioners page > should render the Provisioners page, start polling - Reclaimable: + Active: 500,000 @@ -2534,10 +2914,21 @@ exports[`Provisioners page > should render the Provisioners page, start polling - Locked: + Inactive: 0 + +
+ + + Matures At: + + + # + 0 @@ -2589,7 +2980,7 @@ exports[`Provisioners page > should render the Provisioners page, start polling - Reclaimable: + Active: 500,000 @@ -2599,10 +2990,21 @@ exports[`Provisioners page > should render the Provisioners page, start polling - Locked: + Inactive: 0 + +
+ + + Matures At: + + + # + 0 @@ -2654,7 +3056,7 @@ exports[`Provisioners page > should render the Provisioners page, start polling - Reclaimable: + Active: 0 @@ -2664,10 +3066,21 @@ exports[`Provisioners page > should render the Provisioners page, start polling - Locked: + Inactive: 0 + +
+ + + Matures At: + + + # + 0 @@ -2719,7 +3132,7 @@ exports[`Provisioners page > should render the Provisioners page, start polling - Reclaimable: + Active: 4,550 @@ -2729,10 +3142,21 @@ exports[`Provisioners page > should render the Provisioners page, start polling - Locked: + Inactive: 0 + +
+ + + Matures At: + + + # + 4,320 @@ -2784,7 +3208,7 @@ exports[`Provisioners page > should render the Provisioners page, start polling - Reclaimable: + Active: 500,000 @@ -2794,10 +3218,21 @@ exports[`Provisioners page > should render the Provisioners page, start polling - Locked: + Inactive: 0 + +
+ + + Matures At: + + + # + 0