git.delta.rocks / unique-network / refs/commits / 8c42de5841ab

difftreelog

feat update tokenURI

Grigoriy Simonov2022-10-12parent: #44771a5.patch.diff
in: master

4 files changed

modifiedpallets/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);
 			}
 		}
 
modifiedpallets/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);
 			}
 		}
 
modifiedtests/src/eth/nonFungible.test.tsdiffbeforeafterboth
117 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 });
119119
120 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 });
124124
125 itEth('TokenURI from baseURI + suffix', async ({helper}) => {125 itEth('TokenURI from baseURI + suffix', async ({helper}) => {
modifiedtests/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}) => {