diff --git a/anchor/src/client/marinade.ts b/anchor/src/client/marinade.ts index 2d57be3c..01f3e983 100644 --- a/anchor/src/client/marinade.ts +++ b/anchor/src/client/marinade.ts @@ -374,12 +374,12 @@ export class MarinadeClient { } public async liquidUnstakeTx( - fund: PublicKey, + statePda: PublicKey, amount: BN, txOptions: TxOptions, ): Promise { const signer = txOptions.signer || this.base.getSigner(); - const vault = this.base.getVaultPda(fund); + const vault = this.base.getVaultPda(statePda); const marinadeState = this.getMarinadeState(); const treasuryMsolAta = getAssociatedTokenAddressSync( marinadeState.msolMintAddress, @@ -390,7 +390,7 @@ export class MarinadeClient { const tx = await this.base.program.methods .marinadeLiquidUnstake(amount) .accountsPartial({ - state: fund, + state: statePda, vault, signer, marinadeState: marinadeState.marinadeStateAddress, diff --git a/anchor/tests/glam_policy_hook.spec.ts b/anchor/tests/glam_policy_hook.spec.ts index 23c99a0c..bf26ad43 100644 --- a/anchor/tests/glam_policy_hook.spec.ts +++ b/anchor/tests/glam_policy_hook.spec.ts @@ -61,14 +61,14 @@ describe("glam_policy_hook", () => { } as any; const statePda = glamClient.getStatePda(stateModel); - const sharePDA = glamClient.getShareClassPda(statePda, 0); + const sharePda = glamClient.getShareClassPda(statePda, 0); const connection = glamClient.provider.connection; const commitment = "confirmed"; // manager const managerSharesAta = getAssociatedTokenAddressSync( - sharePDA, + sharePda, wallet.publicKey, false, TOKEN_2022_PROGRAM_ID, @@ -77,7 +77,7 @@ describe("glam_policy_hook", () => { // alice const aliceSharesAta = getAssociatedTokenAddressSync( - sharePDA, + sharePda, alice.publicKey, false, TOKEN_2022_PROGRAM_ID, @@ -168,7 +168,7 @@ describe("glam_policy_hook", () => { const state = await glamClient.fetchState(statePda); expect(state.mints[0]?.lockUpPeriodInSeconds).toEqual(5); expect(state.mints[0]?.symbol).toEqual("GBS"); - expect(state.mints[0]?.permanentDelegate).toEqual(sharePDA); + expect(state.mints[0]?.permanentDelegate).toEqual(sharePda); } catch (e) { console.error(e); throw e; @@ -188,7 +188,7 @@ describe("glam_policy_hook", () => { const shares = await getMint( connection, - sharePDA, + sharePda, commitment, TOKEN_2022_PROGRAM_ID, ); @@ -218,13 +218,13 @@ describe("glam_policy_hook", () => { wallet.publicKey, aliceSharesAta, alice.publicKey, - sharePDA, + sharePda, TOKEN_2022_PROGRAM_ID, ), await createTransferCheckedWithTransferHookInstruction( connection, managerSharesAta, - sharePDA, + sharePda, aliceSharesAta, wallet.publicKey, amount, @@ -262,13 +262,13 @@ describe("glam_policy_hook", () => { wallet.publicKey, aliceSharesAta, alice.publicKey, - sharePDA, + sharePda, TOKEN_2022_PROGRAM_ID, ), await createTransferCheckedWithTransferHookInstruction( connection, managerSharesAta, - sharePDA, + sharePda, aliceSharesAta, wallet.publicKey, amount, diff --git a/playground/src/app/(playground)/playground/products/[product]/page.tsx b/playground/src/app/(playground)/playground/products/[product]/page.tsx index 5d3c7da9..11e8885d 100644 --- a/playground/src/app/(playground)/playground/products/[product]/page.tsx +++ b/playground/src/app/(playground)/playground/products/[product]/page.tsx @@ -19,10 +19,7 @@ import { useRouter, useParams } from "next/navigation"; import { useEffect, useMemo, useRef, useState } from "react"; import { PublicKey } from "@solana/web3.js"; import Sparkle from "@/utils/Sparkle"; -import SparkleColorMatcher, { - getColorInfo, - ColorInfo, -} from "@/utils/SparkleColorMatcher"; +import { getColorInfo, ColorInfo } from "@/utils/SparkleColorMatcher"; import TruncateAddress from "@/utils/TruncateAddress"; import PageContentWrapper from "@/components/PageContentWrapper"; import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; @@ -449,7 +446,6 @@ export default function ProductPage() { animate={{ opacity: 1 }} transition={{ ease: "easeInOut", duration: 0 }} > - {/**/} @@ -1012,20 +1008,24 @@ export default function ProductPage() { -
-
Share Class Accounts
-
-
-
- Share Class 1 {stateModel?.mints[0]?.symbol} -
- + {stateModel.shareClassMints.length > 0 && ( +
+
+ Share Class Accounts
-
-
+
+
+
+ Share Class 1 {stateModel?.mints[0]?.symbol} +
+ +
+
+ + )} diff --git a/playground/src/app/(shared)/settings/page.tsx b/playground/src/app/(shared)/settings/page.tsx index 1b616f5a..336e7d96 100644 --- a/playground/src/app/(shared)/settings/page.tsx +++ b/playground/src/app/(shared)/settings/page.tsx @@ -293,9 +293,13 @@ const SettingsPage: React.FC = () => { setCluster(clusterEndpoint); } toast({ - title: "Endpoint changed", - description: `Active endpoint set to ${selectedEndpoint.label}`, + title: "RPC endpoint changed", + description: `Active RPC endpoint set to ${selectedEndpoint.label}`, }); + // Reload the page to force refreshing account menu + window.setTimeout(() => { + window.location.reload(); + }, 1000); } }; diff --git a/playground/src/components/access/data-table.tsx b/playground/src/components/access/data-table.tsx index 98688a5a..d27518be 100644 --- a/playground/src/components/access/data-table.tsx +++ b/playground/src/components/access/data-table.tsx @@ -286,6 +286,9 @@ export function DataTable({ key={row.id} open={activeRow === row.original.pubkey} onOpenChange={(open) => { + if (row.original.label === "Owner") { + return; // Prevent modifying owner permissions + } if (open) { setActiveRow(row.original.pubkey); const currentPermissions = row.original.tags;