@@ -56,6 +56,7 @@ export default function SettingsView() {
56
56
const [ blockTimeDelta , setBlockTimeDelta ] = useState ( 0 ) ;
57
57
const [ keyCacheFilePath , setKeyCacheFilePath ] = useState ( "" ) ;
58
58
const [ addrRandomize , setAddrRandomize ] = useState ( false ) ;
59
+ const [ passthrough , setPassthrough ] = useState ( true ) ;
59
60
60
61
useEffect ( ( ) => {
61
62
getMferNodeArgs ( ) . then ( ( args ) => {
@@ -93,6 +94,11 @@ export default function SettingsView() {
93
94
setAddrRandomize ( result . result ) ;
94
95
} ) ;
95
96
97
+ docall ( "mfer_passthroughEnabled" , [ ] )
98
+ . then ( ( res ) => res . json ( ) )
99
+ . then ( ( result ) => {
100
+ setPassthrough ( result . result ) ;
101
+ } ) ;
96
102
} , [ ] ) ;
97
103
98
104
const saveRPCSettings = useCallback ( ( ) => {
@@ -151,6 +157,11 @@ export default function SettingsView() {
151
157
setAddrRandomize ( e . target . checked ) ;
152
158
} ;
153
159
160
+ const setPassthroughFunc = ( e ) => {
161
+ docall ( "mfer_togglePassthrough" , [ e . target . checked ] ) ;
162
+ setPassthrough ( e . target . checked ) ;
163
+ } ;
164
+
154
165
return (
155
166
< Box
156
167
component = "div"
@@ -171,7 +182,12 @@ export default function SettingsView() {
171
182
padding = { 2 }
172
183
width = "520px"
173
184
>
174
- < FormGroup >
185
+ < FormGroup row >
186
+ < FormControlLabel control = {
187
+ < Checkbox
188
+ checked = { passthrough }
189
+ onChange = { setPassthroughFunc }
190
+ /> } label = "Passthrough" />
175
191
< FormControlLabel control = {
176
192
< Checkbox
177
193
checked = { addrRandomize }
0 commit comments