mirror of
https://github.com/oceanprotocol/ocean-subgraph.git
synced 2024-12-02 05:57:29 +01:00
Use event.params.ts
This commit is contained in:
parent
de7b439cc4
commit
59e6935b4d
@ -20,7 +20,7 @@ export function handleDelegation(event: DelegateBoost): void {
|
|||||||
getveOCEAN(_receiver)
|
getveOCEAN(_receiver)
|
||||||
const delegator = getveOCEAN(_delegator)
|
const delegator = getveOCEAN(_delegator)
|
||||||
const veDelegation = getveDelegation(event.address, _tokenId.toHex())
|
const veDelegation = getveDelegation(event.address, _tokenId.toHex())
|
||||||
|
const ts = event.params.ts
|
||||||
|
|
||||||
const MAX_TIME = 4 * 365 * 86400 // max lock time
|
const MAX_TIME = 4 * 365 * 86400 // max lock time
|
||||||
veDelegation.delegator = _delegator
|
veDelegation.delegator = _delegator
|
||||||
@ -31,7 +31,7 @@ export function handleDelegation(event: DelegateBoost): void {
|
|||||||
BigInt.fromI32(18).toI32()
|
BigInt.fromI32(18).toI32()
|
||||||
)
|
)
|
||||||
veDelegation.lockedAmount = delegator.lockedAmount
|
veDelegation.lockedAmount = delegator.lockedAmount
|
||||||
veDelegation.timeLeft = Datetime.now() - delegator.unlockTime
|
veDelegation.timeLeft = ts - delegator.unlockTime
|
||||||
veDelegation.cancelTime = _cancelTime
|
veDelegation.cancelTime = _cancelTime
|
||||||
veDelegation.expireTime = _expireTime
|
veDelegation.expireTime = _expireTime
|
||||||
veDelegation.save()
|
veDelegation.save()
|
||||||
|
Loading…
Reference in New Issue
Block a user