Skip to content

Commit dd23f34

Browse files
committed
debug: deployment version is not showing raw info
1 parent 8991045 commit dd23f34

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

quick-starts/react-quick-start/src/App.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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");

quick-starts/react-quick-start/src/components/getBalance.tsx

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff 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
);

0 commit comments

Comments
 (0)