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.tsdiffbeforeafterboth117 expect(await contract.methods.tokenURI(nextTokenId).call()).to.be.equal('Token URI');117 expect(await contract.methods.tokenURI(nextTokenId).call()).to.be.equal('Token URI');118 });118 });119119120 itEth('TokenURI from baseURI + tokenId', async ({helper}) => {120 itEth('TokenURI from baseURI', async ({helper}) => {121 const {contract, nextTokenId} = await setup(helper, 'BaseURI_');121 const {contract, nextTokenId} = await setup(helper, 'BaseURI_');122 expect(await contract.methods.tokenURI(nextTokenId).call()).to.be.equal('BaseURI_' + nextTokenId);122 expect(await contract.methods.tokenURI(nextTokenId).call()).to.be.equal('BaseURI_');123 });123 });124124125 itEth('TokenURI from baseURI + suffix', async ({helper}) => {125 itEth('TokenURI from baseURI + suffix', async ({helper}) => {tests/src/eth/reFungibleToken.test.tsdiffbeforeafterboth--- a/tests/src/eth/reFungibleToken.test.ts
+++ b/tests/src/eth/reFungibleToken.test.ts
@@ -114,9 +114,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}) => {