Skip to content

Commit

Permalink
Merge pull request #280 from gobitfly/rm-plankton
Browse files Browse the repository at this point in the history
Remove plankton
  • Loading branch information
manuelsc authored Jun 5, 2024
2 parents e78def4 + 34adbec commit df3b67f
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 20 deletions.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ android {
namespace "in.beaconcha.mobile"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 107
versionName "4.5.0"
versionCode 111
versionName "4.5.4"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down
2 changes: 1 addition & 1 deletion android/app/src/main/java/in/beaconcha/mobile/widget
Submodule widget updated from 63d729 to 51c444
2 changes: 1 addition & 1 deletion src/app/pages/subscribe/subscribe.page.scss
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ ion-label {
}

.package {
width: 25%;
width: 33.33%;
text-align: center;
display: inline-block;

Expand Down
2 changes: 1 addition & 1 deletion src/app/pages/subscribe/subscribe.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export class SubscribePage implements OnInit {
private flavor: FlavorUtils,
private api: ApiService
) {
this.selectedPackage = this.merchant.PACKAGES[2]
this.selectedPackage = this.merchant.PACKAGES[1]
}

ngOnInit() {
Expand Down
40 changes: 25 additions & 15 deletions src/app/utils/MerchantUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,23 @@ const MAX_PRODUCT = 'whale'
providedIn: 'root',
})
export class MerchantUtils {
DEPRECATED_PACKAGES = [
{
name: 'Plankton',
price: '$1.99',
maxValidators: 100,
maxTestnetValidators: 100,
maxBeaconNodes: 1,
deviceMonitoringHours: 30 * 24,
deviceMonitorAlerts: true,
noAds: true,
widgets: false,
customTheme: false,
supportUs: true,
purchaseKey: 'plankton',
},
]

PACKAGES: Package[] = [
{
name: 'Free',
Expand All @@ -50,20 +67,6 @@ export class MerchantUtils {
supportUs: false,
purchaseKey: null,
},
{
name: 'Plankton',
price: '$1.99',
maxValidators: 100,
maxTestnetValidators: 100,
maxBeaconNodes: 1,
deviceMonitoringHours: 30 * 24,
deviceMonitorAlerts: true,
noAds: true,
widgets: false,
customTheme: false,
supportUs: true,
purchaseKey: 'plankton',
},
{
name: 'Goldfish',
price: '$4.99',
Expand Down Expand Up @@ -279,7 +282,7 @@ export class MerchantUtils {
valid: product.valid,
transaction: {
id: product.id,
receipt: isIOS ? product.transaction.appStoreReceipt : product.transaction.purchaseToken,
receipt: isIOS ? product.transaction.id : product.transaction.purchaseToken,
type: product.transaction.type,
},
}
Expand Down Expand Up @@ -367,6 +370,13 @@ export class MerchantUtils {
return current
}
}
for (let i = 0; i < this.DEPRECATED_PACKAGES.length; i++) {
const current = this.DEPRECATED_PACKAGES[i]
if (current.purchaseKey == name) {
return current
}
}

return null
}

Expand Down

0 comments on commit df3b67f

Please sign in to comment.