Skip to content
8 changes: 8 additions & 0 deletions src/components/AppSidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@
title: "Offered",
url: "/quotes/offered",
},
{
title: "Offer Expired",
url: "/quotes/offerexpired",
},

Check warning on line 35 in src/components/AppSidebar.tsx

View check run for this annotation

Codecov / codecov/patch

src/components/AppSidebar.tsx#L32-L35

Added lines #L32 - L35 were not covered by tests
{
title: "Accepted",
url: "/quotes/accepted",
Expand All @@ -41,6 +45,10 @@
title: "Rejected",
url: "/quotes/rejected",
},
{
title: "Canceled",
url: "/quotes/canceled",
},

Check warning on line 51 in src/components/AppSidebar.tsx

View check run for this annotation

Codecov / codecov/patch

src/components/AppSidebar.tsx#L48-L51

Added lines #L48 - L51 were not covered by tests
],
},
],
Expand Down
15 changes: 13 additions & 2 deletions src/generated/client/sdk.gen.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// This file is auto-generated by @hey-api/openapi-ts

import type { Options as ClientOptions, TDataShape, Client } from '@hey-api/client-fetch';
import type { ListQuotesData, ListQuotesResponse, ListPendingQuotesData, ListPendingQuotesResponse, AdminLookupQuoteData, AdminLookupQuoteResponse, AdminUpdateQuoteData, AdminUpdateQuoteResponse, ResolveOfferData, EnquireQuoteData, EnquireQuoteResponse, LookupQuoteData, LookupQuoteResponse, ActivateKeysetData, ActivateKeysetResponse, DebitData, CreditData, ECashBalance, OnChainBalanceData, OnChainData} from './types.gen';
import type { ListQuotesData, ListQuotesResponse, ListPendingQuotesData, ListPendingQuotesResponse, AdminLookupQuoteData, AdminLookupQuoteResponse, AdminUpdateQuoteData, AdminUpdateQuoteResponse, ResolveOfferData, EnquireQuoteData, EnquireQuoteResponse, LookupQuoteData, LookupQuoteResponse, ActivateKeysetData, ActivateKeysetResponse, DebitData, CreditData, ECashBalance, OnChainBalanceData, OnChainData, KeysetInfoData, KeySetInfo} from './types.gen';
import { client as _heyApiClient } from './client.gen';

export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = ClientOptions<TData, ThrowOnError> & {
Expand Down Expand Up @@ -91,7 +91,7 @@
*/
export const activateKeyset = <ThrowOnError extends boolean = false>(options: Options<ActivateKeysetData, ThrowOnError>) => {
return (options.client ?? _heyApiClient).post<ActivateKeysetResponse, unknown, ThrowOnError>({
url: '/v1/admin/keys/activate',
url: '/v1/admin/keys/enable',

Check warning on line 94 in src/generated/client/sdk.gen.ts

View check run for this annotation

Codecov / codecov/patch

src/generated/client/sdk.gen.ts#L94

Added line #L94 was not covered by tests
...options,
headers: {
'Content-Type': 'application/json',
Expand Down Expand Up @@ -125,3 +125,14 @@
...options
});
};

/**
* --------------------------- KeySetInfo
*/

export const keysetInfo = <ThrowOnError extends boolean = false>(options: Options<KeysetInfoData, ThrowOnError>) => {
return (options.client ?? _heyApiClient).get<KeySetInfo, unknown, ThrowOnError>({
url: '/v1/admin/keysets/{keyset_id}',
...options
});
};

Check warning on line 138 in src/generated/client/sdk.gen.ts

View check run for this annotation

Codecov / codecov/patch

src/generated/client/sdk.gen.ts#L133-L138

Added lines #L133 - L138 were not covered by tests
42 changes: 38 additions & 4 deletions src/generated/client/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,22 +135,36 @@ export type InfoReply = {
} | {
bill: BillInfo;
id: string;
signatures: Array<BlindSignature>;
status: 'Canceled';
tstamp: string;
} | {
bill: BillInfo;
id: string;
keyset_id: string;
status: 'Offered';
discounted: number;
ttl: string;
} | {
bill: BillInfo;
id: string;
status: 'OfferExpired';
discounted: number;
tstamp: string;
} | {
bill: BillInfo;
id: string;
status: 'Denied';
} | {
bill: BillInfo;
id: string;
signatures: Array<BlindSignature>;
keyset_id: string;
discounted: number;
status: 'Accepted';
} | {
bill: BillInfo;
id: string;
status: 'Rejected';
discounted: number;
tstamp: string;
};

Expand Down Expand Up @@ -402,7 +416,7 @@ export type ActivateKeysetData = {
body: ActivateKeysetRequest;
path?: never;
query?: never;
url: '/v1/admin/keys/activate';
url: '/v1/admin/keys/enable';
};

export type ActivateKeysetErrors = {
Expand Down Expand Up @@ -455,10 +469,30 @@ export type OnChainBalanceData = {
confirmed: number;
};


export type OnChainData = {
body?: never;
path?: never;
query?: never;
url: '/v1/admin/onchain/balance';
};

/**
* Keyset information
*/

export type KeySetInfo = {
id: string;
unit: CurrencyUnit;
active: boolean;
input_fee_ppk: number;
};


export type KeysetInfoData = {
body?: never;
path: {
keyset_id: string;
};
query?: never;
url: '/v1/admin/keysets/{keyset_id}';
};
7 changes: 2 additions & 5 deletions src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,9 @@

const prepare = async () => {
await initKeycloak()
// if (meta.apiMocksEnabled) {
// const { worker } = await import("./mocks/browser")
// await worker.start()
// }
}

function App() {

Check warning on line 25 in src/main.tsx

View workflow job for this annotation

GitHub Actions / test (v22.11.0)

Fast refresh only works when a file has exports. Move your component(s) to a separate file
return (
<QueryClientProvider client={queryClient}>
<BrowserRouter>
Expand All @@ -39,10 +35,11 @@
<Route path="quotes" element={<StatusQuotePage />} />
<Route path="quotes/pending" element={<StatusQuotePage status="Pending" />} />
<Route path="quotes/accepted" element={<StatusQuotePage status="Accepted" />} />
<Route path="quotes/canceled" element={<StatusQuotePage status="Canceled" />} />

Check warning on line 38 in src/main.tsx

View check run for this annotation

Codecov / codecov/patch

src/main.tsx#L38

Added line #L38 was not covered by tests
<Route path="quotes/offered" element={<StatusQuotePage status="Offered" />} />
<Route path="quotes/offerexpired" element={<StatusQuotePage status="OfferExpired" />} />

Check warning on line 40 in src/main.tsx

View check run for this annotation

Codecov / codecov/patch

src/main.tsx#L40

Added line #L40 was not covered by tests
<Route path="quotes/denied" element={<StatusQuotePage status="Denied" />} />
<Route path="quotes/rejected" element={<StatusQuotePage status="Rejected" />} />
{/* <Route path="quotes/expired" element={<StatusQuotePage status="Rejected" />} /> */}
<Route path="quotes/:id" element={<QuotePage />} />
<Route path="settings" element={<SettingsPage />} />
<Route path="info" element={<InfoPage />} />
Expand Down
Loading