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

crypto: simplify keystore #4828

Merged
merged 1 commit into from
Sep 29, 2022
Merged

crypto: simplify keystore #4828

merged 1 commit into from
Sep 29, 2022

Conversation

joyqvq
Copy link
Contributor

@joyqvq joyqvq commented Sep 27, 2022

1/n improvement to pave for modular crypto service, remove the signer method and use sign method in keystore directly. this helps extract keystore its own service

@github-actions github-actions bot added the Type: Documentation Improvements or additions to documentation label Sep 27, 2022
@joyqvq joyqvq force-pushed the simplify-ks branch 2 times, most recently from 0191230 to dd444a2 Compare September 27, 2022 22:41
@joyqvq joyqvq marked this pull request as ready for review September 28, 2022 12:37
@joyqvq joyqvq requested review from kchalkias and removed request for huitseeker and randall-Mysten September 28, 2022 12:38

// Sign the transaction
let signature = Signature::new(&create_game_call, &signer);
let signature = self
Copy link
Collaborator

@kchalkias kchalkias Sep 28, 2022

Choose a reason for hiding this comment

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

Let's change the comment above (everywhere). Use "Sign the transaction" vs "get the signer"

@@ -183,7 +180,9 @@ pub fn make_transactions_with_pre_genesis_objects(
/* gas_object_ref */ o2.compute_object_reference(),
MAX_GAS,
);
let signature = Signature::new(&data, &signer);
let signature = keys
.sign(&o1.owner.get_owner_address().unwrap(), &data.to_bytes())
Copy link
Collaborator

Choose a reason for hiding this comment

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

I assume that at this stage unwrap() will always succeed. Can we add a comment, cause eventually we need to clean up all unwraps to avoid halting if an error occurs (unless we know unwrap() is safe)

Copy link
Collaborator

@kchalkias kchalkias left a comment

Choose a reason for hiding this comment

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

LGTM

@joyqvq joyqvq merged commit a3a7823 into main Sep 29, 2022
@joyqvq joyqvq deleted the simplify-ks branch September 29, 2022 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants