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

fix nft get data

This commit is contained in:
Bogdan Fazakas 2023-03-06 17:22:27 +02:00
parent 4cfd469c61
commit c8554073c3
2 changed files with 3 additions and 3 deletions

View File

@ -722,7 +722,7 @@ export class Nft extends SmartContract {
const nftContract = this.getContract(nftAddress)
const keyHash = ethers.utils.keccak256(ethers.utils.toUtf8Bytes(key))
const keyHash = ethers.utils.keccak256(key)
const valueHex = ethers.utils.hexlify(ethers.utils.toUtf8Bytes(value))
const estGas = await nftContract.estimateGas.setNewData(keyHash, valueHex)

View File

@ -674,7 +674,7 @@ describe('NFT', () => {
})
it('#setData - should FAIL to set a value into 725Y standard, if Caller has NOT store updater permission', async () => {
const key = 'KEY'
const key = '0x1234'
const data = 'NewData'
assert(
(await nftDatatoken.getNftPermissions(nftAddress, await user1.getAddress()))
@ -690,7 +690,7 @@ describe('NFT', () => {
})
it('#setData - should set a value into 725Y standard, if Caller has store updater permission', async () => {
const key = 'KEY'
const key = '0x1234'
const data = 'NewData'
// add store updater permission