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 swapOceanFee: BigDecimal
"fee in percent for swaps involving non OPC approved tokens" "fee in percent for swaps involving non OPC approved tokens"
swapNonOceanFee: BigDecimal swapNonOceanFee: BigDecimal
"fee in percent taken by OPC from consumeFees" "fee in percent taken by OPC from orderFees"
consumeFee: BigDecimal orderFee: BigDecimal
"fee in percent taken by OPC from providerFees" "fee in percent taken by OPC from providerFees"
providerFee: BigDecimal providerFee: BigDecimal
approvedTokens: [String!] approvedTokens: [String!]

View File

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