-
Notifications
You must be signed in to change notification settings - Fork 868
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds detailed view for pending contributions
Resolves brave/brave-browser#3175
- Loading branch information
Showing
46 changed files
with
1,350 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,32 @@ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
* You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
/* Copyright (c) 2019 The Brave Authors. All rights reserved. | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
#include "brave/components/brave_rewards/browser/pending_contribution.h" | ||
|
||
namespace brave_rewards { | ||
|
||
PendingContribution::PendingContribution() : | ||
PendingContributionInfo::PendingContributionInfo() : | ||
amount(0), | ||
added_date(0), | ||
reconcile_date(0) { | ||
added_date(0) { | ||
} | ||
|
||
PendingContribution::~PendingContribution() { } | ||
PendingContributionInfo::~PendingContributionInfo() { } | ||
|
||
PendingContributionInfo::PendingContributionInfo( | ||
const PendingContributionInfo& data) { | ||
publisher_key = data.publisher_key; | ||
verified = data.verified; | ||
name = data.name; | ||
favicon_url = data.favicon_url; | ||
url = data.url; | ||
provider = data.provider; | ||
amount = data.amount; | ||
added_date = data.added_date; | ||
viewing_id = data.viewing_id; | ||
category = data.category; | ||
expiration_date = data.expiration_date; | ||
} | ||
|
||
} // namespace brave_rewards |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,36 @@ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
* You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
/* Copyright (c) 2019 The Brave Authors. All rights reserved. | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
#ifndef BRAVE_BROWSER_PAYMENTS_PENDING_CONTRIBUTION_ | ||
#define BRAVE_BROWSER_PAYMENTS_PENDING_CONTRIBUTION_ | ||
#ifndef BRAVE_COMPONENTS_BRAVE_REWARDS_BROWSER_PENDING_CONTRIBUTION_H_ | ||
#define BRAVE_COMPONENTS_BRAVE_REWARDS_BROWSER_PENDING_CONTRIBUTION_H_ | ||
|
||
#include <string> | ||
#include <vector> | ||
|
||
namespace brave_rewards { | ||
|
||
struct PendingContribution { | ||
PendingContribution(); | ||
~PendingContribution(); | ||
PendingContribution(const PendingContribution& data) = default; | ||
struct PendingContributionInfo { | ||
PendingContributionInfo(); | ||
~PendingContributionInfo(); | ||
PendingContributionInfo(const PendingContributionInfo& data); | ||
|
||
std::string publisher_key; | ||
bool verified; | ||
std::string name; | ||
std::string favicon_url; | ||
std::string url; | ||
std::string provider; | ||
double amount = 0; | ||
uint32_t added_date = 0; | ||
uint32_t reconcile_date = 0; | ||
std::string viewing_id; | ||
int category; | ||
uint32_t expiration_date = 0; | ||
}; | ||
|
||
using PendingContributionList = std::vector<PendingContribution>; | ||
using PendingContributionInfoList = std::vector<PendingContributionInfo>; | ||
|
||
} // namespace brave_rewards | ||
|
||
#endif //BRAVE_BROWSER_PAYMENTS_PENDING_CONTRIBUTION_ | ||
#endif // BRAVE_COMPONENTS_BRAVE_REWARDS_BROWSER_PENDING_CONTRIBUTION_H_ |
Oops, something went wrong.