Skip to content

Commit

Permalink
fix: add long types declaration locally so we dont have to rely on re…
Browse files Browse the repository at this point in the history
…mote declaration (#2697)

* fix: example couldn't find long\'s types

Signed-off-by: Ivaylo Nikolov <[email protected]>

* ci: update tests

Signed-off-by: Ivaylo Nikolov <[email protected]>

* fix: Protobufs updated

Signed-off-by: ivaylogarnev-limechain <[email protected]>

---------

Signed-off-by: Ivaylo Nikolov <[email protected]>
Signed-off-by: ivaylogarnev-limechain <[email protected]>
Co-authored-by: ivaylogarnev-limechain <[email protected]>
  • Loading branch information
ivaylonikolov7 and ivaylogarnev-limechain authored Dec 6, 2024
1 parent ace95a2 commit addc3c5
Show file tree
Hide file tree
Showing 4 changed files with 470 additions and 43 deletions.
20 changes: 3 additions & 17 deletions packages/proto/src/proto/services/response_code.proto
Original file line number Diff line number Diff line change
Expand Up @@ -1594,35 +1594,21 @@ enum ResponseCodeEnum {
*/
INVALID_TOKEN_IN_PENDING_AIRDROP = 369;

/**
* A scheduled transaction configured to wait for expiry to execute was given
* an expiry time not strictly after the time at which its creation reached
* consensus.
*/
SCHEDULE_EXPIRY_MUST_BE_FUTURE = 370;

/**
* A scheduled transaction configured to wait for expiry to execute was given
* an expiry time too far in the future after the time at which its creation
* reached consensus.
*/
SCHEDULE_EXPIRY_TOO_LONG = 371;

/**
* A scheduled transaction configured to wait for expiry to execute was given
* an expiry time at which there is already too many transactions scheduled to
* expire; its creation must be retried with a different expiry.
*/
SCHEDULE_EXPIRY_IS_BUSY = 372;
SCHEDULE_EXPIRY_IS_BUSY = 370;

/**
* The provided gRPC certificate hash is invalid.
*/
INVALID_GRPC_CERTIFICATE_HASH = 373;
INVALID_GRPC_CERTIFICATE_HASH = 371;

/**
* A scheduled transaction configured to wait for expiry to execute was not
* given an explicit expiration time.
*/
MISSING_EXPIRY_TIME = 374;
MISSING_EXPIRY_TIME = 372;
}
3 changes: 3 additions & 0 deletions src/FeeComponents.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@

import * as HashgraphProto from "@hashgraph/proto";

/**
* @typedef {import("./types/long").default} Long
*/
export default class FeeComponents {
/**
* @param {object} [props]
Expand Down
31 changes: 5 additions & 26 deletions src/Status.js
Original file line number Diff line number Diff line change
Expand Up @@ -697,10 +697,6 @@ export default class Status {
return "TOKEN_AIRDROP_WITH_FALLBACK_ROYALTY";
case Status.InvalidTokenInPendingAirdrop:
return "INVALID_TOKEN_IN_PENDING_AIRDROP";
case Status.ScheduleExpiryMustBeFuture:
return "SCHEDULE_EXPIRY_MUST_BE_FUTURE";
case Status.ScheduleExpiryTooLong:
return "SCHEDULE_EXPIRY_TOO_LONG";
case Status.ScheduleExpiryIsBusy:
return "SCHEDULE_EXPIRY_IS_BUSY";
case Status.InvalidGrpcCertificateHash:
Expand Down Expand Up @@ -1376,14 +1372,10 @@ export default class Status {
case 369:
return Status.InvalidTokenInPendingAirdrop;
case 370:
return Status.ScheduleExpiryMustBeFuture;
case 371:
return Status.ScheduleExpiryTooLong;
case 372:
return Status.ScheduleExpiryIsBusy;
case 373:
case 371:
return Status.InvalidGrpcCertificateHash;
case 374:
case 372:
return Status.MissingExpiryTime;
default:
throw new Error(
Expand Down Expand Up @@ -3098,33 +3090,20 @@ Status.TokenAirdropWithFallbackRoyalty = new Status(368);
*/
Status.InvalidTokenInPendingAirdrop = new Status(369);

/**
* A scheduled transaction configured to wait for expiry to execute was given
* an expiry time not strictly after the time at which its creation reached
* consensus.
*/
Status.ScheduleExpiryMustBeFuture = new Status(370);
/**
* A scheduled transaction configured to wait for expiry to execute was given
* an expiry time too far in the future after the time at which its creation
* reached consensus.
*/
Status.ScheduleExpiryTooLong = new Status(371);

/**
* A scheduled transaction configured to wait for expiry to execute was given
* an expiry time at which there is already too many transactions scheduled to
* expire; its creation must be retried with a different expiry.
*/
Status.ScheduleExpiryIsBusy = new Status(372);
Status.ScheduleExpiryIsBusy = new Status(370);

/**
* The provided gRPC certificate hash is invalid.
*/
Status.InvalidGrpcCertificateHash = new Status(373);
Status.InvalidGrpcCertificateHash = new Status(371);

/**
* A scheduled transaction configured to wait for expiry to execute was not
* given an explicit expiration time.
*/
Status.MissingExpiryTime = new Status(374);
Status.MissingExpiryTime = new Status(372);
Loading

0 comments on commit addc3c5

Please sign in to comment.