Skip to content

Commit

Permalink
Use snake_case for spv_verified values consistently
Browse files Browse the repository at this point in the history
Also handle missing values.
  • Loading branch information
LeoComandini authored and jgriffiths committed May 19, 2021
1 parent ecf3cfd commit 56f7039
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/ga_session.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2821,7 +2821,7 @@ namespace sdk {
}

if (m_spv_enabled) {
tx_details["spv_verified"] = "InProgress";
tx_details["spv_verified"] = "in_progress";
if (!datadir.empty() && is_cached) {
nlohmann::json net_params = m_net_params.get_json();
net_params["electrum_url"] = m_electrum_url;
Expand All @@ -2846,13 +2846,19 @@ namespace sdk {
}
});
} else if (verify_result == 1) {
tx_details["spv_verified"] = "Verified";
tx_details["spv_verified"] = "verified";
} else if (verify_result == 2) {
tx_details["spv_verified"] = "NotVerified";
tx_details["spv_verified"] = "not_verified";
} else if (verify_result == 3) {
tx_details["spv_verified"] = "disabled";
} else if (verify_result == 4) {
tx_details["spv_verified"] = "not_longest";
} else if (verify_result == 5) {
tx_details["spv_verified"] = "unconfirmed";
}
}
} else {
tx_details["spv_verified"] = "Disabled";
tx_details["spv_verified"] = "disabled";
}
tx_details["addressees"] = addressees;
tx_details["user_signed"] = true;
Expand Down

0 comments on commit 56f7039

Please sign in to comment.