Skip to content

Commit

Permalink
fix type (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sladuca authored Jan 28, 2025
1 parent bef927c commit 7ee6a19
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@
"peerDependencies": {
"typescript": "^5.6.2"
},
"version": "0.1.24"
"version": "0.1.25"
}
12 changes: 11 additions & 1 deletion src/lib/buy/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,17 @@ export async function getQuote(options: QuoteOptions) {
);
}

return data.quote;
if (!data.quote) {
return null;
}

return {
...data.quote,
price: Number(data.quote.price),
quantity: Number(data.quote.quantity),
start_at: data.quote.start_at,
end_at: data.quote.end_at,
}
}

export async function getOrder(orderId: string) {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/clusters/clusters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ async function removeClusterUserAction({
}) {
const api = await apiClient(token);

const { data, error, response } = await api.DELETE("/v0/credentials/{id}", {
const { data, error, response } = await api.DELETE("/v0/credentials/{id}" as any, {
params: {
path: {
id,
Expand Down
6 changes: 4 additions & 2 deletions src/lib/updown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -406,8 +406,10 @@ async function getDefaultProcurementOptions(props: {
const quote = await getQuote({
instanceType: type,
quantity: nodesRequired,
startsAt: new Date(),
durationSeconds: durationHours * 3600,
minStartTime: new Date(),
maxStartTime: new Date(),
minDurationSeconds: durationHours * 3600,
maxDurationSeconds: durationHours * 3600 + 3600,
});

let quotePricePerNodeHourInCents: number;
Expand Down

0 comments on commit 7ee6a19

Please sign in to comment.