Updating test
This commit is contained in:
parent
ca36582446
commit
a5a60a4579
|
@ -465,7 +465,7 @@ type VeDelegation @entity {
|
|||
receiver: VeOCEAN!
|
||||
tokenId: BigInt!
|
||||
amount: BigInt!
|
||||
amountFraction: BigDecimal!
|
||||
# amountFraction: BigDecimal!
|
||||
cancelTime: BigInt!
|
||||
expireTime: BigInt!
|
||||
block: Int!
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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, {
|
||||
|
|
Loading…
Reference in New Issue