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

Updating tests

This commit is contained in:
Jamie Hewitt 2022-04-21 12:48:28 +02:00
parent c6ddaa094a
commit a81cdddc30
2 changed files with 7 additions and 4 deletions

View File

@ -1410,11 +1410,13 @@ export class Datatoken {
})
const publishingMarketFee = await dtContract.methods.getPublishingMarketFee().call()
console.log('publishingMarketFee', publishingMarketFee)
const returnValues = {
publishMarketFeeAddress: publishingMarketFee[0],
publishMarketFeeToken: publishingMarketFee[1],
publishMarketFeeAmount: publishingMarketFee[2]
}
console.log('returnValues', returnValues)
return returnValues
}
}

View File

@ -586,19 +586,20 @@ describe('Datatoken', () => {
originalPublishingMarketFee.publishMarketFeeToken
)
})
it('#setPublishingMarketFee - nftOwner should be able to set the Publishing Market Fee', async () => {
it('#setPublishingMarketFee - Marketplace fee address should be able to set the Publishing Market Fee', async () => {
console.log('users: ', user1, user2, user3, nftOwner, erc20DeployerUser)
const originalPublishingMarketFee = await datatoken.getPublishingMarketFee(
datatokenAddress,
nftOwner
user1
)
console.log('originalPublishingMarketFee', originalPublishingMarketFee)
try {
await datatoken.setPublishingMarketFee(
datatokenAddress,
nftOwner,
user1,
contracts.daiAddress,
web3.utils.toWei('10'),
nftOwner
user1
)
} catch (e) {
console.log('Error', e)