Skip to content

Commit d62f32d

Browse files
committed
fix: cleanup ms logic
1 parent f4147d2 commit d62f32d

File tree

1 file changed

+2
-7
lines changed
  • packages/processors/src/processors/strategy/donationVotingMerkleDistributionDirectTransfer/handlers

1 file changed

+2
-7
lines changed

packages/processors/src/processors/strategy/donationVotingMerkleDistributionDirectTransfer/handlers/allocated.handler.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,7 @@ import { getAddress } from "viem";
33
import { Changeset, Donation } from "@grants-stack-indexer/repository";
44
import { ChainId, getTokenOrThrow, ProcessorEvent } from "@grants-stack-indexer/shared";
55

6-
import {
7-
getDateFromTimestamp,
8-
getTokenAmountInUsd,
9-
getUsdInTokenAmount,
10-
} from "../../../../helpers/index.js";
6+
import { getTokenAmountInUsd, getUsdInTokenAmount } from "../../../../helpers/index.js";
117
import {
128
IEventHandler,
139
MetadataParsingFailed,
@@ -104,8 +100,7 @@ export class DVMDAllocatedHandler implements IEventHandler<"Strategy", "Allocate
104100
amount: amount,
105101
amountInUsd,
106102
amountInRoundMatchToken,
107-
timestamp:
108-
getDateFromTimestamp(BigInt(Math.floor(priceTimestamp / 1000))) ?? new Date(0), // TODO: Ask Gitcoin if this is correct; should fallback to epoch start?
103+
timestamp: priceTimestamp >= 0 ? new Date(priceTimestamp) : new Date(0), // TODO: Ask Gitcoin if this is correct; should fallback to epoch start?
109104
};
110105

111106
return [

0 commit comments

Comments
 (0)