File tree Expand file tree Collapse file tree 2 files changed +19
-3
lines changed
quick-starts/react-quick-start/src Expand file tree Collapse file tree 2 files changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ function App() {
2424 } = useWeb3AuthDisconnect ( ) ;
2525 const { userInfo } = useWeb3AuthUser ( ) ;
2626 const { address } = useAccount ( ) ;
27+ console . log ( "address: " , address ) ;
2728
2829 function uiConsole ( ...args : any [ ] ) : void {
2930 const el = document . querySelector ( "#console>p" ) ;
Original file line number Diff line number Diff line change @@ -28,9 +28,24 @@ export function Balance() {
2828 < div >
2929 < h2 > Balance</ h2 >
3030 < div >
31- { data ?. value !== undefined &&
32- `${ formatUnits ( data . value , networkDecimals ) } ${ data . symbol } ` } { " " }
33- { isLoading && "Loading..." } { error && "Error: " + error . message }
31+ { ( ( ) => {
32+ if ( data ?. value !== undefined ) {
33+ const formatted = `${ formatUnits ( data . value , networkDecimals ) } ${
34+ data . symbol
35+ } `;
36+ console . log ( "Balance data:" , data . value ) ;
37+ return formatted ;
38+ }
39+ if ( isLoading ) {
40+ console . log ( "Balance loading..." ) ;
41+ return "Loading..." ;
42+ }
43+ if ( error ) {
44+ console . log ( "Balance error:" , error ) ;
45+ return "Error: " + error . message ;
46+ }
47+ return null ;
48+ } ) ( ) }
3449 </ div >
3550 </ div >
3651 ) ;
You can’t perform that action at this time.
0 commit comments