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

refactor: messaging #18

Merged
merged 39 commits into from
Oct 5, 2023
Merged

refactor: messaging #18

merged 39 commits into from
Oct 5, 2023

Conversation

Ad96el
Copy link
Member

@Ad96el Ad96el commented Aug 4, 2023

fixes https://github.com/KILTprotocol/ticket/issues/2715

I only included the message types which are defined in the kilt extension spec. I double-checked it, but I do not want to roll out that I forgot one type. 😄

@Ad96el Ad96el changed the title Refactor/messaging refactor: messaging Aug 4, 2023
@Ad96el Ad96el requested a review from rflechtner August 7, 2023 14:37
@Ad96el Ad96el marked this pull request as ready for review August 7, 2023 14:39
@Ad96el Ad96el requested a review from weichweich August 7, 2023 14:39
Copy link
Collaborator

@rflechtner rflechtner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copying all the type definitions seems a little much, what's the reason for that?

src/messaging/index.ts Outdated Show resolved Hide resolved
src/messaging/index.ts Outdated Show resolved Hide resolved
src/types/Address.ts Outdated Show resolved Hide resolved
src/tests/jest.setup.ts Outdated Show resolved Hide resolved
src/messaging/index.ts Show resolved Hide resolved
@Ad96el Ad96el marked this pull request as draft August 8, 2023 08:02
@Ad96el Ad96el marked this pull request as ready for review August 9, 2023 07:50
Copy link
Contributor

@weichweich weichweich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to see a bit more documentation

src/types/Terms.ts Outdated Show resolved Hide resolved
src/types/Quote.ts Outdated Show resolved Hide resolved
src/types/Message.ts Outdated Show resolved Hide resolved
src/types/Message.ts Show resolved Hide resolved
src/types/Message.ts Outdated Show resolved Hide resolved
src/tests/utils.ts Outdated Show resolved Hide resolved
src/types/Message.ts Outdated Show resolved Hide resolved
src/messaging/CredentialApiMessageTypes.ts Outdated Show resolved Hide resolved
src/messaging/CredentialApiMessageTypes.ts Outdated Show resolved Hide resolved
src/tests/messageUtils.ts Outdated Show resolved Hide resolved
src/tests/messageUtils.ts Show resolved Hide resolved
src/tests/messageUtils.ts Show resolved Hide resolved
src/tests/messageUtils.ts Show resolved Hide resolved
src/types/Quote.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@weichweich weichweich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few minor things

Comment on lines 23 to 26




Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Too many whitespace

Suggested change

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is removed in: d2627c3.

I also added a small GitHub action to check the fmt. I think this is useful since the project gets still more features.

src/tests/messageUtils.ts Show resolved Hide resolved
src/types/Message.ts Outdated Show resolved Hide resolved
tsconfig.json Outdated
@@ -11,7 +11,7 @@
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */

/* Language and Environment */
"target": "ES2022", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
"target": "ES2022" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this style called? 😱

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, funny. It's using the Prettier style guide. However, I wasn't aware of how it would format JSON with comments. It doesn't really appear beautiful.

Copy link
Contributor

@weichweich weichweich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we move the CI pipeline for style checks and the license header to a different PR? this is already big enough as it is,

@Ad96el Ad96el force-pushed the refactor/messaging branch from 7ebb031 to 792dc5d Compare August 14, 2023 10:48
@Ad96el
Copy link
Member Author

Ad96el commented Aug 14, 2023

I created two new PR. one for the fmt and the second for the license.

Copy link
Collaborator

@rflechtner rflechtner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got a few suggestions on what we should and shouldn't expose, but looks very good otherwise!

src/messaging/utils.ts Outdated Show resolved Hide resolved
src/messaging/MessageEnvelope.ts Show resolved Hide resolved
src/messaging/index.ts Outdated Show resolved Hide resolved
src/index.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@rflechtner rflechtner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

soooo close 😬

src/messaging/index.ts Outdated Show resolved Hide resolved
src/messaging/index.ts Outdated Show resolved Hide resolved
src/messaging/utils.ts Outdated Show resolved Hide resolved
src/messaging/utils.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@rflechtner rflechtner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amaaaaaaazing! Nice work

@rflechtner
Copy link
Collaborator

@weichweich if you don't have any more complaints here we would merge this soon

Copy link
Contributor

@weichweich weichweich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More Complaints...

@Ad96el Ad96el merged commit 3322558 into main Oct 5, 2023
1 check passed
@Ad96el Ad96el deleted the refactor/messaging branch October 5, 2023 07:27
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.

4 participants