mirror of
https://github.com/oceanprotocol/ocean-subgraph.git
synced 2024-12-02 05:57:29 +01:00
fix rate
This commit is contained in:
parent
b3d229a543
commit
01e2a33021
@ -1,4 +1,4 @@
|
||||
import { BigInt, log } from '@graphprotocol/graph-ts'
|
||||
import { BigInt } from '@graphprotocol/graph-ts'
|
||||
import {
|
||||
ExchangeActivated,
|
||||
ExchangeAllowedSwapperChanged,
|
||||
@ -32,7 +32,10 @@ export function handleExchangeCreated(event: ExchangeCreated): void {
|
||||
).id
|
||||
|
||||
fixedRateExchange.active = false
|
||||
fixedRateExchange.price = event.params.fixedRate.toBigDecimal()
|
||||
fixedRateExchange.price = weiToDecimal(
|
||||
event.params.fixedRate.toBigDecimal(),
|
||||
BigInt.fromI32(18).toI32()
|
||||
)
|
||||
fixedRateExchange.createdTimestamp = event.block.timestamp.toI32()
|
||||
fixedRateExchange.tx = event.transaction.hash.toHex()
|
||||
fixedRateExchange.block = event.block.number.toI32()
|
||||
|
Loading…
Reference in New Issue
Block a user