Skip to content

Commit

Permalink
fix(market): fixed the ProposalDTO type that was wronlgy typed as par…
Browse files Browse the repository at this point in the history
…tial

This was forcing users to unnecessairly type-guard their code when writing proposal filters
  • Loading branch information
grisha87 committed Oct 16, 2024
1 parent da2c270 commit fc2fd81
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/market/proposal/offer-proposal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,22 @@ export type PricingInfo = {

export type ProposalState = "Initial" | "Draft" | "Rejected" | "Accepted" | "Expired";

export type ProposalDTO = Partial<{
export type ProposalDTO = {
transferProtocol: string[];
cpuBrand: string;
cpuCapabilities: string[];
cpuCores: number;
cpuThreads: number;
memory: number;
storage: number;
publicNet: boolean;
runtimeCapabilities: string[];
runtimeName: string;
runtimeVersion: string;
state: ProposalState;
}>;

/** Non-standardised property, we can't assume it will be always there */
publicNet?: boolean;
};

/**
* Entity representing the offer presented by the Provider to the Requestor
Expand Down

0 comments on commit fc2fd81

Please sign in to comment.