Adding comments

This commit is contained in:
Jamie Hewitt 2023-03-22 17:06:26 +03:00
parent 87bc33c869
commit 12257a5b35

View File

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