Skip to content

Commit

Permalink
Merge pull request #47 from brave-intl/wallet-problem
Browse files Browse the repository at this point in the history
Adds json parse error handler
  • Loading branch information
NejcZdovc authored Aug 14, 2018
2 parents eb5bd5e + 5efd51b commit f198216
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/bat_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,11 @@ void BatClient::getWalletProperties() {
return;
}

braveledger_bat_helper::loadFromJson(properties, response);
bool ok = braveledger_bat_helper::loadFromJson(properties, response);
if (!ok) {
ledger_->OnWalletProperties(ledger::Result::ERROR, properties);
return;
}
state_->walletProperties_ = properties;
ledger_->OnWalletProperties(ledger::Result::OK, properties);
}
Expand Down

0 comments on commit f198216

Please sign in to comment.