Skip to content

Commit

Permalink
fix pool create balance2 not loading
Browse files Browse the repository at this point in the history
  • Loading branch information
temptemp3 committed Oct 20, 2024
1 parent adf1a7c commit 1eebf3b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/components/PoolCreate/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -748,10 +748,11 @@ const Swap = () => {
}
}, []);
useEffect(() => {
if(!activeAccount) return;
if (paramTokBId && !isNaN(Number(paramTokBId))) {
if (paramTokBId === "0") {
setToken2({
tokenId: "0",
tokenId: 0,
name: "Voi",
symbol: "VOI",
decimals: 6,
Expand All @@ -762,7 +763,7 @@ const Swap = () => {
getToken(tokenId).then(setToken2);
}
}
}, []);
}, [activeAccount, paramTokBId])

// EFFECT
useEffect(() => {
Expand Down Expand Up @@ -851,7 +852,7 @@ const Swap = () => {
}
}, [tokens2, token, activeAccount]);

// EFFECT
// EFFECT set balance2
useEffect(() => {
if (!token2 || !activeAccount || !tokens2) return;
const { algodClient, indexerClient } = getAlgorandClients();
Expand Down

0 comments on commit 1eebf3b

Please sign in to comment.