Merge pull request #12006 from brave/issues/20710
Change maximum amount of keys
This commit is contained in:
@@ -191,6 +191,10 @@ TEST_F(BatAdsAccountTest, GetIssuersIfAdsAreEnabled) {
|
||||
{
|
||||
"publicKey": "XovQyvVWM8ez0mAzTtfqgPIbSpH5/idv8w0KJxhirwA=",
|
||||
"associatedValue": "0.1"
|
||||
},
|
||||
{
|
||||
"publicKey": "wAcnJtb34Asykf+2jrTWrjFiaTqilklZ6bxLyR3LyFo=",
|
||||
"associatedValue": "0.1"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -212,7 +216,8 @@ TEST_F(BatAdsAccountTest, GetIssuersIfAdsAreEnabled) {
|
||||
{"crDVI1R6xHQZ4D9cQu4muVM5MaaM1QcOT4It8Y/CYlw=", 0.0}},
|
||||
{{"JiwFR2EU/Adf1lgox+xqOVPuc6a/rxdy/LguFG5eaXg=", 0.0},
|
||||
{"bPE1QE65mkIgytffeu7STOfly+x10BXCGuk5pVlOHQU=", 0.1},
|
||||
{"XovQyvVWM8ez0mAzTtfqgPIbSpH5/idv8w0KJxhirwA=", 0.1}});
|
||||
{"XovQyvVWM8ez0mAzTtfqgPIbSpH5/idv8w0KJxhirwA=", 0.1},
|
||||
{"wAcnJtb34Asykf+2jrTWrjFiaTqilklZ6bxLyR3LyFo=", 0.1}});
|
||||
|
||||
EXPECT_EQ(expected_issuers, issuers);
|
||||
}
|
||||
@@ -254,6 +259,10 @@ TEST_F(BatAdsAccountTest, DoNotGetIssuersIfAdsAreDisabled) {
|
||||
{
|
||||
"publicKey": "XovQyvVWM8ez0mAzTtfqgPIbSpH5/idv8w0KJxhirwA=",
|
||||
"associatedValue": "0.1"
|
||||
},
|
||||
{
|
||||
"publicKey": "wAcnJtb34Asykf+2jrTWrjFiaTqilklZ6bxLyR3LyFo=",
|
||||
"associatedValue": "0.1"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -317,6 +326,10 @@ TEST_F(BatAdsAccountTest, DoNotGetInvalidIssuers) {
|
||||
{
|
||||
"publicKey": "wAcnJtb34Asykf+2jrTWrjFiaTqilklZ6bxLyR3LyFo=",
|
||||
"associatedValue": "0.1"
|
||||
},
|
||||
{
|
||||
"publicKey": "ZvzeYOT1geUQXfOsYXBxZj/H26IfiBUVodHl51j68xI=",
|
||||
"associatedValue": "0.1"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace ads {
|
||||
|
||||
namespace {
|
||||
|
||||
constexpr int kMaximumIssuerPublicKeys = 2;
|
||||
constexpr int kMaximumIssuerPublicKeys = 3;
|
||||
|
||||
bool PublicKeyExists(const IssuerInfo& issuer, const std::string& public_key) {
|
||||
const auto iter = issuer.public_keys.find(public_key);
|
||||
|
||||
+2
-1
@@ -236,7 +236,8 @@ TEST_F(BatAdsIssuersUtilTest, IsIssuerInvalid) {
|
||||
{{"JiwFR2EU/Adf1lgox+xqOVPuc6a/rxdy/LguFG5eaXg=", 0.0},
|
||||
{"bPE1QE65mkIgytffeu7STOfly+x10BXCGuk5pVlOHQU=", 0.1},
|
||||
{"XovQyvVWM8ez0mAzTtfqgPIbSpH5/idv8w0KJxhirwA=", 0.1},
|
||||
{"wAcnJtb34Asykf+2jrTWrjFiaTqilklZ6bxLyR3LyFo=", 0.1}});
|
||||
{"wAcnJtb34Asykf+2jrTWrjFiaTqilklZ6bxLyR3LyFo=", 0.1},
|
||||
{"ZvzeYOT1geUQXfOsYXBxZj/H26IfiBUVodHl51j68xI=", 0.1}});
|
||||
|
||||
const absl::optional<IssuerInfo>& issuer_optional =
|
||||
GetIssuerForType(issuers, IssuerType::kPayments);
|
||||
|
||||
Reference in New Issue
Block a user