Skip to content

Commit

Permalink
dropped the interface for version 1 capabilities
Browse files Browse the repository at this point in the history
Signed-off-by: Sanket Teli <[email protected]>
  • Loading branch information
Sanket-0510 committed Aug 1, 2024
1 parent 395be65 commit 5773b2d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
6 changes: 2 additions & 4 deletions src/extend-config/extendGlobal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@ import { GlobalJson } from "../types/FabloConfigJson";
import defaults from "./defaults";

const getNetworkCapabilities = (fabricVersion: string): Capabilities => {
if (version(fabricVersion).isGreaterOrEqual("2.0.0"))
return { channel: "V2_0", orderer: "V2_0", application: "V2_0", isV2: true };


if (version(fabricVersion).isGreaterOrEqual("2.5.0"))
return { channel: "V2_5", orderer: "V2_5", application: "V2_5", isV2: true };

return { channel: "V1_3", orderer: "V1_1", application: "V1_3", isV2: false };
return { channel: "V2_0", orderer: "V2_0", application: "V2_0", isV2: true };
};

const getVersions = (fabricVersion: string): FabricVersions => {
Expand Down
9 changes: 1 addition & 8 deletions src/types/FabloConfigExtended.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@ export interface FabricVersions {
fabricRecommendedNodeVersion: string;
}

interface CapabilitiesV1 {
application: "V1_3" | "V1_4_2";
channel: "V1_3" | "V1_4_2" | "V1_4_3";
orderer: "V1_1" | "V1_4_2";
isV2: false;
}

interface CapabilitiesV2 {
application: "V2_0";
channel: "V2_0";
Expand All @@ -32,7 +25,7 @@ interface CapabilitiesV_2_5 {



export type Capabilities = CapabilitiesV1 | CapabilitiesV2 | CapabilitiesV_2_5;
export type Capabilities = CapabilitiesV2 | CapabilitiesV_2_5;

export interface Global extends FabricVersions {
tls: boolean;
Expand Down

0 comments on commit 5773b2d

Please sign in to comment.