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() const publishingMarketFee = await dtContract.methods.getPublishingMarketFee().call()
console.log('publishingMarketFee', publishingMarketFee)
const returnValues = { const returnValues = {
publishMarketFeeAddress: publishingMarketFee[0], publishMarketFeeAddress: publishingMarketFee[0],
publishMarketFeeToken: publishingMarketFee[1], publishMarketFeeToken: publishingMarketFee[1],
publishMarketFeeAmount: publishingMarketFee[2] publishMarketFeeAmount: publishingMarketFee[2]
} }
console.log('returnValues', returnValues)
return returnValues return returnValues
} }
} }

View File

@ -586,19 +586,20 @@ describe('Datatoken', () => {
originalPublishingMarketFee.publishMarketFeeToken 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( const originalPublishingMarketFee = await datatoken.getPublishingMarketFee(
datatokenAddress, datatokenAddress,
nftOwner user1
) )
console.log('originalPublishingMarketFee', originalPublishingMarketFee) console.log('originalPublishingMarketFee', originalPublishingMarketFee)
try { try {
await datatoken.setPublishingMarketFee( await datatoken.setPublishingMarketFee(
datatokenAddress, datatokenAddress,
nftOwner, user1,
contracts.daiAddress, contracts.daiAddress,
web3.utils.toWei('10'), web3.utils.toWei('10'),
nftOwner user1
) )
} catch (e) { } catch (e) {
console.log('Error', e) console.log('Error', e)