1
0
mirror of https://github.com/oceanprotocol/ocean.js.git synced 2024-11-26 20:39:05 +01:00

Fixing codeclimate issue

This commit is contained in:
Jamie Hewitt 2022-05-18 17:07:53 +03:00
parent 4b9f6c9c00
commit 729a60f9a9

View File

@ -1362,10 +1362,8 @@ export class Datatoken {
const dtContract = new this.web3.eth.Contract(this.datatokensAbi, datatokenAddress, {
from: address
})
const publishingMarketFeeAddress = (
await dtContract.methods.getPublishingMarketFee().call()
)[0]
if (publishingMarketFeeAddress !== address) {
const mktFeeAddress = (await dtContract.methods.getPublishingMarketFee().call())[0]
if (mktFeeAddress !== address) {
throw new Error(`Caller is not the Publishing Market Fee Address`)
}
const estGas = await this.estGasSetPublishingMarketFee(