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

Add zero padding for nanos #1573

Merged
merged 2 commits into from
Apr 25, 2023
Merged

Add zero padding for nanos #1573

merged 2 commits into from
Apr 25, 2023

Conversation

petreze
Copy link
Contributor

@petreze petreze commented Apr 24, 2023

Description:
Fixes an issue where if the generated nanos in a transactionId start with 0, after casting the object toString() the 0 gets trimmed and it returns wrong transactionId

Related issue(s):

Fixes #1564

Notes for reviewer:

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

Signed-off-by: Petar Tonev <petar.tonev@limechain.tech>
@petreze petreze marked this pull request as draft April 24, 2023 11:58
Signed-off-by: Petar Tonev <petar.tonev@limechain.tech>
@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
40.0% 40.0% Duplication

@petreze petreze marked this pull request as ready for review April 25, 2023 10:55
@ochikov ochikov merged commit dac1c48 into develop Apr 25, 2023
@ochikov ochikov deleted the fix/zero-padding-transactionid branch April 25, 2023 11:48
monokaijs pushed a commit to monostarter/u2u-sdk-js that referenced this pull request Jul 5, 2023
* add zero padding for nanos

Signed-off-by: Petar Tonev <petar.tonev@limechain.tech>

* fix unit tests after TransactionId.toString() zero padding

Signed-off-by: Petar Tonev <petar.tonev@limechain.tech>

---------

Signed-off-by: Petar Tonev <petar.tonev@limechain.tech>
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.

TransactionId toString not returning the same value as the mirror nodes
2 participants