Skip to content

Commit

Permalink
Fix minor bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
ChewingGlass committed Sep 10, 2024
1 parent 5cfcfd5 commit 32f3a6e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/components/AssignProxyModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ export const AssignProxyModal: React.FC<
Math.min(expirationTime, maxDate.valueOf() / 1000)
),
});
setSelectedPositions(new Set([]));
setOpen(false);
}
} catch (e: any) {
Expand Down
8 changes: 8 additions & 0 deletions src/components/RevokeProxyModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ export const RevokeProxyModal: React.FC<
),
[positions, wallet]
);
React.useEffect(() => {
console.log("proxiedPositions", proxiedPositions?.map(p => ({
pubkey: p.pubkey.toBase58(),
proxy: p.proxy
})));
}, [proxiedPositions]);

const handleOnSubmit = async () => {
try {
Expand All @@ -52,8 +58,10 @@ export const RevokeProxyModal: React.FC<
}

setOpen(false);
setSelectedPositions(new Set([]));
} catch (e: any) {
setIsSubmitting(false);
console.error(e)
toast(e.message || "Unable to Revoke proxy");
}
};
Expand Down

0 comments on commit 32f3a6e

Please sign in to comment.