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, { const dtContract = new this.web3.eth.Contract(this.datatokensAbi, datatokenAddress, {
from: address from: address
}) })
const publishingMarketFeeAddress = ( const mktFeeAddress = (await dtContract.methods.getPublishingMarketFee().call())[0]
await dtContract.methods.getPublishingMarketFee().call() if (mktFeeAddress !== address) {
)[0]
if (publishingMarketFeeAddress !== address) {
throw new Error(`Caller is not the Publishing Market Fee Address`) throw new Error(`Caller is not the Publishing Market Fee Address`)
} }
const estGas = await this.estGasSetPublishingMarketFee( const estGas = await this.estGasSetPublishingMarketFee(