Skip to content

Commit

Permalink
Merge pull request #2658 from brave-intl/master
Browse files Browse the repository at this point in the history
Production 2024-09-17_01
  • Loading branch information
pavelbrm authored Sep 17, 2024
2 parents f19ff94 + 4bcfd7f commit 4ff6646
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion services/skus/model/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ func (x *OrderItem) IsLeo() bool {
return false
}

return x.SKU == "brave-leo-premium"
return x.SKU == "brave-leo-premium" || x.SKU == "brave-leo-premium-year"
}

func (x *OrderItem) StripeItemID() (string, bool) {
Expand Down
2 changes: 1 addition & 1 deletion services/skus/skus.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ func skuNameByMobileName(subID string) (string, error) {
return "brave-leo-premium-year", nil

// iOS Leo Annual.
case "braveleo.yearly", "nightly.braveleo.yearly":
case "braveleo.yearly", "nightly.braveleo.yearly", "braveleo.yearly.2", "braveleo2.yearly":
return "brave-leo-premium-year", nil

// Android VPN Monthly.
Expand Down
12 changes: 12 additions & 0 deletions services/skus/skus_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,18 @@ func TestSKUNameByMobileName(t *testing.T) {
exp: tcExpected{sku: "brave-leo-premium-year"},
},

{
name: "ios_leo_annual_release_new",
given: "braveleo2.yearly",
exp: tcExpected{sku: "brave-leo-premium-year"},
},

{
name: "ios_leo_annual_release_new2",
given: "braveleo.yearly.2",
exp: tcExpected{sku: "brave-leo-premium-year"},
},

{
name: "android_vpn_monthly_release",
given: "brave.vpn.monthly",
Expand Down

0 comments on commit 4ff6646

Please sign in to comment.