Skip to content

Commit

Permalink
update: adding all integration tests
Browse files Browse the repository at this point in the history
Signed-off-by: svetoslav-nikol0v <[email protected]>
  • Loading branch information
svetoslav-nikol0v committed Mar 26, 2024
1 parent a358a82 commit 0df479c
Show file tree
Hide file tree
Showing 4 changed files with 488 additions and 156 deletions.
33 changes: 7 additions & 26 deletions src/token/TokenNftsUpdateTransaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,6 @@ export default class TokenNftsUpdateTransaction extends Transaction {
);
}

/**
* @description Extract the token id. Returns the token id.
* @returns {?TokenId}
*/
get tokenId() {
return this._tokenId;
}

/**
* @description Assign the token id.
* @param {TokenId | string} tokenId
Expand All @@ -155,14 +147,6 @@ export default class TokenNftsUpdateTransaction extends Transaction {
return this;
}

/**
* @description Extract the list of serial numbers. Returns the list of serial numbers.
* @returns {?Long[]}
*/
get serialNumbers() {
return this._serialNumbers;
}

/**
* @description Assign the list of serial numbers.
* @param {Long[]} serialNumbers
Expand All @@ -175,13 +159,6 @@ export default class TokenNftsUpdateTransaction extends Transaction {
return this;
}

/**
* @returns {?Uint8Array}
*/
get metadata() {
return this._metadata;
}

/**
* @param {Uint8Array} metadata
* @returns {this}
Expand Down Expand Up @@ -232,9 +209,13 @@ export default class TokenNftsUpdateTransaction extends Transaction {
token: this._tokenId != null ? this._tokenId._toProtobuf() : null,
serialNumbers:
this._serialNumbers != null ? this._serialNumbers : [],
metadata: {
value: this._metadata != null ? this._metadata : null,
},
...(this._metadata != null
? {
metadata: {
value: this._metadata,
},
}
: null),
};
}

Expand Down
6 changes: 0 additions & 6 deletions test/integration/TokenCreateIntegrationTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ describe("TokenCreate", function () {
const key2 = PrivateKey.generateED25519();
const key3 = PrivateKey.generateED25519();
const key4 = PrivateKey.generateED25519();
const metadataKey = PrivateKey.generateED25519();
const metadata = new Uint8Array(1);

const response = await new TokenCreateTransaction()
.setTokenName("ffff")
Expand All @@ -37,8 +35,6 @@ describe("TokenCreate", function () {
.setWipeKey(key3)
.setSupplyKey(key4)
.setFreezeDefault(false)
.setMetadataKey(metadataKey)
.setMetadata(metadata)
.execute(env.client);

const tokenId = (await response.getReceipt(env.client)).tokenId;
Expand Down Expand Up @@ -70,8 +66,6 @@ describe("TokenCreate", function () {
expect(info.autoRenewPeriod).to.be.not.null;
expect(info.autoRenewPeriod.seconds.toInt()).to.be.eql(7776000);
expect(info.expirationTime).to.be.not.null;
expect(info.metadataKey).to.eql(metadataKey.toString());
expect(info.metadata).to.eql(metadata);
});

it("should be executable with minimal properties set", async function () {
Expand Down
Loading

0 comments on commit 0df479c

Please sign in to comment.