We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b3d229a commit 01e2a33Copy full SHA for 01e2a33
src/mappings/fixedRateExchange.ts
@@ -1,4 +1,4 @@
1
-import { BigInt, log } from '@graphprotocol/graph-ts'
+import { BigInt } from '@graphprotocol/graph-ts'
2
import {
3
ExchangeActivated,
4
ExchangeAllowedSwapperChanged,
@@ -32,7 +32,10 @@ export function handleExchangeCreated(event: ExchangeCreated): void {
32
).id
33
34
fixedRateExchange.active = false
35
- fixedRateExchange.price = event.params.fixedRate.toBigDecimal()
+ fixedRateExchange.price = weiToDecimal(
36
+ event.params.fixedRate.toBigDecimal(),
37
+ BigInt.fromI32(18).toI32()
38
+ )
39
fixedRateExchange.createdTimestamp = event.block.timestamp.toI32()
40
fixedRateExchange.tx = event.transaction.hash.toHex()
41
fixedRateExchange.block = event.block.number.toI32()
0 commit comments