From f5e48761f0e112b986b0d49253706a233e05950b Mon Sep 17 00:00:00 2001 From: Mario Date: Fri, 26 Apr 2024 14:38:34 +0200 Subject: [PATCH] fix: Show mana balance for genesis outputs (#1455) --- client/src/app/routes/nova/OutputPage.tsx | 2 +- client/src/helpers/nova/hooks/useAddressBalance.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/app/routes/nova/OutputPage.tsx b/client/src/app/routes/nova/OutputPage.tsx index 663d481fd..3933874b4 100644 --- a/client/src/app/routes/nova/OutputPage.tsx +++ b/client/src/app/routes/nova/OutputPage.tsx @@ -63,7 +63,7 @@ const OutputPage: React.FC> = ({ const slotIndex = outputMetadataResponse?.included?.slot; let outputManaDetails: OutputManaDetails | null = null; - if (output && createdSlotIndex && protocolInfo) { + if (output && createdSlotIndex !== null && protocolInfo) { const untilSlotIndex = spentSlotIndex ? spentSlotIndex : latestConfirmedSlot > 0 ? latestConfirmedSlot : null; outputManaDetails = untilSlotIndex ? buildManaDetailsForOutput(output, createdSlotIndex, untilSlotIndex, protocolInfo.parameters, manaRewards?.rewards ?? null) diff --git a/client/src/helpers/nova/hooks/useAddressBalance.ts b/client/src/helpers/nova/hooks/useAddressBalance.ts index 56349efeb..2bbeb629f 100644 --- a/client/src/helpers/nova/hooks/useAddressBalance.ts +++ b/client/src/helpers/nova/hooks/useAddressBalance.ts @@ -67,7 +67,7 @@ export function useAddressBalance( const createdSlotIndex = (included?.slot as number) ?? null; const spentSlotIndex = (spent?.slot as number) ?? null; - if (output && createdSlotIndex && protocolInfo) { + if (output && createdSlotIndex !== null && protocolInfo) { const untilSlotIndex = spentSlotIndex ? spentSlotIndex : latestConfirmedSlot > 0 ? latestConfirmedSlot : null; const outputManaDetails = untilSlotIndex ? buildManaDetailsForOutput(