Skip to content

Commit

Permalink
OCT-2057: Improve Effective Balance tooltip (#520)
Browse files Browse the repository at this point in the history
…le fix (admin mode)

## Description

## Definition of Done

1. [ ] If required, the desciption of your change is added to the [QA
changelog](https://www.notion.so/octantapp/Changelog-for-the-QA-d96fa3b411cf488bb1d8d9a598d88281)
2. [ ] Acceptance criteria are met.
3. [ ] PR is manually tested before the merge by developer(s).
    - [ ] Happy path is manually checked.
4. [ ] PR is manually tested by QA when their assistance is required
(1).
- [ ] Octant Areas & Test Cases are checked for impact and updated if
required (2).
5. [ ] Unit tests are added unless there is a reason to omit them.
6. [ ] Automated tests are added when required.
7. [ ] The code is merged.
8. [ ] Tech documentation is added / updated, reviewed and approved
(including mandatory approval by a code owner, should such exist for
changed files).
    - [ ] BE: Swagger documentation is updated.
9. [ ] When required by QA:
    - [ ] Deployed to the relevant environment.
    - [ ] Passed system tests.

---

(1) Developer(s) in coordination with QA decide whether it's required.
For small tickets introducing small changes QA assistance is most
probably not required.

(2) [Octant Areas & Test
Cases](https://docs.google.com/spreadsheets/d/1cRe6dxuKJV3a4ZskAwWEPvrFkQm6rEfyUCYwLTYw_Cc).
  • Loading branch information
jmikolajczyk authored Oct 22, 2024
2 parents 7dd3327 + 5b7dec1 commit 47ea3b9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import GridTile from 'components/shared/Grid/GridTile';
import Sections from 'components/ui/BoxRounded/Sections/Sections';
import Button from 'components/ui/Button';
import DoubleValue from 'components/ui/DoubleValue';
import useIsProjectAdminMode from 'hooks/helpers/useIsProjectAdminMode';
import useMediaQuery from 'hooks/helpers/useMediaQuery';
import useCurrentEpoch from 'hooks/queries/useCurrentEpoch';
import useDepositValue from 'hooks/queries/useDepositValue';
Expand Down Expand Up @@ -39,14 +38,10 @@ const HomeGridCurrentGlmLock: FC<HomeGridCurrentGlmLockProps> = ({ className })
const { data: depositsValue, isFetching: isFetchingDepositValue } = useDepositValue();

const isPreLaunch = getIsPreLaunch(currentEpoch);
const isProjectAdminMode = useIsProjectAdminMode();

return (
<>
<GridTile
className={className}
title={isProjectAdminMode ? t('yourFunds') : t('currentGlmLock')}
>
<GridTile className={className} title={t('currentGlmLock')}>
<div className={styles.root}>
<DoubleValue
cryptoCurrency="golem"
Expand Down Expand Up @@ -78,7 +73,7 @@ const HomeGridCurrentGlmLock: FC<HomeGridCurrentGlmLockProps> = ({ className })
valueCrypto: estimatedEffectiveDeposit,
},
isDisabled: isPreLaunch && !isConnected,
label: isProjectAdminMode ? i18n.t('common.pending') : t('effective'),
label: t('effective'),
tooltipProps: {
dataTest: 'TooltipEffectiveLockedBalance',
position: 'bottom-right',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ const HomeGridPersonalAllocation: FC<HomeGridPersonalAllocationProps> = ({ class

return (
<>
<GridTile className={className} title={i18n.t('common.personalAllocation')}>
<GridTile
className={className}
title={isProjectAdminMode ? t('yourFunds') : i18n.t('common.personalAllocation')}
>
<div className={styles.root}>
<DoubleValue
cryptoCurrency="ethereum"
Expand Down
4 changes: 2 additions & 2 deletions client/src/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,9 @@
},
"homeGridCurrentGlmLock": {
"currentGlmLock": "Current GLM lock",
"yourFunds": "Your funds",
"editLockedGLM": "Edit Locked GLM",
"effective": "Effective",
"tooltipText": "Effective lock (EL) is the part of your locked GLM that is currently earning rewards. Equal to your current balance, if that is unchanged during the ongoing epoch. Increase lock & EL increases proportionally to epoch time remaining. Decrease lock & this amount is removed from EL for the epoch.",
"tooltipText": "Effective lock (EL) is the part of your locked GLM that is currently earning rewards. Lock more & EL increases proportionally to epoch time remaining. Unlock GLM & that amount is removed from EL for the epoch. Note that if EL falls below 100, no rewards will be calculated.",
"modalLockGlm": {
"unlockGLM": "Unlock GLM",
"lockGlmBudgetBox": {
Expand All @@ -121,6 +120,7 @@
}
},
"homeGridPersonalAllocation": {
"yourFunds": "Your funds",
"withdrawToWallet": "Withdraw to wallet",
"pendingFundsAvailableAfter": "Pending funds available after",
"modalWithdrawEth": {
Expand Down

0 comments on commit 47ea3b9

Please sign in to comment.