Skip to content

Commit 25835ad

Browse files
committed
refactor: revert placeholder implementation in generateInstructions
1 parent cf2e857 commit 25835ad

File tree

1 file changed

+7
-28
lines changed

1 file changed

+7
-28
lines changed

governance/xc_admin/packages/xc_admin_common/src/programs/lazer/lazer_functions.ts

Lines changed: 7 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -320,34 +320,13 @@ export async function generateInstructions(
320320
cluster: PythCluster,
321321
accounts: LazerInstructionAccounts,
322322
): Promise<TransactionInstruction[]> {
323-
// This is a placeholder implementation that would be replaced with real logic
324-
// In a real implementation, we would:
325-
// 1. Group changes by type (shard metadata, feeds, publishers)
326-
// 2. Generate appropriate instructions for each change type
327-
// 3. If needed, convert to/from Protobuf format
323+
// Simple placeholder implementation that returns an empty array of instructions
324+
// In a real implementation, this would transform the changes into Lazer-specific instructions
328325

329-
// For the demo, just log the changes and return an empty array
330-
console.log("Changes to apply:", changes);
331-
console.log("Target cluster:", cluster);
332-
console.log("Instruction accounts:", accounts);
326+
// Example of how this might be implemented:
327+
// 1. For each change, determine if it's an add, update, or delete operation
328+
// 2. Map the DownloadableProduct format to Lazer-specific data structure
329+
// 3. Generate appropriate Lazer instructions based on the operation type
333330

334-
// Mock instruction to show in UI
335-
const mockInstruction = new TransactionInstruction({
336-
keys: [
337-
{
338-
pubkey: accounts.fundingAccount,
339-
isSigner: true,
340-
isWritable: true,
341-
},
342-
{
343-
pubkey: LAZER_PROGRAM_ID,
344-
isSigner: false,
345-
isWritable: false,
346-
},
347-
],
348-
programId: LAZER_PROGRAM_ID,
349-
data: Buffer.from("Lazer update instruction placeholder"),
350-
});
351-
352-
return [mockInstruction];
331+
return [];
353332
}

0 commit comments

Comments
 (0)