Skip to content

Commit 2bd6fd1

Browse files
authored
fix: currency interface (#208)
1 parent 53a01b3 commit 2bd6fd1

File tree

2 files changed

+5
-18
lines changed

2 files changed

+5
-18
lines changed

packages/create-invoice-form/src/lib/react/CreateInvoiceForm.d.ts

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,14 @@
11
import React from "react";
22
import { Config as WagmiConfig } from "@wagmi/core";
33
import type { IConfig } from "@requestnetwork/shared-types";
4-
import type { RequestNetwork, Types } from "@requestnetwork/request-client.js";
4+
import type { RequestNetwork } from "@requestnetwork/request-client.js";
5+
import type { CurrencyTypes } from "@requestnetwork/types";
56

67
export interface CreateInvoiceFormProps {
78
config: IConfig;
89
wagmiConfig: WagmiConfig;
910
requestNetwork: RequestNetwork | null | undefined;
10-
currencies: {
11-
symbol: string;
12-
address: string;
13-
network: string;
14-
decimals: number;
15-
type: Types.RequestLogic.CURRENCY;
16-
}[];
11+
currencies: CurrencyTypes.CurrencyInput[];
1712
}
1813

1914
/**
@@ -30,15 +25,7 @@ export interface CreateInvoiceFormProps {
3025
* config={config}
3126
* wagmiConfig={wagmiConfig}
3227
* requestNetwork={requestNetwork}
33-
* currencies={[
34-
* {
35-
* symbol: "USDC",
36-
* address: "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238",
37-
* network: "sepolia",
38-
* decimals: 6,
39-
* type: Types.RequestLogic.CURRENCY.ERC20,
40-
* },
41-
* ]}
28+
* currencies={currencies}
4229
* />
4330
*/
4431
declare const CreateInvoiceForm: React.FC<CreateInvoiceFormProps>;

packages/invoice-dashboard/src/lib/react/InvoiceDashboard.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export interface InvoiceDashboardProps {
88
config: IConfig;
99
wagmiConfig: WagmiConfig;
1010
requestNetwork: RequestNetwork | null | undefined;
11-
currencies: CurrencyTypes.CurrencyDefinition[];
11+
currencies: CurrencyTypes.CurrencyInput[];
1212
}
1313
/**
1414
* InvoiceDashboard is a React component that integrates with the Request Network to manage and display invoices.

0 commit comments

Comments
 (0)