Skip to content

Commit

Permalink
fix(pool): voucher removal
Browse files Browse the repository at this point in the history
  • Loading branch information
williamluke4 committed Aug 15, 2024
1 parent bc6182d commit fdefd2e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/components/pools/contract-functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,9 @@ export const addPoolVoucher = async (

export const removePoolVoucher = async (
voucherAddress: `0x${string}`,
tokenIndexAddress: `0x${string}`
swapPoolAddress: `0x${string}`
) => {
const tokenIndexAddress = await getSwapPoolTokenIndex(swapPoolAddress);
const contract = { address: tokenIndexAddress, abi: tokenIndexABI };
const tx = await writeContract(config, {
...contract,
Expand Down
4 changes: 0 additions & 4 deletions src/components/pools/forms/pool-voucher-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,6 @@ export function PoolVoucherForm({
});

toast.success("Removed voucher from pool", { id, duration: undefined });
await queryClient.invalidateQueries({
queryKey: ["swapPool"],
refetchType: "all",
});
onSuccess();
} catch (error) {
toast.error("Error removing voucher from pool", { id, duration: 4000 });
Expand Down
2 changes: 1 addition & 1 deletion src/components/pools/hooks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export const useRemovePoolVoucher = () => {
void queryClient.invalidateQueries({
queryKey: ["swapPool", variables.swapPoolAddress, accountAddress],
});
}, 5000);
}, 10000);
},
mutationFn: async ({
swapPoolAddress,
Expand Down

0 comments on commit fdefd2e

Please sign in to comment.