@@ -44,11 +44,11 @@ enum APP_STATUS {
4444}
4545
4646export default function Home ( ) {
47- const [ storageChain , setStorageChain ] = useState ( "5" ) ;
48- const [ expectedAmount , setExpectedAmount ] = useState ( "" ) ;
49- const [ currency , setCurrency ] = useState (
50- "5_0xBA62BCfcAaFc6622853cca2BE6Ac7d845BC0f2Dc"
47+ const [ storageChain , setStorageChain ] = useState (
48+ storageChains . keys ( ) . next ( ) . value ,
5149 ) ;
50+ const [ expectedAmount , setExpectedAmount ] = useState ( "" ) ;
51+ const [ currency , setCurrency ] = useState ( currencies . keys ( ) . next ( ) . value ) ;
5252 const [ paymentRecipient , setPaymentRecipient ] = useState ( "" ) ;
5353 const [ payerIdentity , setPayerIdentity ] = useState ( "" ) ;
5454 const [ dueDate , setDueDate ] = useState ( "" ) ;
@@ -77,7 +77,7 @@ export default function Home() {
7777
7878 try {
7979 const _request = await requestClient . fromRequestId (
80- requestData ! . requestId
80+ requestData ! . requestId ,
8181 ) ;
8282 let _requestData = _request . getData ( ) ;
8383 const paymentTx = await payRequest ( _requestData , signer ) ;
@@ -129,14 +129,14 @@ export default function Home() {
129129
130130 try {
131131 const _request = await requestClient . fromRequestId (
132- requestData ! . requestId
132+ requestData ! . requestId ,
133133 ) ;
134134 const _requestData = _request . getData ( ) ;
135135 alert ( `Checking if payer has sufficient funds...` ) ;
136136 const _hasSufficientFunds = await hasSufficientFunds (
137137 _requestData ,
138138 address as string ,
139- { provider : provider }
139+ { provider : provider } ,
140140 ) ;
141141 alert ( `_hasSufficientFunds = ${ _hasSufficientFunds } ` ) ;
142142 if ( ! _hasSufficientFunds ) {
@@ -151,7 +151,7 @@ export default function Home() {
151151 const _hasErc20Approval = await hasErc20Approval (
152152 _requestData ,
153153 address as string ,
154- provider
154+ provider ,
155155 ) ;
156156 alert ( `_hasErc20Approval = ${ _hasErc20Approval } ` ) ;
157157 if ( ! _hasErc20Approval ) {
@@ -204,7 +204,7 @@ export default function Home() {
204204 } ,
205205 expectedAmount : parseUnits (
206206 expectedAmount as `${number } `,
207- currencies . get ( currency ) ! . decimals
207+ currencies . get ( currency ) ! . decimals ,
208208 ) . toString ( ) ,
209209 payee : {
210210 type : Types . Identity . TYPE . ETHEREUM_ADDRESS ,
@@ -244,7 +244,7 @@ export default function Home() {
244244 try {
245245 setStatus ( APP_STATUS . PERSISTING_TO_IPFS ) ;
246246 const request = await requestClient . createRequest (
247- requestCreateParameters
247+ requestCreateParameters ,
248248 ) ;
249249
250250 setStatus ( APP_STATUS . PERSISTING_ON_CHAIN ) ;
@@ -457,13 +457,16 @@ export default function Home() {
457457 < br > </ br >
458458 < ul >
459459 < li >
460- • Get FAU on Goerli using the{ " " }
461- < Link href = "https://erc20faucet.com/" target = "_blank" >
462- ERC20 Faucet by peppersec
460+ • Get FAU on Sepolia using the{ " " }
461+ < Link
462+ href = "https://sepolia.etherscan.io/address/0x370DE27fdb7D1Ff1e1BaA7D11c5820a324Cf623C#writeContract#F4"
463+ target = "_blank"
464+ >
465+ mint function on the FaucetToken contract by peppersec
463466 </ Link >
464467 </ li >
465468 < li >
466- • Get USDC on Goerli using the{ " " }
469+ • Get USDC on Sepolia using the{ " " }
467470 < Link href = "https://usdcfaucet.com/" target = "_blank" >
468471 USDC Faucet by blockpatron
469472 </ Link >
@@ -483,8 +486,8 @@ export default function Home() {
483486 onClick = { ( ) =>
484487 switchNetwork ?.(
485488 chains . find (
486- ( chain ) => chain . network === requestData ?. currencyInfo . network
487- ) ?. id
489+ ( chain ) => chain . network === requestData ?. currencyInfo . network ,
490+ ) ?. id ,
488491 )
489492 }
490493 className = { styles . h9_w96 }
0 commit comments