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

sign_with_address_and_signature should take a &T::Signature as the signature type #987

Closed
jsdw opened this issue May 30, 2023 · 0 comments · Fixed by #988
Closed

sign_with_address_and_signature should take a &T::Signature as the signature type #987

jsdw opened this issue May 30, 2023 · 0 comments · Fixed by #988
Assignees

Comments

@jsdw
Copy link
Collaborator

jsdw commented May 30, 2023

Currently sign_with_address_and_signature looks like:

pub fn sign_with_address_and_signature<S: Encode>(
    &self,
    address: &T::Address,
    signature: &S,
) -> SubmittableExtrinsic<T, C> {

I'd propose that it should look like:

pub fn sign_with_address_and_signature(
    &self,
    address: &T::Address,
    signature: &T::Signature,
) -> SubmittableExtrinsic<T, C> {

This ensures that the signature provided is the correct shape, rather than allowing arbitrary and possibly wrong formats to be provided that are only caught later and may lead to obscure errors and such.

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 a pull request may close this issue.

2 participants