Skip to content

Commit 01e2a33

Browse files
committed
fix rate
1 parent b3d229a commit 01e2a33

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/mappings/fixedRateExchange.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { BigInt, log } from '@graphprotocol/graph-ts'
1+
import { BigInt } from '@graphprotocol/graph-ts'
22
import {
33
ExchangeActivated,
44
ExchangeAllowedSwapperChanged,
@@ -32,7 +32,10 @@ export function handleExchangeCreated(event: ExchangeCreated): void {
3232
).id
3333

3434
fixedRateExchange.active = false
35-
fixedRateExchange.price = event.params.fixedRate.toBigDecimal()
35+
fixedRateExchange.price = weiToDecimal(
36+
event.params.fixedRate.toBigDecimal(),
37+
BigInt.fromI32(18).toI32()
38+
)
3639
fixedRateExchange.createdTimestamp = event.block.timestamp.toI32()
3740
fixedRateExchange.tx = event.transaction.hash.toHex()
3841
fixedRateExchange.block = event.block.number.toI32()

0 commit comments

Comments
 (0)