Skip to content

Commit

Permalink
fatcat: cancel unstake (#424)
Browse files Browse the repository at this point in the history
  • Loading branch information
yurushao authored Feb 19, 2025
1 parent 47a64c1 commit 4b3fbcb
Show file tree
Hide file tree
Showing 8 changed files with 298 additions and 196 deletions.
21 changes: 21 additions & 0 deletions anchor/src/client/jupiter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,27 @@ export class JupiterVoteClient {
return await this.base.sendAndConfirm(vTx);
}

public async cancelUnstake(statePda: PublicKey, txOptions: TxOptions = {}) {
const vault = this.base.getVaultPda(statePda);
const escrow = this.getEscrowPda(vault);

const tx = await this.base.program.methods
.toggleMaxLock(true)
.accounts({
state: statePda,
locker: JUP_STAKE_LOCKER,
escrow,
})
.transaction();

const vTx = await this.base.intoVersionedTransaction({
tx,
...txOptions,
});

return await this.base.sendAndConfirm(vTx);
}

/**
* Vote on a proposal. The vote account will be created if it doesn't exist.
*
Expand Down
4 changes: 2 additions & 2 deletions apps/fatcat/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ WORKDIR /mnt/workspace

COPY . ./
RUN npm install -g [email protected]
RUN pnpm install && pnpm install --filter @glamsystems/glam-sdk
RUN cd apps/fatcat && pnpm install && pnpm run build
RUN pnpm install && pnpm install --filter @glamsystems/glam-sdk && pnpm install --filter fatcat
RUN pnpm run fatcat-build

# Final stage (runtime image)
FROM node:20-slim AS runtime
Expand Down
2 changes: 1 addition & 1 deletion apps/fatcat/src/components/ExplorerLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export function ExplorerLink({
className?: string;
explorer?: string;
}) {
let href = "https://solscan.io/";
let href = `https://solscan.io/${path}`;
return (
<a
href={href}
Expand Down
Loading

0 comments on commit 4b3fbcb

Please sign in to comment.