Skip to content

Commit

Permalink
[HOTFIX]: Allocation badge epoch fix + metrics max number of digits o… (
Browse files Browse the repository at this point in the history
#534)

…n mobile

## 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 28, 2024
2 parents ba7d5d0 + 95650a8 commit 26c5ea9
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ const MetricsEpochGridTotalDonations: FC<MetricsEpochGridTotalDonationsProps> =

const totalUserDonationsValues = getValuesToDisplay({
cryptoCurrency: 'ethereum',
getFormattedEthValueProps: {
maxNumberOfDigitsToShow: 6,
},
showCryptoSuffix: true,
valueCrypto: totalUserDonations,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ const MetricsEpochGridTotalMatchingFund: FC<MetricsEpochGridTotalMatchingFundPro

const totalMatchingFundToDisplay = getValuesToDisplay({
cryptoCurrency: 'ethereum',
getFormattedEthValueProps: {
maxNumberOfDigitsToShow: 6,
},
showCryptoSuffix: true,
valueCrypto: matchingFund,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ const MetricsEpochGridUnallocatedValue: FC<MetricsEpochGridUnallocatedValueProps

const unallocatedValue = getValuesToDisplay({
cryptoCurrency: 'ethereum',
getFormattedEthValueProps: {
maxNumberOfDigitsToShow: 6,
},
showCryptoSuffix: true,
valueCrypto: epochUnusedRewards?.value,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ const LayoutFooter: FC<LayoutFooterProps> = ({ className }) => {
];

useLayoutEffect(() => {
if (!newsletterRef.current || newsletterRef.current.children.length) {return;}
if (!newsletterRef.current || newsletterRef.current.children.length) {
return;
}
const script = document.createElement('script');
script.setAttribute(
'src',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const LayoutTopBarCalendar = (): ReactElement => {
const [isCalendarOpen, setIsCalendarOpen] = useState(false);

const allocationInfoText = useMemo(() => {
const epoch = currentEpoch! - 1;
const epoch = isDecisionWindowOpen ? currentEpoch! - 1 : currentEpoch!;

const durationMinutes = `${durationToChangeAWInMinutes}${isMobile ? `${t('minutesShort')}` : ` ${t('minutes', { count: durationToChangeAWInMinutes })}`}`;

Expand Down

0 comments on commit 26c5ea9

Please sign in to comment.