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 }