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

refactor: using the hathor prefix on verifyMessage #426

Merged
merged 1 commit into from
Jun 21, 2023

Conversation

andreabadesso
Copy link
Collaborator

Acceptance Criteria

Security Checklist

  • Make sure you do not include new dependencies in the project unless strictly necessary and do not include dev-dependencies as production ones. More dependencies increase the possibility of one of them being hijacked and affecting us.

@codecov
Copy link

codecov bot commented Jun 19, 2023

Codecov Report

Merging #426 (b2b2c80) into master (a3a71a4) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #426   +/-   ##
=======================================
  Coverage   95.60%   95.60%           
=======================================
  Files          40       40           
  Lines        2458     2458           
  Branches      278      278           
=======================================
  Hits         2350     2350           
  Misses        108      108           
Impacted Files Coverage Δ
src/utils.ts 94.17% <100.00%> (ø)

@andreabadesso andreabadesso self-assigned this Jun 19, 2023
@andreabadesso andreabadesso added the enhancement New feature or request label Jun 19, 2023
@@ -54,6 +54,10 @@ import {
} from '@tests/utils';
import fullnode from '@src/fullnode';

// Monkey patch bitcore-lib

bitcore.Message.MAGIC_BYTES = Buffer.from('Hathor Signed Message:\n');
Copy link
Member

Choose a reason for hiding this comment

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

Since we're using bitcoinjs for verification, do we need this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Since the lib is using bitcore-lib, I thought it would be a good idea to also use bitcore-lib to generate the mesages

@pedroferreira1 pedroferreira1 self-requested a review June 21, 2023 12:56
@andreabadesso andreabadesso merged commit c79c214 into master Jun 21, 2023
@andreabadesso andreabadesso deleted the refactor/use-custom-prefix-on-sign-message branch June 21, 2023 15:11
@andreabadesso andreabadesso mentioned this pull request Jul 24, 2023
2 tasks
@andreabadesso andreabadesso mentioned this pull request Aug 25, 2023
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants