Skip to content

Conversation

@bdesoky
Copy link
Contributor

@bdesoky bdesoky commented Oct 23, 2025

Ticket: ANT-1033

Description

This PR introduces a small change that normalizes the behaviour of calculateHMACSubject so that it is the same as before the v3 improvements. In particular, if text was ever undefined, the returned subject would be |..|..|. Doing prefix + text results in |..|..|undefined, which is not the same behaviour. This PR fixes this and adds tests for this edge case.

Issue Number

ANT-1033

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Unit test

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • My code compiles correctly for both Node and Browser environments
  • I have commented my code, particularly in hard-to-understand areas
  • My commits follow Conventional Commits and I have properly described any BREAKING CHANGES
  • The ticket or github issue was included in the commit message as a reference
  • I have made corresponding changes to the documentation and on any new/updated functions and/or methods - jsdoc
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Copy link
Contributor

@mrdanish26 mrdanish26 left a comment

Choose a reason for hiding this comment

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

lgtm

@bdesoky bdesoky merged commit 8f28179 into master Oct 23, 2025
13 checks passed
@sasikumar-bitgo sasikumar-bitgo deleted the ANT-1033-fix branch October 24, 2025 03:25
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.

4 participants