Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cactus-core-api): add Ethereum ledger type #3638

Conversation

RafaelAPB
Copy link
Contributor

@RafaelAPB RafaelAPB commented Nov 15, 2024

Peter's change: Added the missing ETHEREUM constant to the leger type
that the static consortium plugin has built in to it.
This was necessary because adding it only to the core-api broke the build.
The two types (since they are duplicates of each other) must be updated in
tandem otherwise the code won't compile (which is a good thing because it
is an example if when the compiler saves us from mistakes like this that would
otherwise stay hidden until much later and only come out as runtime errors)

Authored-by: Bruno Mateus

Co-authored-by: Peter Somogyvari [email protected]

Signed-off-by: Rafael Belchior [email protected]
Signed-off-by: Peter Somogyvari [email protected]

Pull Request Requirements

  • Rebased onto upstream/main branch and squashed into single commit to help maintainers review it more efficient and to avoid spaghetti git commit graphs that obfuscate which commit did exactly what change, when and, why.
  • Have git sign off at the end of commit message to avoid being marked red. You can add -s flag when using git commit command. You may refer to this link for more information.
  • Follow the Commit Linting specification. You may refer to this link for more information.

Character Limit

  • Pull Request Title and Commit Subject must not exceed 72 characters (including spaces and special characters).
  • Commit Message per line must not exceed 80 characters (including spaces and special characters).

A Must Read for Beginners
For rebasing and squashing, here's a must read guide for beginners.

@petermetz
Copy link
Contributor

@RafaelAPB The build is failing, I'll take a quick look at it, see if I can fix it quickly before the 2.0.1 release goes out today.

Error: packages/cacti-plugin-consortium-static/src/main/typescript/plugin-consortium-static.ts(469,7): error TS2322: Type 'import("/home/runner/work/cacti/cacti/packages/cactus-core-api/dist/lib/main/typescript/generated/openapi/typescript-axios/api").Ledger[]' is not assignable to type 'import("/home/runner/work/cacti/cacti/packages/cacti-plugin-consortium-static/src/main/typescript/generated/openapi/typescript-axios/api").Ledger[]'.
  Type 'import("/home/runner/work/cacti/cacti/packages/cactus-core-api/dist/lib/main/typescript/generated/openapi/typescript-axios/api").Ledger' is not assignable to type 'import("/home/runner/work/cacti/cacti/packages/cacti-plugin-consortium-static/src/main/typescript/generated/openapi/typescript-axios/api").Ledger'.
    Types of property ''ledgerType'' are incompatible.
      Type 'import("/home/runner/work/cacti/cacti/packages/cactus-core-api/dist/lib/main/typescript/generated/openapi/typescript-axios/api").LedgerType' is not assignable to type 'import("/home/runner/work/cacti/cacti/packages/cacti-plugin-consortium-static/src/main/typescript/generated/openapi/typescript-axios/api").LedgerType'.
        Type '"ETHEREUM"' is not assignable to type 'LedgerType'.

@petermetz petermetz force-pushed the satp-dev-fixup-cactus-core-api-ledger branch from 90aea43 to 1dd1f17 Compare November 30, 2024 19:09
@petermetz petermetz requested a review from takeutak as a code owner November 30, 2024 19:09
@petermetz
Copy link
Contributor

@RafaelAPB I pushed the fixes to the build, updating the PR description now too

@petermetz
Copy link
Contributor

Oops, forgot about the linter errors, working on those now.

Peter's change: Added the missing `ETHEREUM` constant to the leger type
that the static consortium plugin has built in to it.
This was necessary because adding it only to the core-api broke the build.
The two types (since they are duplicates of each other) must be updated in
tandem otherwise the code won't compile (which is a good thing because it
is an example if when the compiler saves us from mistakes like this that would
otherwise stay hidden until much later and only come out as runtime errors)

Authored-by: Bruno Mateus

Co-authored-by: Peter Somogyvari <[email protected]>

Signed-off-by: Rafael Belchior <[email protected]>
Signed-off-by: Peter Somogyvari <[email protected]>
@petermetz petermetz force-pushed the satp-dev-fixup-cactus-core-api-ledger branch from 1dd1f17 to a855437 Compare November 30, 2024 19:37
@petermetz
Copy link
Contributor

Linter fixes should be applied now

@petermetz petermetz merged commit a1be603 into hyperledger-cacti:main Nov 30, 2024
131 of 137 checks passed
@petermetz petermetz deleted the satp-dev-fixup-cactus-core-api-ledger branch November 30, 2024 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants