From 985f84487985911210d47d6efc806167599fbbf5 Mon Sep 17 00:00:00 2001 From: svetoslav-nikol0v Date: Wed, 15 May 2024 14:11:38 +0300 Subject: [PATCH] release: v2.45.0 (#2288) * update: changelog Signed-off-by: svetoslav-nikol0v * update: version Signed-off-by: svetoslav-nikol0v * update: network tag Signed-off-by: svetoslav-nikol0v * update: request type and status classes Signed-off-by: svetoslav-nikol0v * update: integration test Signed-off-by: svetoslav-nikol0v * chore: formatting Signed-off-by: svetoslav-nikol0v --------- Signed-off-by: svetoslav-nikol0v --- .github/workflows/build.yml | 2 +- CHANGELOG.md | 7 +++++++ package.json | 2 +- src/RequestType.js | 9 +++++++++ src/Status.js | 10 ++++++++++ test/integration/TokenCreateIntegrationTest.js | 4 ++-- 6 files changed, 30 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ddd1ddf8d..033bb32ac 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -102,7 +102,7 @@ jobs: id: start-local-node if: ${{ steps.build-sdk.conclusion == 'success' && !cancelled() && always() }} run: | - npx @hashgraph/hedera-local start -d --network-tag=0.49.1 --balance=100000 + npx @hashgraph/hedera-local start -d --network-tag=0.49.7 --balance=100000 # Wait for the network to fully start sleep 30 diff --git a/CHANGELOG.md b/CHANGELOG.md index 118ab85fe..64c16b875 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## v2.45.0 + +## What's Changed + +* fix: solve backward compatibility issues between the SDK and hedera-services v0.49 (modularized code) by @svetoslav-nikol0v in https://github.com/hashgraph/hedera-sdk-js/pull/2240 +* feature: update metadata field of fungible and non-fungible tokens, and dynamic NFTs (HIP-646, HIP-765 and HIP-657) by @svetoslav-nikol0v in https://github.com/hashgraph/hedera-sdk-js/pull/2210 + ## v2.45.0-beta.1 ## What's Changed diff --git a/package.json b/package.json index 9b9a5cba3..937ac93f4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@hashgraph/sdk", - "version": "2.45.0-beta.1", + "version": "2.45.0", "description": "Hederaâ„¢ Hashgraph SDK", "types": "./lib/index.d.ts", "main": "./lib/index.cjs", diff --git a/src/RequestType.js b/src/RequestType.js index 6f974f7e8..aaabf6c58 100644 --- a/src/RequestType.js +++ b/src/RequestType.js @@ -197,6 +197,8 @@ export default class RequestType { return "NodeUpdate"; case RequestType.NodeDelete: return "NodeDelete"; + case RequestType.NodeGetInfo: + return "NodeGetInfo"; default: return `UNKNOWN (${this._code})`; } @@ -365,6 +367,8 @@ export default class RequestType { return RequestType.NodeUpdate; case 91: return RequestType.NodeDelete; + case 92: + return RequestType.NodeGetInfo; } throw new Error( @@ -767,3 +771,8 @@ RequestType.NodeUpdate = new RequestType(90); * A transaction body for a `deleteNode` request. */ RequestType.NodeDelete = new RequestType(91); + +/** + * Get Node information + */ +RequestType.NodeGetInfo = new RequestType(92); diff --git a/src/Status.js b/src/Status.js index 69e9a6940..c9f3dae99 100644 --- a/src/Status.js +++ b/src/Status.js @@ -649,6 +649,8 @@ export default class Status { return "INVALID_GOSSIP_CAE_CERTIFICATE"; case Status.InvalidGrpcCertificate: return "INVALID_GRPC_CERTIFICATE"; + case Status.InvalidMaxAutoAssociations: + return "INVALID_MAX_AUTO_ASSOCIATIONS"; default: return `UNKNOWN (${this._code})`; } @@ -1269,6 +1271,8 @@ export default class Status { return Status.InvalidGossipCaeCertificate; case 345: return Status.InvalidGrpcCertificate; + case 346: + return Status.InvalidMaxAutoAssociations; default: throw new Error( `(BUG) Status.fromCode() does not handle code: ${code}`, @@ -2845,3 +2849,9 @@ Status.InvalidGossipCaeCertificate = new Status(344); * grpc_certificate_hash is invalid */ Status.InvalidGrpcCertificate = new Status(345); + +/** + * The maximum automatic associations value is not valid. + * The most common cause for this error is a value less than `-1`. + */ +Status.InvalidMaxAutoAssociations = new Status(346); diff --git a/test/integration/TokenCreateIntegrationTest.js b/test/integration/TokenCreateIntegrationTest.js index fd50af46b..f9a16daf9 100644 --- a/test/integration/TokenCreateIntegrationTest.js +++ b/test/integration/TokenCreateIntegrationTest.js @@ -203,8 +203,8 @@ 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.expirationTime.toString()).to.be.eql( - expirationTime.toString(), + expect(info.expirationTime.toDate().getTime()).to.be.at.least( + expirationTime.toDate().getTime(), ); });