-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2379 from keep-network/staking-keep-token-form-re…
…design Staking keep token form redesign This PR makes some UI changes to the staking tokens input in Overview page. Main changes: - remove progress bar with available KEEP tokens below the input - fix the ui problem with higher number of KEEP tokens written inside input that would cover the Max Stake button - add a tooltip that will inform user that the min stake is about to decrease to 50,000 soon - change the order of the Wallet Tokens page and Granted Tokens page on the top menu of Delegations page - some UI changes based on Figma
- Loading branch information
Showing
10 changed files
with
180 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
import moment from "moment" | ||
|
||
const dateFormat = "MM/DD/YYYY" | ||
|
||
// Minimum stake diminishing schedule can be found here: | ||
// https://staking.keep.network/about-staking/staking-minimums | ||
const minimumStakeDiminishingSchedule = [ | ||
{ | ||
date: moment.utc("04/28/2020", dateFormat), | ||
value: 100000, | ||
}, | ||
{ | ||
date: moment.utc("04/28/2020", dateFormat), | ||
value: 90000, | ||
}, | ||
{ | ||
date: moment.utc("09/21/2020", dateFormat), | ||
value: 80000, | ||
}, | ||
{ | ||
date: moment.utc("03/12/2020", dateFormat), | ||
value: 70000, | ||
}, | ||
{ | ||
date: moment.utc("02/14/2021", dateFormat), | ||
value: 60000, | ||
}, | ||
{ | ||
date: moment.utc("04/28/2021", dateFormat), | ||
value: 50000, | ||
}, | ||
{ | ||
date: moment.utc("07/10/2021", dateFormat), | ||
value: 40000, | ||
}, | ||
{ | ||
date: moment.utc("21/09/2021", dateFormat), | ||
value: 30000, | ||
}, | ||
{ | ||
date: moment.utc("12/03/2021", dateFormat), | ||
value: 20000, | ||
}, | ||
{ | ||
date: moment.utc("02/14/2022", dateFormat), | ||
value: 10000, | ||
}, | ||
] | ||
|
||
export const getNextMinStake = () => { | ||
const currentDate = moment().utc() | ||
|
||
for (const minimumStakeInfo of minimumStakeDiminishingSchedule) { | ||
if (!currentDate.isSameOrAfter(minimumStakeInfo.date)) { | ||
return { | ||
date: minimumStakeInfo.date.format(dateFormat), | ||
value: minimumStakeInfo.value, | ||
} | ||
} | ||
} | ||
|
||
return minimumStakeDiminishingSchedule[ | ||
minimumStakeDiminishingSchedule.length - 1 | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters