Updating test

This commit is contained in:
Jamie Hewitt 2023-03-24 19:11:42 +03:00
parent ca36582446
commit a5a60a4579
3 changed files with 11 additions and 15 deletions

View File

@ -465,7 +465,7 @@ type VeDelegation @entity {
receiver: VeOCEAN!
tokenId: BigInt!
amount: BigInt!
amountFraction: BigDecimal!
# amountFraction: BigDecimal!
cancelTime: BigInt!
expireTime: BigInt!
block: Int!

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

View File

@ -649,10 +649,10 @@ describe('veOcean tests', async () => {
assert(tx3, 'Transaction failed')
assert(tx3.events.DelegateBoost, 'No Delegate boost event')
sleep(2000)
sleep(3000)
const delegateQuery = {
query: `query {
veDelegation(id:"${tx3.events.DelegateBoost.returnValues._token_id}"){
veDelegations{
id
delegator {
id
@ -661,12 +661,8 @@ describe('veOcean tests', async () => {
id
}
tokenId
amount
cancelTime
expireTime
block
}
}`
}
}`
}
const delegateResponse = await fetch(subgraphUrl, {