diff --git a/client/src/api/calls/history.ts b/client/src/api/calls/history.ts index fe5d262063..0330afbcd1 100644 --- a/client/src/api/calls/history.ts +++ b/client/src/api/calls/history.ts @@ -19,7 +19,7 @@ export type AllocationEventType = { projectAddress: string; }[]; isManuallyEdited: boolean | null; - leverage: string; + leverage: string | null; // elements from before the migration have leverage null }; type EventType = { diff --git a/client/src/components/Earn/EarnHistory/EarnHistoryItemDetails/EarnHistoryItemDetailsAllocation/EarnHistoryItemDetailsAllocation.tsx b/client/src/components/Earn/EarnHistory/EarnHistoryItemDetails/EarnHistoryItemDetailsAllocation/EarnHistoryItemDetailsAllocation.tsx index 5985bb59df..8d4d2943e1 100644 --- a/client/src/components/Earn/EarnHistory/EarnHistoryItemDetails/EarnHistoryItemDetailsAllocation/EarnHistoryItemDetailsAllocation.tsx +++ b/client/src/components/Earn/EarnHistory/EarnHistoryItemDetails/EarnHistoryItemDetailsAllocation/EarnHistoryItemDetailsAllocation.tsx @@ -48,7 +48,7 @@ const EarnHistoryItemDetailsAllocation: FC{leverageInt}x, + childrenRight: ( +
+ {leverage === null ? t('sections.leverageUnknown') : `${leverageInt}x`} +
+ ), label: t('sections.estimatedLeverage'), tooltipProps: { position: 'bottom-right', - text: t('sections.allocationTooltips.leverage'), + text: + leverage === null + ? t('sections.allocationTooltips.leverageUnknown') + : t('sections.allocationTooltips.leverage'), tooltipClassName: styles.tooltip, }, } diff --git a/client/src/locales/en/translation.json b/client/src/locales/en/translation.json index 11ead636e3..4d1191093d 100644 --- a/client/src/locales/en/translation.json +++ b/client/src/locales/en/translation.json @@ -220,7 +220,9 @@ "when": "When", "withdrawal": "Withdrew ETH", "matchingFundDonation": "Matching fund donation", + "leverageUnknown": "Unknown", "allocationTooltips": { + "leverageUnknown": "We do not know the leverage for this past allocation.", "finalMatchFunding": "Once allocation period has finished we know the exact amount of your matched funding your donation attracted, so we show that rather than just your estimated leverage amount.", "leverage": "Leverage shows the multiple of your donation the projects you chose will receive in matched funding. Note that it may change wildly during an epoch, and be very different to your final matched funding." }