mirror of
https://github.com/oceanprotocol/ocean-subgraph.git
synced 2024-12-02 05:57:29 +01:00
Fixes
This commit is contained in:
parent
59e6935b4d
commit
a21b03c495
@ -469,7 +469,7 @@ type VeDelegation @entity {
|
||||
tokenId: BigInt!
|
||||
amount: BigDecimal!
|
||||
lockedAmount: BigDecimal!
|
||||
timeLeft: BigDecimal!
|
||||
timeLeft: Int!
|
||||
cancelTime: BigInt!
|
||||
expireTime: BigInt!
|
||||
updates: [VeDelegationUpdate!] @derivedFrom(field: "veDelegation")
|
||||
|
@ -137,7 +137,7 @@ export function getveDelegation(
|
||||
veDelegation.receiver = ''
|
||||
veDelegation.delegator = ''
|
||||
veDelegation.lockedAmount = BigDecimal.zero()
|
||||
veDelegation.timeLeft = BigDecimal.zero()
|
||||
veDelegation.timeLeft = BigInt.zero()
|
||||
veDelegation.save()
|
||||
}
|
||||
return veDelegation
|
||||
|
@ -20,7 +20,7 @@ export function handleDelegation(event: DelegateBoost): void {
|
||||
getveOCEAN(_receiver)
|
||||
const delegator = getveOCEAN(_delegator)
|
||||
const veDelegation = getveDelegation(event.address, _tokenId.toHex())
|
||||
const ts = event.params.ts
|
||||
const ts = event.block.timestamp.toI32()
|
||||
|
||||
const MAX_TIME = 4 * 365 * 86400 // max lock time
|
||||
veDelegation.delegator = _delegator
|
||||
@ -31,7 +31,7 @@ export function handleDelegation(event: DelegateBoost): void {
|
||||
BigInt.fromI32(18).toI32()
|
||||
)
|
||||
veDelegation.lockedAmount = delegator.lockedAmount
|
||||
veDelegation.timeLeft = ts - delegator.unlockTime
|
||||
veDelegation.timeLeft = delegator.unlockTime - ts
|
||||
veDelegation.cancelTime = _cancelTime
|
||||
veDelegation.expireTime = _expireTime
|
||||
veDelegation.save()
|
||||
|
Loading…
Reference in New Issue
Block a user