Skip to content
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

fix: Show mana balance for genesis outputs #1455

Merged
merged 1 commit into from
Apr 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion client/src/app/routes/nova/OutputPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const OutputPage: React.FC<RouteComponentProps<OutputPageProps>> = ({
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)
Expand Down
2 changes: 1 addition & 1 deletion client/src/helpers/nova/hooks/useAddressBalance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Loading