Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/solana-sweep.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
setTransactionMessageLifetimeUsingBlockhash,
appendTransactionMessageInstructions,
signTransactionMessageWithSigners,
addSignersToTransactionMessage,
getSignatureFromTransaction,
sendAndConfirmTransactionFactory,
getProgramDerivedAddress,
Expand Down Expand Up @@ -245,7 +246,13 @@ export async function sweepSolanaWallet(
(msg) => appendTransactionMessageInstructions([createAtaIx, ...transferIxs], msg),
);

const signedTx = await signTransactionMessageWithSigners(txMessage);
// Attach both signers so signTransactionMessageWithSigners can find them
const txMessageWithSigners = addSignersToTransactionMessage(
[newSigner, oldSigner],
txMessage,
);

const signedTx = await signTransactionMessageWithSigners(txMessageWithSigners);
Comment on lines +249 to +255
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

CI warning: format this file with Prettier.

The pipeline reports formatting drift in this file. Please run npx prettier --write src/solana-sweep.ts to clear CI.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/solana-sweep.ts` around lines 249 - 255, The file fails CI due to
Prettier formatting; run the formatter and commit the changes (e.g., run npx
prettier --write) to normalize spacing/line breaks around the
addSignersToTransactionMessage and signTransactionMessageWithSigners call site;
after formatting, verify the txMessageWithSigners variable and adjacent comments
remain unchanged and then stage and push the formatted file to clear the CI
warning.

const txSignature = getSignatureFromTransaction(signedTx);

// Send transaction and poll for confirmation
Expand Down
Loading