@@ -40,7 +40,7 @@ function App() {
40
40
const [ totalCost , setTotalCost ] = useState < number > ( costPerByte * dataSize ) ;
41
41
const [ errorText , setErrorText ] = useState < string > ( "" ) ;
42
42
const [ chunkSize , setChunkSize ] = useState < number > ( 100 ) ;
43
- const [ useMicroPayments , setUseMicroPayments ] = useState < boolean > ( false ) ;
43
+ const [ useMicroPayments , setUseMicroPayments ] = useState < boolean > ( ) ;
44
44
const [ microPaymentProgress , setMicroPaymentProgress ] = useState < number > ( 0 ) ;
45
45
useEffect ( ( ) => {
46
46
NitroRpcClient . CreateHttpNitroClient ( url )
@@ -138,15 +138,6 @@ function App() {
138
138
return (
139
139
< Box >
140
140
< Box p = { 10 } minHeight = { 200 } >
141
- < Button
142
- id = "createChannel"
143
- onClick = { ( ) => {
144
- createPaymentChannel ( ) ;
145
- } }
146
- disabled = { paymentChannelId != "" }
147
- >
148
- Create Channel
149
- </ Button >
150
141
< ChannelDetails info = { paymentChannelInfo } />
151
142
</ Box >
152
143
< Box >
@@ -195,14 +186,21 @@ function App() {
195
186
type = "number"
196
187
> </ TextField >
197
188
</ Box >
198
-
189
+ < Button
190
+ id = "createChannel"
191
+ onClick = { ( ) => {
192
+ createPaymentChannel ( ) ;
193
+ } }
194
+ disabled = { paymentChannelId != "" }
195
+ >
196
+ Create Channel
197
+ </ Button >
199
198
< Button onClick = { fetchAndDownloadFile } disabled = { paymentChannelId == "" } >
200
199
{ useMicroPayments ? "Fetch with micropayments" : "Fetch" }
201
200
</ Button >
202
201
< Box visibility = { useMicroPayments ? "visible" : "hidden" } >
203
202
< LinearProgress value = { microPaymentProgress } variant = "determinate" />
204
203
</ Box >
205
-
206
204
< Box > { errorText } </ Box >
207
205
</ Box >
208
206
) ;
0 commit comments