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

Bugfix/value pmob cast #967

Merged
merged 3 commits into from
Mar 21, 2024
Merged

Bugfix/value pmob cast #967

merged 3 commits into from
Mar 21, 2024

Conversation

holtzman
Copy link
Collaborator

Motivation

The wallet database doesn't store u64s and full-service casts u64s to i64 for storage. In a few places, those values being retrieved from the database were not being cast back to u64 before being used, notably in transaction_log processing and receipt processing.

In this PR

  • fixed two missing u64 casts in v1 transaction_log retrieval
  • fixed a missing u64 cast when forming an response indicating that that a receipt's value doesn't match the txo.

Copy link
Contributor

@nick-mobilecoin nick-mobilecoin left a comment

Choose a reason for hiding this comment

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

looks good, there are a couple test cases left using i64, but they're also comparing to i64.
Very anecdotal, but this is a good argument for normalizing data before passing it around.

@holtzman holtzman merged commit 499de4b into main Mar 21, 2024
3 checks passed
@holtzman holtzman deleted the bugfix/value-pmob-cast branch March 21, 2024 16:38
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