Skip to content

Commit

Permalink
Update Profile.js
Browse files Browse the repository at this point in the history
  • Loading branch information
IAmKio committed Mar 16, 2024
1 parent 334ab3f commit 97101d9
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions frontend/src/components/Profile/Profile.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {
useEtherspotBalances,
useEtherspotUtils,
useWalletAddress,
} from "@etherspot/transaction-kit";
Expand All @@ -20,7 +19,7 @@ import { useGetJarsQuery, useUpdateJarsMutation } from "../../services/api";

export default function Profile() {
const etherspotUtils = useEtherspotUtils();
const balances = useEtherspotBalances(+process.env.REACT_APP_CHAIN_ID);
// const balances = useEtherspotBalances(+process.env.REACT_APP_CHAIN_ID);
const [fetchedBalance, setFetchedBalance] = useState(0);
const { data: jarsData, isLoading, isFetching } = useGetJarsQuery();
const [triggerSave, saveResult] = useUpdateJarsMutation();
Expand All @@ -31,13 +30,13 @@ export default function Profile() {
);
const [saving, setSaving] = React.useState(false);

const fetchedBalancesAction = async () => {
const fetchedBalances = await balances.getAccountBalances(
undefined,
+process.env.REACT_APP_CHAIN_ID
);
setFetchedBalance(fetchedBalances);
};
// const fetchedBalancesAction = async () => {
// const fetchedBalances = await balances.getAccountBalances(
// undefined,
// +process.env.REACT_APP_CHAIN_ID
// );
// setFetchedBalance(fetchedBalances);
// };
const baseAccountBalance = async (address) => {
const balance = await fetchAccountBalance(address);
setFetchedBalance(balance);
Expand Down

0 comments on commit 97101d9

Please sign in to comment.