diff --git a/package-lock.json b/package-lock.json index 82f1d47e..660b968c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@multiversx/sdk-core", - "version": "11.4.0-alpha.1", + "version": "11.4.0-alpha.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@multiversx/sdk-core", - "version": "11.4.0-alpha.1", + "version": "11.4.0-alpha.2", "license": "MIT", "dependencies": { "@multiversx/sdk-transaction-decoder": "1.0.2", diff --git a/package.json b/package.json index 04950487..8cdf353f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@multiversx/sdk-core", - "version": "11.4.0-alpha.1", + "version": "11.4.0-alpha.2", "description": "MultiversX SDK for JavaScript and TypeScript", "main": "out/index.js", "types": "out/index.d.js", diff --git a/src/tokenOperations/codec.spec.ts b/src/tokenOperations/codec.spec.ts index f220ea58..1c2a92e1 100644 --- a/src/tokenOperations/codec.spec.ts +++ b/src/tokenOperations/codec.spec.ts @@ -3,7 +3,7 @@ import { assert } from "chai"; import { bigIntToBuffer, bigIntToHex, bufferToBigInt, bufferToHex, stringToBuffer, utf8ToHex } from "./codec"; describe("test codec", () => { - it.only("should properly encode and decode values", () => { + it("should properly encode and decode values", () => { assert.deepEqual(stringToBuffer("hello"), Buffer.from("hello")); assert.deepEqual(bufferToBigInt(Buffer.from("075bcd15", "hex")), new BigNumber("123456789")); assert.deepEqual(bufferToBigInt(Buffer.from([])), new BigNumber("0")); diff --git a/src/tokenOperations/tokenOperationsFactory.spec.ts b/src/tokenOperations/tokenOperationsFactory.spec.ts index f33c9031..6010019a 100644 --- a/src/tokenOperations/tokenOperationsFactory.spec.ts +++ b/src/tokenOperations/tokenOperationsFactory.spec.ts @@ -30,7 +30,7 @@ describe("test factory", () => { transactionNonce: 42 }); - assert.equal(transaction.getData().toString(), "issue@4652414e4b@4652414e4b@64@00@63616e467265657a65@74727565@63616e57697065@74727565@63616e5061757365@74727565@63616e4d696e74@74727565@63616e4275726e@74727565@63616e4368616e67654f776e6572@74727565@63616e55706772616465@74727565@63616e4164645370656369616c526f6c6573@74727565") + assert.equal(transaction.getData().toString(), "issue@4652414e4b@4652414e4b@64@@63616e467265657a65@74727565@63616e57697065@74727565@63616e5061757365@74727565@63616e4d696e74@74727565@63616e4275726e@74727565@63616e4368616e67654f776e6572@74727565@63616e55706772616465@74727565@63616e4164645370656369616c526f6c6573@74727565") assert.equal(transaction.getNonce(), 42); assert.equal(transaction.getSender().toString(), frank.address.toString()); assert.equal(transaction.getReceiver().toString(), "erd1qqqqqqqqqqqqqqqpqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqzllls8a5w6u"); diff --git a/src/tokenOperations/tokenOperationsFactory.ts b/src/tokenOperations/tokenOperationsFactory.ts index a6a7d20c..3e06a5b8 100644 --- a/src/tokenOperations/tokenOperationsFactory.ts +++ b/src/tokenOperations/tokenOperationsFactory.ts @@ -358,8 +358,8 @@ export class TokenOperationsFactory { ...args.uris.map(utf8ToHex), ]; - // Question for review: is this the one to be considered as "NFT data"? - const nftData = args.attributes + args.uris.join(""); + // Note that the following is an approximation (a reasonable one): + const nftData = args.name + args.hash + args.attributes + args.uris.join(""); const storageGasLimit = nftData.length * this.config.gasLimitStorePerByte.valueOf(); return this.createTransaction({