Update handle extend boost

This commit is contained in:
Jamie Hewitt 2023-03-22 15:44:04 +03:00
parent 0178464cff
commit 03ac1bb335
1 changed files with 12 additions and 12 deletions

View File

@ -18,12 +18,12 @@ export function handleDelegation(event: DelegateBoost): void {
const veDelegation = getveDelegation(_tokenId.toHex())
veDelegation.delegator = _delegator
getveOCEAN(_receiver)
const delegatorVeOcean = getveOCEAN(_delegator)
if (_amount && delegatorVeOcean.lockedAmount) {
veDelegation.amountFraction = _amount.divDecimal(
delegatorVeOcean.lockedAmount
)
}
// const delegatorVeOcean = getveOCEAN(_delegator)
// if (_amount && delegatorVeOcean.lockedAmount) {
// veDelegation.amountFraction = _amount.divDecimal(
// delegatorVeOcean.lockedAmount
// )
// }
veDelegation.receiver = _receiver
veDelegation.tokenId = _tokenId
veDelegation.amount = _amount
@ -42,12 +42,12 @@ export function handleExtendBoost(event: ExtendBoost): void {
const _expireTime = event.params._expire_time
const veDelegation = getveDelegation(_tokenId.toHex())
const delegatorVeOcean = getveOCEAN(_delegator)
if (_amount && delegatorVeOcean.lockedAmount) {
veDelegation.amountFraction = _amount.divDecimal(
delegatorVeOcean.lockedAmount
)
}
// const delegatorVeOcean = getveOCEAN(_delegator)
// if (_amount && delegatorVeOcean.lockedAmount) {
// veDelegation.amountFraction = _amount.divDecimal(
// delegatorVeOcean.lockedAmount
// )
// }
veDelegation.delegator = _delegator
veDelegation.receiver = _receiver
veDelegation.tokenId = _tokenId