Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
prevostc committed Apr 20, 2024
1 parent 95a55fb commit b3877ec
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
2 changes: 0 additions & 2 deletions src/entity/protocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ export function getBeefyCLProtocolSnapshot(timestamp: BigInt, period: BigInt): P
snapshot.harvesterFeesCollectedUSD = ZERO_BD
snapshot.strategistFeesCollectedNative = ZERO_BD
snapshot.strategistFeesCollectedUSD = ZERO_BD
snapshot.zapFeesCollectedNative = ZERO_BD
snapshot.zapFeesCollectedUSD = ZERO_BD

// copy non-reseting values from the previous snapshot to the new snapshot
const previousInterval = getPreviousSnapshotIdSuffix(period, interval)
Expand Down
5 changes: 1 addition & 4 deletions src/entity/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ import { ethereum } from "@graphprotocol/graph-ts"
import { Transaction } from "../../generated/schema"
import { ADDRESS_ZERO } from "../utils/address"

export function getTransaction(
block: ethereum.Block,
transaction: ethereum.Transaction,
): Transaction {
export function getTransaction(block: ethereum.Block, transaction: ethereum.Transaction): Transaction {
let transactionId = transaction.hash
let tx = Transaction.load(transactionId)
if (!tx) {
Expand Down
1 change: 1 addition & 0 deletions src/utils/time.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export const PROTOCOL_SNAPSHOT_PERIODS = [DAY, MONTH, QUARTER, YEAR]
export const VAULT_SNAPSHOT_PERIODS = [HOUR, DAY, MONTH]
export const INVESTOR_SNAPSHOT_PERIODS = [HOUR, DAY, MONTH]


@inline
export function getIntervalFromTimestamp(timestamp: BigInt, period: BigInt): BigInt {
// if the period is not stable, use date math to calculate the interval
Expand Down

0 comments on commit b3877ec

Please sign in to comment.