-
Notifications
You must be signed in to change notification settings - Fork 11.3k
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
Conversation
0191230
to
dd444a2
Compare
|
||
// Sign the transaction | ||
let signature = Signature::new(&create_game_call, &signer); | ||
let signature = self |
There was a problem hiding this comment.
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"
crates/test-utils/src/messages.rs
Outdated
@@ -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()) |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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