Skip to content

Commit

Permalink
Fix after review.
Browse files Browse the repository at this point in the history
  • Loading branch information
andreibancioiu committed Feb 20, 2023
1 parent e4c65af commit fbabc3f
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/tokenOperations/codec.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
Expand Down
2 changes: 1 addition & 1 deletion src/tokenOperations/tokenOperationsFactory.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
4 changes: 2 additions & 2 deletions src/tokenOperations/tokenOperationsFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down

0 comments on commit fbabc3f

Please sign in to comment.