Skip to content

Commit 30fde74

Browse files
chore: added seperate currency list for create-invoice-form (#99)
Co-authored-by: MantisClone <[email protected]>
1 parent 87b8484 commit 30fde74

File tree

3 files changed

+165
-5
lines changed

3 files changed

+165
-5
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ jobs:
3434
run: npm install --omit=optional
3535

3636
- name: Build
37-
run: |
38-
ulimit -S -c unlimited
37+
run: |
38+
ulimit -S -c unlimited
3939
npm run build
4040
env:
4141
NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID: ${{ secrets.NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID }}

pages/create-invoice.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import Head from "next/head";
22
import dynamic from "next/dynamic";
3-
import { config } from "@/utils/config";
4-
import { useAppContext } from "@/utils/context";
53
import { rainbowKitConfig as wagmiConfig } from "@/utils/wagmiConfig";
4+
import { config } from "@/utils/config";
65
import { Spinner } from "@/components/ui";
6+
import { useAppContext } from "@/utils/context";
7+
import { createFormCurrencies } from "@/utils/currencies";
78

89
const CreateInvoiceForm = dynamic(
910
() => import("@requestnetwork/create-invoice-form/react"),
@@ -23,6 +24,7 @@ export default function CreateInvoice() {
2324
config={config}
2425
wagmiConfig={wagmiConfig}
2526
requestNetwork={requestNetwork}
27+
currencies={createFormCurrencies}
2628
/>
2729
</div>
2830
</>

utils/currencies.ts

Lines changed: 159 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,164 @@
11
import { RequestLogicTypes, CurrencyTypes } from "@requestnetwork/types";
22

3-
export const currencies: CurrencyTypes.CurrencyInput[] = [
3+
export const createFormCurrencies: CurrencyTypes.CurrencyInput[] = [
4+
// Sepolia Testnet
5+
{
6+
symbol: "FAU",
7+
address: "0x370DE27fdb7D1Ff1e1BaA7D11c5820a324Cf623C",
8+
network: "sepolia",
9+
decimals: 18,
10+
type: RequestLogicTypes.CURRENCY.ERC20,
11+
},
12+
{
13+
symbol: "fUSDT",
14+
address: "0x7169D38820dfd117C3FA1f22a697dBA58d90BA06",
15+
network: "sepolia",
16+
decimals: 6,
17+
type: RequestLogicTypes.CURRENCY.ERC20,
18+
},
19+
{
20+
symbol: "fUSDC",
21+
address: "0x8267cF9254734C6Eb452a7bb9AAF97B392258b21",
22+
network: "sepolia",
23+
decimals: 6,
24+
type: RequestLogicTypes.CURRENCY.ERC20,
25+
},
26+
{
27+
symbol: "ETH",
28+
network: "sepolia",
29+
decimals: 18,
30+
type: RequestLogicTypes.CURRENCY.ETH,
31+
},
32+
33+
// Ethereum Mainnet
34+
{
35+
symbol: "USDC",
36+
address: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
37+
network: "mainnet",
38+
decimals: 6,
39+
type: RequestLogicTypes.CURRENCY.ERC20,
40+
},
41+
{
42+
symbol: "USDT",
43+
address: "0xdAC17F958D2ee523a2206206994597C13D831ec7",
44+
network: "mainnet",
45+
decimals: 6,
46+
type: RequestLogicTypes.CURRENCY.ERC20,
47+
},
48+
{
49+
symbol: "DAI",
50+
address: "0x6B175474E89094C44Da98b954EedeAC495271d0F",
51+
network: "mainnet",
52+
decimals: 18,
53+
type: RequestLogicTypes.CURRENCY.ERC20,
54+
},
55+
{
56+
symbol: "REQ",
57+
address: "0x8f8221aFbB33998d8584A2B05749bA73c37a938a",
58+
network: "mainnet",
59+
decimals: 18,
60+
type: RequestLogicTypes.CURRENCY.ERC20,
61+
},
62+
{
63+
symbol: "ETH",
64+
network: "mainnet",
65+
decimals: 18,
66+
type: RequestLogicTypes.CURRENCY.ETH,
67+
},
68+
69+
// Polygon (Matic)
70+
{
71+
symbol: "USDC",
72+
address: "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174",
73+
network: "matic",
74+
decimals: 6,
75+
type: RequestLogicTypes.CURRENCY.ERC20,
76+
},
77+
{
78+
symbol: "USDT",
79+
address: "0xc2132D05D31c914a87C6611C10748AEb04B58e8F",
80+
network: "matic",
81+
decimals: 6,
82+
type: RequestLogicTypes.CURRENCY.ERC20,
83+
},
84+
{
85+
symbol: "DAI",
86+
address: "0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063",
87+
network: "matic",
88+
decimals: 18,
89+
type: RequestLogicTypes.CURRENCY.ERC20,
90+
},
91+
{
92+
symbol: "MATIC",
93+
network: "matic",
94+
decimals: 18,
95+
type: RequestLogicTypes.CURRENCY.ETH,
96+
},
97+
98+
// BSC
99+
{
100+
symbol: "DAI",
101+
address: "0x1AF3F329e8BE154074D8769D1FFa4eE058B1DBc3",
102+
network: "bsc",
103+
decimals: 18,
104+
type: RequestLogicTypes.CURRENCY.ERC20,
105+
},
106+
{
107+
symbol: "BUSD",
108+
address: "0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56",
109+
network: "bsc",
110+
decimals: 18,
111+
type: RequestLogicTypes.CURRENCY.ERC20,
112+
},
113+
114+
// xDai
115+
{
116+
symbol: "USDC",
117+
address: "0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83",
118+
network: "xdai",
119+
decimals: 6,
120+
type: RequestLogicTypes.CURRENCY.ERC20,
121+
},
122+
123+
// Optimism
124+
{
125+
symbol: "USDC",
126+
address: "0x7F5c764cBc14f9669B88837ca1490cCa17c31607",
127+
network: "optimism",
128+
decimals: 6,
129+
type: RequestLogicTypes.CURRENCY.ERC20,
130+
},
131+
{
132+
symbol: "USDT",
133+
address: "0x94b008aA00579c1307B0EF2c499aD98a8ce58e58",
134+
network: "optimism",
135+
decimals: 6,
136+
type: RequestLogicTypes.CURRENCY.ERC20,
137+
},
138+
{
139+
symbol: "DAI",
140+
address: "0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1",
141+
network: "optimism",
142+
decimals: 18,
143+
type: RequestLogicTypes.CURRENCY.ERC20,
144+
},
145+
{
146+
symbol: "ETH",
147+
network: "optimism",
148+
decimals: 18,
149+
type: RequestLogicTypes.CURRENCY.ETH,
150+
},
151+
152+
// Base
153+
{
154+
symbol: "ETH",
155+
network: "base",
156+
decimals: 18,
157+
type: RequestLogicTypes.CURRENCY.ETH,
158+
},
159+
];
160+
161+
export const dashboardCurrencies: CurrencyTypes.CurrencyInput[] = [
4162
{
5163
symbol: "FAU",
6164
address: "0x370DE27fdb7D1Ff1e1BaA7D11c5820a324Cf623C",

0 commit comments

Comments
 (0)