mirror of
https://github.com/oceanprotocol/ocean-subgraph.git
synced 2024-12-02 05:57:29 +01:00
Renaming consumeFee to orderFee (#434)
This commit is contained in:
parent
ed462c4e10
commit
4e5bcba661
@ -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!]
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user