Skip to content

Commit

Permalink
Merge pull request #4449 from /issues/7833
Browse files Browse the repository at this point in the history
Fixes upgrade from 0.63.x to 1.3.x AC switch OFF and wallet creation failed
  • Loading branch information
bsclifton committed Jan 28, 2020
2 parents a571132 + f15c050 commit c830249
Showing 1 changed file with 7 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,22 +75,17 @@ bool WalletState::FromDict(

// Fee Amount
const auto fee_amount = dictionary->FindDoublePath(kFeeBatPath);
if (!fee_amount) {
NOTREACHED();
return false;
if (fee_amount) {
wallet_properties.fee_amount = *fee_amount;
}
wallet_properties.fee_amount = *fee_amount;

// Choices BAT
const auto* choices_bat_list = dictionary->FindListPath(kChoicesBatPath);
if (!choices_bat_list) {
NOTREACHED();
return false;
}

for (const auto&choices_bat_value : choices_bat_list->GetList()) {
const double bat = choices_bat_value.GetDouble();
wallet_properties.parameters_choices.push_back(bat);
if (choices_bat_list) {
for (const auto& choices_bat_value : choices_bat_list->GetList()) {
const double bat = choices_bat_value.GetDouble();
wallet_properties.parameters_choices.push_back(bat);
}
}

// Default tip choices
Expand Down

0 comments on commit c830249

Please sign in to comment.