Skip to content

Commit

Permalink
Merge pull request #463 from Sanket-0510/v_2_5_interface
Browse files Browse the repository at this point in the history
added capabilityV_2_5
  • Loading branch information
dzikowski authored Jul 26, 2024
2 parents 7ea7a50 + 9fcc33e commit 395be65
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
7 changes: 2 additions & 5 deletions src/extend-config/extendGlobal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,8 @@ 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("1.4.3"))
return { channel: "V1_4_3", orderer: "V1_4_2", application: "V1_4_2", isV2: false };

if (version(fabricVersion).isGreaterOrEqual("1.4.2"))
return { channel: "V1_4_2", orderer: "V1_4_2", application: "V1_4_2", isV2: false };
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 };
};
Expand Down
12 changes: 11 additions & 1 deletion src/types/FabloConfigExtended.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,17 @@ interface CapabilitiesV2 {
isV2: true;
}

export type Capabilities = CapabilitiesV1 | CapabilitiesV2;

interface CapabilitiesV_2_5 {
application: "V2_5";
channel: "V2_5";
orderer: "V2_5";
isV2: true;
}



export type Capabilities = CapabilitiesV1 | CapabilitiesV2 | CapabilitiesV_2_5;

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

0 comments on commit 395be65

Please sign in to comment.