Skip to content

[Infra] Enable passing signatures to SC method calls#502

Merged
quantumagi merged 7 commits into
stratisproject:infracontractsfrom
quantumagi:pass-sigs
Apr 8, 2021
Merged

[Infra] Enable passing signatures to SC method calls#502
quantumagi merged 7 commits into
stratisproject:infracontractsfrom
quantumagi:pass-sigs

Conversation

@quantumagi

@quantumagi quantumagi commented Apr 6, 2021

Copy link
Copy Markdown
Contributor

@quantumagi quantumagi requested a review from rowandh April 6, 2021 08:47
@quantumagi quantumagi changed the title Enable passing signatures to SC method calls [Infra] Enable passing signatures to SC method calls Apr 6, 2021
@quantumagi quantumagi marked this pull request as ready for review April 7, 2021 04:03
if (encodedSigs == null)
{
var sigs = (signatures ?? new string[0]).Select(s => Convert.FromBase64String(s)).ToArray();
if (sigs.Any(s => s.Length != 65 || s[0] < 27 || s[0] > 34))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Magic numbers 👀 could these be made into constants?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done.

@rowandh rowandh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM just fix the magic numbers 👍

@quantumagi quantumagi merged commit dd704b0 into stratisproject:infracontracts Apr 8, 2021
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.

2 participants