From dcb85e72d3b6b18d71cc97fb2f665944f382cabe Mon Sep 17 00:00:00 2001 From: Manuel <5877862+manuelsc@users.noreply.github.com> Date: Wed, 5 Jun 2024 13:27:52 +0200 Subject: [PATCH 1/3] remove plankton --- android/app/build.gradle | 4 +-- .../src/main/java/in/beaconcha/mobile/widget | 2 +- src/app/pages/subscribe/subscribe.page.scss | 2 +- src/app/utils/MerchantUtils.ts | 28 +++++++++---------- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index ee949e5f..a5296a2e 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -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" } diff --git a/android/app/src/main/java/in/beaconcha/mobile/widget b/android/app/src/main/java/in/beaconcha/mobile/widget index 63d7292e..51c4441b 160000 --- a/android/app/src/main/java/in/beaconcha/mobile/widget +++ b/android/app/src/main/java/in/beaconcha/mobile/widget @@ -1 +1 @@ -Subproject commit 63d7292e397db12b1545b9ccc2f071858add6702 +Subproject commit 51c4441b12bbb82fe26feb3ad93feb36f23f6751 diff --git a/src/app/pages/subscribe/subscribe.page.scss b/src/app/pages/subscribe/subscribe.page.scss index eb6f83cb..aab9c48b 100644 --- a/src/app/pages/subscribe/subscribe.page.scss +++ b/src/app/pages/subscribe/subscribe.page.scss @@ -74,7 +74,7 @@ ion-label { } .package { - width: 25%; + width: 33.33%; text-align: center; display: inline-block; diff --git a/src/app/utils/MerchantUtils.ts b/src/app/utils/MerchantUtils.ts index 1c8825ae..90e26345 100644 --- a/src/app/utils/MerchantUtils.ts +++ b/src/app/utils/MerchantUtils.ts @@ -50,20 +50,20 @@ 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: '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', From ebc245c7794d1b2bc4db74e28e5d2354bf631b88 Mon Sep 17 00:00:00 2001 From: Manuel <5877862+manuelsc@users.noreply.github.com> Date: Wed, 5 Jun 2024 13:44:25 +0200 Subject: [PATCH 2/3] deprecation handling --- src/app/pages/subscribe/subscribe.page.ts | 2 +- src/app/utils/MerchantUtils.ts | 38 ++++++++++++++--------- 2 files changed, 25 insertions(+), 15 deletions(-) diff --git a/src/app/pages/subscribe/subscribe.page.ts b/src/app/pages/subscribe/subscribe.page.ts index 896af52c..e0114e4c 100644 --- a/src/app/pages/subscribe/subscribe.page.ts +++ b/src/app/pages/subscribe/subscribe.page.ts @@ -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() { diff --git a/src/app/utils/MerchantUtils.ts b/src/app/utils/MerchantUtils.ts index 90e26345..619eec4d 100644 --- a/src/app/utils/MerchantUtils.ts +++ b/src/app/utils/MerchantUtils.ts @@ -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', @@ -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', @@ -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 } From 34adbec6ca70c16927b05aaa0791879d2984ecd1 Mon Sep 17 00:00:00 2001 From: Manuel Date: Wed, 5 Jun 2024 14:20:00 +0200 Subject: [PATCH 3/3] merge --- src/app/utils/MerchantUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/utils/MerchantUtils.ts b/src/app/utils/MerchantUtils.ts index 619eec4d..782bfc8d 100644 --- a/src/app/utils/MerchantUtils.ts +++ b/src/app/utils/MerchantUtils.ts @@ -282,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, }, }