Skip to content
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

feat: locked balance #66

Merged
merged 1 commit into from
Sep 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/components/AccountSelector/AccountSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,21 +74,23 @@

useEffect(()=>{
if(setOpen)setOpen(isOpen);
},[isOpen])

Check warning on line 77 in src/components/AccountSelector/AccountSelector.tsx

View workflow job for this annotation

GitHub Actions / lint

React Hook useEffect has a missing dependency: 'setOpen'. Either include it or remove the dependency array. If 'setOpen' changes too often, find the parent component that defines it and wrap that definition in useCallback

useEffect(()=>{
if(open!=isOpen)setIsOpen(open);

Check failure on line 80 in src/components/AccountSelector/AccountSelector.tsx

View workflow job for this annotation

GitHub Actions / lint

Expected '!==' and instead saw '!='
},[open])

Check warning on line 81 in src/components/AccountSelector/AccountSelector.tsx

View workflow job for this annotation

GitHub Actions / lint

React Hook useEffect has a missing dependency: 'isOpen'. Either include it or remove the dependency array

useEffect(() => {
const allAccounts: Account[] = accounts.map((acc) => {
const { name, address, evmAddress, source, isEvmClaimed } = acc;
const { name, address, evmAddress, source, isEvmClaimed,lockedBalance,freeBalance } = (acc as any);
return {
name,
address,
evmAddress,
source,
isEvmClaimed,
lockedBalance,
freeBalance
} as Account;
});
setAllAccounts(allAccounts);
Expand Down
Loading