Commit 28d4b829 authored by Douglas Gubert's avatar Douglas Gubert

Change method verifying that license should be validated

parent b2e7f050
......@@ -4,6 +4,7 @@ import { InvalidLicenseError } from '../errors';
import { IMarketplaceInfo } from '../marketplace';
import { AppLicenseValidationResult } from '../marketplace/license';
import { Crypto } from '../marketplace/license';
import { MarketplacePurchaseType } from '../marketplace/MarketplacePurchaseType';
enum LicenseVersion {
v1 = 1,
......@@ -18,7 +19,7 @@ export class AppLicenseManager {
}
public async validate(validationResult: AppLicenseValidationResult, appMarketplaceInfo?: IMarketplaceInfo): Promise<void> {
if (!appMarketplaceInfo || !appMarketplaceInfo.subscriptionInfo) {
if (!appMarketplaceInfo || appMarketplaceInfo.purchaseType !== MarketplacePurchaseType.PurchaseTypeSubscription) {
return;
}
......
......@@ -17,7 +17,7 @@ export interface IMarketplaceInfo extends IAppInfo {
modifiedDate: string;
price: number;
subscriptionInfo?: IMarketplaceSubscriptionInfo;
puchaseType: MarketplacePurchaseType;
purchaseType: MarketplacePurchaseType;
pricingPlans?: Array<IMarketplacePricingPlan>;
bundledIn?: Array<IMarketplaceSimpleBundleInfo>;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment