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

✨ (keyring-eth) [DSDK-430]: Add ProvideTransactionContextTask #216

Merged
merged 2 commits into from
Aug 30, 2024

Conversation

jiyuzhuang
Copy link
Contributor

@jiyuzhuang jiyuzhuang commented Aug 27, 2024

πŸ“ Description

  • Add ProvideTransactionContextTask;
  • Add provideDomainNameTask method which will organise the ProvideDomainNameCommand;
  • The commands below have been called in this task and they are been adjusted to have the same form:
    • SetPluginCommand (single command)
    • SetExternalPluginCommand (single command)
    • ProvideNFTInformationCommand (single command)
    • ProvideTokenInformationCommand (single command)
    • ProvideDomainNameCommand (mulpitle commands)
  • Add new enum type ClearSignContextType in packages/signer/context-module/src/shared/model/ClearSignContext.ts to clarify the context type;
  • The task will received hexadecimal string from the previous task and passes them into the commands / command organiser.

❓ Context

βœ… Checklist

Pull Requests must pass the CI and be code reviewed. Set as Draft if the PR is not ready.

  • Covered by automatic tests.
  • Impact of the changes:
    • Add ProvideTransactionContextTask.

🧐 Checklist for the PR Reviewers

  • The code aligns with the requirements described in the linked JIRA or GitHub issue.
  • The PR description clearly documents the changes made and explains any technical trade-offs or design decisions.
  • There are no undocumented trade-offs, technical debt, or maintainability issues.
  • The PR has been tested thoroughly, and any potential edge cases have been considered and handled.
  • Any new dependencies have been justified and documented.

@jiyuzhuang jiyuzhuang requested a review from a team August 27, 2024 13:19
@jiyuzhuang jiyuzhuang self-assigned this Aug 27, 2024
Copy link

vercel bot commented Aug 27, 2024

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Comments Updated (UTC)
device-sdk-ts-sample βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback Aug 30, 2024 10:37am

Copy link
Contributor

github-actions bot commented Aug 27, 2024

Messages
βœ… Danger: All checks passed successfully! πŸŽ‰

Generated by 🚫 dangerJS against 16b84b0

Copy link
Contributor

@aussedatlo aussedatlo left a comment

Choose a reason for hiding this comment

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

LGTM πŸ‘

}
switch (context.type) {
case "plugin": {
await this.api.sendCommand(
Copy link
Contributor

Choose a reason for hiding this comment

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

[ask] if there is an error in any commands of this loop case, the error would be in the result.
Should this task continue in this case?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think if an error happen during a send of a provide, the task should stop, WDYT ?

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree, I think in that case we should stop and return the error to upper layer so it can be forwarded to the user (for example the device auto-locked, or any other reason)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

πŸ‘

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.

5 participants