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/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 1c8825ae..782bfc8d 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', @@ -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, }, } @@ -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 }