Skip to content

Commit

Permalink
added updating pools after creating
Browse files Browse the repository at this point in the history
  • Loading branch information
“arvitaly” committed Jun 30, 2023
1 parent bfbf17e commit 31fe7e9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/Pools/AllPools.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {
useEffect,
useState,
} from "react";
import styles from "./Pools.module.css";
Expand Down Expand Up @@ -40,6 +41,9 @@ const AllPools = ({
const toggleModal = () => {
setModal(!modal);
};
useEffect(() => {
setPage(1);
}, [filter]);

const onPoolDeposit = (pool: AppStatePool) => {
setPoolForDeposit(pool);
Expand Down
3 changes: 3 additions & 0 deletions src/components/Pools/Pools.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,9 @@ const Pools = () => {
token2,
token2Amount,
);
toast.success("Liquidity was added");
await updateData(queries, walletContext.account.bech32Address);

setIsDepositOpen(false);
setIsNewPoolOpen(false);
setToken1(null);
Expand Down

0 comments on commit 31fe7e9

Please sign in to comment.