diff --git a/schema.graphql b/schema.graphql index 3d2a64a..1905595 100644 --- a/schema.graphql +++ b/schema.graphql @@ -465,7 +465,6 @@ type VeDelegation @entity { receiver: VeOCEAN! tokenId: BigInt! amount: BigInt! - amountFraction: BigDecimal! cancelTime: BigInt! expireTime: BigInt! block: Int! diff --git a/src/mappings/utils/veUtils.ts b/src/mappings/utils/veUtils.ts index 2bc3459..8acf192 100644 --- a/src/mappings/utils/veUtils.ts +++ b/src/mappings/utils/veUtils.ts @@ -129,7 +129,6 @@ export function getveDelegation(id: string): VeDelegation { veDelegation.cancelTime = BigInt.zero() veDelegation.expireTime = BigInt.zero() veDelegation.tokenId = BigInt.zero() - veDelegation.amountFraction = BigDecimal.zero() veDelegation.amount = BigInt.zero() veDelegation.receiver = '' veDelegation.delegator = '' diff --git a/src/mappings/veDelegation.ts b/src/mappings/veDelegation.ts index e1a57e5..d91c2e7 100644 --- a/src/mappings/veDelegation.ts +++ b/src/mappings/veDelegation.ts @@ -19,12 +19,6 @@ 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 - ) - } veDelegation.receiver = _receiver veDelegation.tokenId = _tokenId veDelegation.amount = _amount @@ -43,12 +37,6 @@ 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 = weiToDecimal(_amount.toBigDecimal(), 18).div( - delegatorVeOcean.lockedAmount - ) - } veDelegation.delegator = _delegator veDelegation.receiver = _receiver veDelegation.tokenId = _tokenId @@ -72,6 +60,5 @@ export function handleBurnBoost(event: BurnBoost): void { // delete const veDelegation = getveDelegation(_tokenId.toHex()) - veDelegation.amountFraction = BigDecimal.zero() veDelegation.amount = BigInt.zero() } diff --git a/test/integration/VeOcean.test.ts b/test/integration/VeOcean.test.ts index 74546f3..eb2dbdd 100644 --- a/test/integration/VeOcean.test.ts +++ b/test/integration/VeOcean.test.ts @@ -656,7 +656,6 @@ describe('veOcean tests', async () => { }, tokenId, amount, - amountFraction, cancelTime, expireTime }