Renaming consumeFee to orderFee (#434)

This commit is contained in:
Jamie Hewitt 2022-05-17 12:27:48 +03:00 committed by GitHub
parent ed462c4e10
commit 4e5bcba661
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -490,8 +490,8 @@ type OPC @entity {
swapOceanFee: BigDecimal
"fee in percent for swaps involving non OPC approved tokens"
swapNonOceanFee: BigDecimal
"fee in percent taken by OPC from consumeFees"
consumeFee: BigDecimal
"fee in percent taken by OPC from orderFees"
orderFee: BigDecimal
"fee in percent taken by OPC from providerFees"
providerFee: BigDecimal
approvedTokens: [String!]

View File

@ -35,7 +35,7 @@ export function handleOPCFeeChanged(event: OPCFeeChanged): void {
event.params.newSwapNonOceanFee.toBigDecimal(),
decimals
)
opc.consumeFee = weiToDecimal(
opc.orderFee = weiToDecimal(
event.params.newConsumeFee.toBigDecimal(),
decimals
)
@ -62,12 +62,12 @@ export function handleTokenAdded(event: TokenAdded): void {
decimals
)
const newConsumeFee = contract.try_getOPCConsumeFee()
if (newConsumeFee.reverted) return
const newOrderFee = contract.try_getOPCConsumeFee()
if (newOrderFee.reverted) return
const newProviderFee = contract.try_getOPCProviderFee()
if (newProviderFee.reverted) return
opc.consumeFee = weiToDecimal(newConsumeFee.value.toBigDecimal(), decimals)
opc.orderFee = weiToDecimal(newOrderFee.value.toBigDecimal(), decimals)
opc.providerFee = weiToDecimal(newProviderFee.value.toBigDecimal(), decimals)
// add token to approvedTokens