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

Fixes transaction amount #6757

Merged
merged 1 commit into from
Oct 2, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ std::string PostTransaction::GetUrl(const std::string& address) {
std::string PostTransaction::GeneratePayload(
const ::ledger::uphold::Transaction& transaction) {
base::Value denomination(base::Value::Type::DICTIONARY);
denomination.SetDoubleKey("amount", transaction.amount);
denomination.SetStringKey(
"amount",
base::StringPrintf("%f", transaction.amount));
Copy link
Member

Choose a reason for hiding this comment

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

Just checking if any old clients are sending this in the wrong format? Maybe need to make sure iOS gets this one if they recently updated to 1.15.x? cc @kylehickinson just in case.

Copy link
Member

Choose a reason for hiding this comment

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

Snippet from the issue report:

Important: This is regression in 1.15.x. Not reproducible on 1.14.x

denomination.SetStringKey("currency", "BAT");

base::Value payload(base::Value::Type::DICTIONARY);
Expand Down