-
Notifications
You must be signed in to change notification settings - Fork 138
test #1189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test #1189
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -5,7 +5,9 @@ import { useEffect, useState } from "react"; | |||||||||
| import { ERC20Contract, CurrencyType } from "../utils/constants"; | ||||||||||
| import { fromUint256 } from "../utils/feltService"; | ||||||||||
|
|
||||||||||
| export default function useBalances(address?: string) { | ||||||||||
| export default function useBalances(addressss?: string) { | ||||||||||
| const address = | ||||||||||
| "0x008476cB2C9A4935fd9b587983F89124B182e5fb78a3795Fc1A6fDe735d856cf"; | ||||||||||
|
Comment on lines
+8
to
+10
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Critical: Hardcoded address breaks hook functionality. The function parameter was renamed to This change completely defeats the purpose of the Apply this diff to fix the issue: -export default function useBalances(addressss?: string) {
- const address =
- "0x008476cB2C9A4935fd9b587983F89124B182e5fb78a3795Fc1A6fDe735d856cf";
+export default function useBalances(address?: string) {📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||
| const [balances, setBalances] = useState<TokenBalance>({}); | ||||||||||
| const [callData, setCallData] = useState<Call[]>([]); | ||||||||||
| const { contract: multicallContract } = useMulticallContract(); | ||||||||||
|
|
@@ -18,6 +20,10 @@ export default function useBalances(address?: string) { | |||||||||
| blockIdentifier: BlockTag.PENDING, | ||||||||||
| }); | ||||||||||
|
|
||||||||||
| console.log("erc20BalanceData", erc20BalanceData, erc20BalanceError); | ||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove debug console.log before merging. Debug logging statements should be removed before merging to production to avoid console clutter and potential performance impacts. Apply this diff: - console.log("erc20BalanceData", erc20BalanceData, erc20BalanceError);
-📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||
|
|
||||||||||
| console.log("balances", balances); | ||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove debug console.log before merging. This debug logging statement should also be removed before merging to production. Apply this diff: - console.log("balances", balances);
-📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||
|
|
||||||||||
| useEffect(() => { | ||||||||||
| const balancesCallData = () => { | ||||||||||
| const currencies = Object.values(ERC20Contract); | ||||||||||
|
|
||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove debug console.log before merging.
This debug logging statement should be removed before merging to production. Console logs in production code can clutter browser consoles, impact performance slightly, and may expose unnecessary implementation details.
Apply this diff to remove the debug log:
📝 Committable suggestion
🤖 Prompt for AI Agents