Skip to content

Commit

Permalink
refresh after wrap/unwrap
Browse files Browse the repository at this point in the history
  • Loading branch information
yurushao committed Jan 17, 2025
1 parent bdc630e commit e8245e8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion playground/src/app/(vault)/vault/wrap/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const wrapSchema = z.object({
type WrapSchema = z.infer<typeof wrapSchema>;

export default function Wrap() {
const { activeGlamState, vault, userWallet, glamClient } = useGlam();
const { activeGlamState, vault, userWallet, glamClient, refresh } = useGlam();

const [amountAsset, setAmountAsset] = useState<string>("SOL");
const [direction, setDirection] = useState<string>("wrap");
Expand Down Expand Up @@ -112,6 +112,8 @@ export default function Wrap() {
});
}
setIsTxPending(false);

await refresh(); // refresh vault
};

const handleClear = (event: React.MouseEvent<HTMLButtonElement>) => {
Expand Down

0 comments on commit e8245e8

Please sign in to comment.