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
--- 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}) => {
modifiedtests/src/eth/reFungibleToken.test.tsdiffbeforeafterboth
114 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 });
116116
117 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 });
121121
122 itEth('TokenURI from baseURI + suffix', async ({helper}) => {122 itEth('TokenURI from baseURI + suffix', async ({helper}) => {