Skip to content

Commit

Permalink
chore(status): update statuses from new protobufs
Browse files Browse the repository at this point in the history
Signed-off-by: venilinvasilev <[email protected]>
  • Loading branch information
venilinvasilev committed Feb 6, 2025
1 parent f32695b commit fa2d91b
Showing 1 changed file with 124 additions and 0 deletions.
124 changes: 124 additions & 0 deletions src/Status.js
Original file line number Diff line number Diff line change
Expand Up @@ -707,6 +707,33 @@ export default class Status {
return "NO_SCHEDULING_ALLOWED_AFTER_SCHEDULED_RECURSION";
case Status.RecursiveSchedulingLimitReached:
return "RECURSIVE_SCHEDULING_LIMIT_REACHED";
case Status.WaitingForLedgerId:
return "WAITING_FOR_LEDGER_ID";

Check warning on line 711 in src/Status.js

View check run for this annotation

Codecov / codecov/patch

src/Status.js#L711

Added line #L711 was not covered by tests
case Status.MaxEntriesForFeeExemptListExceeded:
return "MAX_ENTRIES_FOR_FEE_EXEMPT_LIST_EXCEEDED";

Check warning on line 713 in src/Status.js

View check run for this annotation

Codecov / codecov/patch

src/Status.js#L713

Added line #L713 was not covered by tests
case Status.FeeExemptKeyListContainsDuplicatedKeys:
return "FEE_EXEMPT_KEY_LIST_CONTAINS_DUPLICATED_KEYS";

Check warning on line 715 in src/Status.js

View check run for this annotation

Codecov / codecov/patch

src/Status.js#L715

Added line #L715 was not covered by tests
case Status.InvalidKeyInFeeExemptKeyList:
return "INVALID_KEY_IN_FEE_EXEMPT_KEY_LIST";

Check warning on line 717 in src/Status.js

View check run for this annotation

Codecov / codecov/patch

src/Status.js#L717

Added line #L717 was not covered by tests
case Status.InvalidFeeScheduleKey:
return "INVALID_FEE_SCHEDULE_KEY";

Check warning on line 719 in src/Status.js

View check run for this annotation

Codecov / codecov/patch

src/Status.js#L719

Added line #L719 was not covered by tests
case Status.FeeScheduleKeyCannotBeUpdated:
return "FEE_SCHEDULE_KEY_CANNOT_BE_UPDATED";

Check warning on line 721 in src/Status.js

View check run for this annotation

Codecov / codecov/patch

src/Status.js#L721

Added line #L721 was not covered by tests
case Status.FeeScheduleKeyNotSet:
return "FEE_SCHEDULE_KEY_NOT_SET";

Check warning on line 723 in src/Status.js

View check run for this annotation

Codecov / codecov/patch

src/Status.js#L723

Added line #L723 was not covered by tests
case Status.MaxCustomFeeLimitExceeded:
return "MAX_CUSTOM_FEE_LIMIT_EXCEEDED";

Check warning on line 725 in src/Status.js

View check run for this annotation

Codecov / codecov/patch

src/Status.js#L725

Added line #L725 was not covered by tests
case Status.NoValidMaxCustomFee:
return "NO_VALID_MAX_CUSTOM_FEE";

Check warning on line 727 in src/Status.js

View check run for this annotation

Codecov / codecov/patch

src/Status.js#L727

Added line #L727 was not covered by tests
case Status.InvalidMaxCustomFees:
return "INVALID_MAX_CUSTOM_FEES";

Check warning on line 729 in src/Status.js

View check run for this annotation

Codecov / codecov/patch

src/Status.js#L729

Added line #L729 was not covered by tests
case Status.DuplicateDenominationInMaxCustomFeeList:
return "DUPLICATE_DENOMINATION_IN_MAX_CUSTOM_FEE_LIST";

Check warning on line 731 in src/Status.js

View check run for this annotation

Codecov / codecov/patch

src/Status.js#L731

Added line #L731 was not covered by tests
case Status.DuplicateAccountIdInMaxCustomFeeList:
return "DUPLICATE_ACCOUNT_ID_IN_MAX_CUSTOM_FEE_LIST";

Check warning on line 733 in src/Status.js

View check run for this annotation

Codecov / codecov/patch

src/Status.js#L733

Added line #L733 was not covered by tests
case Status.MaxCustomFeesIsNotSupported:
return "MAX_CUSTOM_FEES_IS_NOT_SUPPORTED";

Check warning on line 735 in src/Status.js

View check run for this annotation

Codecov / codecov/patch

src/Status.js#L735

Added line #L735 was not covered by tests

default:
return `UNKNOWN (${this._code})`;
}
Expand Down Expand Up @@ -1385,6 +1412,32 @@ export default class Status {
return Status.NoSchedulingAllowedAfterScheduledRecursion;
case 374:
return Status.RecursiveSchedulingLimitReached;
case 375:
return Status.WaitingForLedgerId;

Check warning on line 1416 in src/Status.js

View check run for this annotation

Codecov / codecov/patch

src/Status.js#L1416

Added line #L1416 was not covered by tests
case 376:
return Status.MaxEntriesForFeeExemptListExceeded;

Check warning on line 1418 in src/Status.js

View check run for this annotation

Codecov / codecov/patch

src/Status.js#L1418

Added line #L1418 was not covered by tests
case 377:
return Status.FeeExemptKeyListContainsDuplicatedKeys;

Check warning on line 1420 in src/Status.js

View check run for this annotation

Codecov / codecov/patch

src/Status.js#L1420

Added line #L1420 was not covered by tests
case 378:
return Status.InvalidKeyInFeeExemptKeyList;

Check warning on line 1422 in src/Status.js

View check run for this annotation

Codecov / codecov/patch

src/Status.js#L1422

Added line #L1422 was not covered by tests
case 379:
return Status.InvalidFeeScheduleKey;

Check warning on line 1424 in src/Status.js

View check run for this annotation

Codecov / codecov/patch

src/Status.js#L1424

Added line #L1424 was not covered by tests
case 380:
return Status.FeeScheduleKeyCannotBeUpdated;

Check warning on line 1426 in src/Status.js

View check run for this annotation

Codecov / codecov/patch

src/Status.js#L1426

Added line #L1426 was not covered by tests
case 381:
return Status.FeeScheduleKeyNotSet;

Check warning on line 1428 in src/Status.js

View check run for this annotation

Codecov / codecov/patch

src/Status.js#L1428

Added line #L1428 was not covered by tests
case 382:
return Status.MaxCustomFeeLimitExceeded;

Check warning on line 1430 in src/Status.js

View check run for this annotation

Codecov / codecov/patch

src/Status.js#L1430

Added line #L1430 was not covered by tests
case 383:
return Status.NoValidMaxCustomFee;

Check warning on line 1432 in src/Status.js

View check run for this annotation

Codecov / codecov/patch

src/Status.js#L1432

Added line #L1432 was not covered by tests
case 384:
return Status.InvalidMaxCustomFees;

Check warning on line 1434 in src/Status.js

View check run for this annotation

Codecov / codecov/patch

src/Status.js#L1434

Added line #L1434 was not covered by tests
case 385:
return Status.DuplicateDenominationInMaxCustomFeeList;

Check warning on line 1436 in src/Status.js

View check run for this annotation

Codecov / codecov/patch

src/Status.js#L1436

Added line #L1436 was not covered by tests
case 386:
return Status.DuplicateAccountIdInMaxCustomFeeList;

Check warning on line 1438 in src/Status.js

View check run for this annotation

Codecov / codecov/patch

src/Status.js#L1438

Added line #L1438 was not covered by tests
case 387:
return Status.MaxCustomFeesIsNotSupported;

Check warning on line 1440 in src/Status.js

View check run for this annotation

Codecov / codecov/patch

src/Status.js#L1440

Added line #L1440 was not covered by tests
default:
throw new Error(
`(BUG) Status.fromCode() does not handle code: ${code}`,
Expand Down Expand Up @@ -3127,3 +3180,74 @@ Status.NoSchedulingAllowedAfterScheduledRecursion = new Status(373);
* approximately four million times with typical network configuration.)
*/
Status.RecursiveSchedulingLimitReached = new Status(374);

/**
* The target network is waiting for the ledger ID to be set, which is a
* side effect of finishing the network's TSS construction.
*/
Status.WaitingForLedgerId = new Status(375);

/**
* The provided fee exempt key list size exceeded the limit.
*/
Status.MaxEntriesForFeeExemptListExceeded = new Status(376);

/**
* The provided fee exempt key list contains duplicated keys.
*/
Status.FeeExemptKeyListContainsDuplicatedKeys = new Status(377);

/**
* The provided fee exempt key list contains an invalid key.
*/
Status.InvalidKeyInFeeExemptKeyList = new Status(378);

/**
* The provided fee schedule key contains an invalid key.
*/
Status.InvalidFeeScheduleKey = new Status(379);

/**
* If a fee schedule key is not set when we create a topic
* we cannot add it on update.
*/
Status.FeeScheduleKeyCannotBeUpdated = new Status(380);

/**
* If the topic's custom fees are updated the topic SHOULD have a
* fee schedule key
*/
Status.FeeScheduleKeyNotSet = new Status(381);

/**
* The fee amount is exceeding the amount that the payer
* is willing to pay.
*/
Status.MaxCustomFeeLimitExceeded = new Status(382);

/**
* There are no corresponding custom fees.
*/
Status.NoValidMaxCustomFee = new Status(383);

/**
* The provided list contains invalid max custom fee.
*/
Status.InvalidMaxCustomFees = new Status(384);

/**
* The provided max custom fee list contains fees with
* duplicate denominations.
*/
Status.DuplicateDenominationInMaxCustomFeeList = new Status(385);

/**
* The provided max custom fee list contains fees with
* duplicate account id.
*/
Status.DuplicateAccountIdInMaxCustomFeeList = new Status(386);

/**
* Max custom fees list is not supported for this operation.
*/
Status.MaxCustomFeesIsNotSupported = new Status(387);

0 comments on commit fa2d91b

Please sign in to comment.