Skip to content

Commit

Permalink
Uplift of #6251 (squashed) to beta
Browse files Browse the repository at this point in the history
  • Loading branch information
brave-browser-releases committed Jul 30, 2020
1 parent a2e7ed4 commit e6b4b07
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ interface BatLedger {

GetPendingContributionsTotal() => (double amount);

FetchBalance() => (ledger.mojom.Result result, ledger.mojom.Balance balance);
FetchBalance() => (ledger.mojom.Result result, ledger.mojom.Balance? balance);

GetExternalWallet(string wallet_type) => (ledger.mojom.Result result, ledger.mojom.ExternalWallet? wallet);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ void WalletBalance::Fetch(ledger::FetchBalanceCallback callback) {
}

const std::string payment_id = braveledger_state::GetPaymentId(ledger_);
if (payment_id.empty()) {
BLOG(0, "Payment ID is empty");
callback(ledger::Result::LEDGER_ERROR, nullptr);
return;
}

const std::string url = braveledger_request_util::GetBalanceWalletURL(
braveledger_state::GetPaymentId(ledger_));
Expand Down

0 comments on commit e6b4b07

Please sign in to comment.