difftreelog
feat update tokenURI
in: master
4 files changed
pallets/nonfungible/src/erc.rsdiffbeforeafterboth--- a/pallets/nonfungible/src/erc.rs
+++ b/pallets/nonfungible/src/erc.rs
@@ -252,7 +252,7 @@
}
}
- return Ok(base_uri + token_id.to_string().as_str());
+ return Ok(base_uri);
}
}
pallets/refungible/src/erc.rsdiffbeforeafterboth--- a/pallets/refungible/src/erc.rs
+++ b/pallets/refungible/src/erc.rs
@@ -248,7 +248,7 @@
}
}
- return Ok(base_uri + token_id.to_string().as_str());
+ return Ok(base_uri);
}
}
tests/src/eth/nonFungible.test.tsdiffbeforeafterboth--- a/tests/src/eth/nonFungible.test.ts
+++ b/tests/src/eth/nonFungible.test.ts
@@ -117,9 +117,9 @@
expect(await contract.methods.tokenURI(nextTokenId).call()).to.be.equal('Token URI');
});
- itEth('TokenURI from baseURI + tokenId', async ({helper}) => {
+ itEth('TokenURI from baseURI', async ({helper}) => {
const {contract, nextTokenId} = await setup(helper, 'BaseURI_');
- expect(await contract.methods.tokenURI(nextTokenId).call()).to.be.equal('BaseURI_' + nextTokenId);
+ expect(await contract.methods.tokenURI(nextTokenId).call()).to.be.equal('BaseURI_');
});
itEth('TokenURI from baseURI + suffix', async ({helper}) => {
tests/src/eth/reFungibleToken.test.tsdiffbeforeafterboth114 expect(await contract.methods.tokenURI(nextTokenId).call()).to.be.equal('Token URI');114 expect(await contract.methods.tokenURI(nextTokenId).call()).to.be.equal('Token URI');115 });115 });116116117 itEth('TokenURI from baseURI + tokenId', async ({helper}) => {117 itEth('TokenURI from baseURI', async ({helper}) => {118 const {contract, nextTokenId} = await setup(helper, 'BaseURI_');118 const {contract, nextTokenId} = await setup(helper, 'BaseURI_');119 expect(await contract.methods.tokenURI(nextTokenId).call()).to.be.equal('BaseURI_' + nextTokenId);119 expect(await contract.methods.tokenURI(nextTokenId).call()).to.be.equal('BaseURI_');120 });120 });121121122 itEth('TokenURI from baseURI + suffix', async ({helper}) => {122 itEth('TokenURI from baseURI + suffix', async ({helper}) => {