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
|
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!]
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user