-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Staking info per contract #325
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
couple changes, but looks good from a functional perspective!
const rewardsPerWorkPeriod = | ||
Number(formatEther(rewardsPerSecond as BigNumber)) * | ||
livenessPeriod.toNumber(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the same functionality is in getAvailableRewardsForEpoch
above
can we remove the function above? or consolidate them in some way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’ve added a TODO for now and will revisit it later when I have time.
* initial win support * win: process kill fixes * win: tendermint installation automated * helthchecker env vars to switch it off. small refactoring * service hash id updated * use bundled in tendermint.exe, not download it * lint fixes * feat: add staking deployment vars * feat: added pearl beta 2 address & section * chore: add pearl beta 2 address * chore: init * chore: comment env example * fix: isNil check for low balance * fix: serviceFundRequirements coalesce * refactor: order and map staking contracts * fix: required olas when both staked and not staked * feat: update StakingContractSection to support multi-contract * feat: updated STAKING_PROGRAM_META with deprecated and supported migration targets * fix: isAddress checks to protect against 0xm * feat: added pearl_beta_2 to StakingContractInfo record * feat: add pearl_beta_2 Beta2 enum * chore: comment availableRewards until it's used * feat: extend serviceStakingMechUsageContracts with pearl_beta_2, protect against -1 serviceId * fix: protect against -1 serviceId related errors * feat: add pearl_beta_2 requirement * bump: rc124 for test release * add staking contract update button in homepage * update contract UI * update * win release updates * add loading state * workflow cleanup * fix: default contract fallback, instead of "not staked" * fix: broken import (kebabCase import) * bump: rc125 * win build poetry version bump * fix: added minimum staking duration to migration condition * fix for windows tendermint bundle in * fix: disable hash update * fix: migration countdown, and minimum duration fix from staging * fix: typos * refactor: popover copy * fix: typo * fix for tendermint PATH env vars * feat: Disable the staking contract button if the balance is low. (#317) * feat: disable staking contract button if low balance * feat: update staking contract button popover message * feat: add useNeedsFunds hook * feat: integrate useNeedsFunds hook for disable staking contract * update logic * refactor: remove OLAS requirement from notification * fix: commented link to broken site * feat: Staking info per contract (#325) * refractor: tiny format document * feat: add InfoBreakdown component * feat: replace OlasBalanceSection with BalanceBreakdown * refactor: Update InfoBreakdown component and add InfoBreakdownList * feat: add more contract methods for staking info * move from different function inside the main one (Autonolas.ts) * feat: add types * refactor: Update StakingContractSection component and add StakingContractInfo * other changes * feat: minor * feat: address Josh review changes * feat: Add balance polling pause functionality to StakingContractSection (#330) * bump: rc126 * hotfix: undefined fixes in useStakingContractInfo hook for build 126 * refactor: simplify logic, remove New tag * chore: remove redundant "New" objects * fix: remove commented mistakenly commented code * feat: Update backup wallet alert copy (#341) * feat: Add backup wallet warning message * update text * refactor: cleanup staking program parse from contract * chore: update minimum staking duration comment * feat: add loader to staking contract info provider * refactor: return loader from hook, rework comments, add service staked check * refactor: match active staking program type meta with active staking program type * refactor: rewrite staking contract section to consolidate, clean-up business logic * chore: delete huge comment block (cantMigrateReason) * fix: migrate button display logic * fix: Release 0.1.0-rc126 issues (#342) * Refactor SetupWelcome component to handle account setup state correctly * feat: trigger IPC call on app load (with commented code) * feat: remove all comments from main.js * Update frontend/components/ManageStakingPage/StakingContractSection/index.tsx * Update frontend/components/ManageStakingPage/StakingContractSection/index.tsx * Update frontend/components/ManageStakingPage/StakingContractSection/index.tsx Co-authored-by: Mohan <[email protected]> * Update frontend/components/ManageStakingPage/StakingContractSection/index.tsx * chore: prettier fix * refactor: seperate CountdownUntilMigration * hotfix: update actions/upload-artifact to v4 * hotfix: update checkout and download-artifact actions to v4 * fix: add version prefix * bump: rc127 * refactor: numerous changes * chore: fix leftover `stakingProgram` references * chore: comment purpose * fix: migration and funding button validation * fix: migrate & funding button condition fixes * refactor: can't migrate reason copy * chore: leftover `stakingProgramId` refactor * fix: experienced bug where alpha showed during migration * fix: use Text component instead of span * fix: Badge "Active" status to be displayed only on active staking contract (#345) * fix StakingContractTag * fix * fix: reinstate #345 changes after overwrite due to merge conflicts * chore: better comment * Update frontend/components/ManageStakingPage/StakingContractSection/CountdownUntilMigration.tsx Co-authored-by: Mohan <[email protected]> * Update frontend/components/ManageStakingPage/StakingContractSection/CountdownUntilMigration.tsx --------- Co-authored-by: Yuri (solarw) Turchenkov <[email protected]> Co-authored-by: jmoreira-valory <[email protected]> Co-authored-by: truemiller <[email protected]> Co-authored-by: Josh Miller <[email protected]>
staking-info.mov