Conversation
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (14)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
There are now two names for the same shape: export interface TransferToAccountOptions extends InterfaceOptions {
wrap?: boolean;
programId?: PublicKey;
}
export type TransferOptions = TransferToAccountOptions;
Could we just drop
No public API change, one fewer type. |
|
Dead code: if (batches.length === 0) return [[ensureRecipientAtaIx]];
|
|
Redundant pre-conversion in const amountBigInt = BigInt(amount.toString()); // line 63The underlying builder ( |
|
Duplicate send loop and source validation in
Send loop (lines 82–93 and 142–153): const additionalSigners = dedupeSigner(payer, [owner]);
const { rest: loads, last: transferIxs } = sliceLast(batches);
await Promise.all(loads.map(async ixs => {
const { blockhash } = await rpc.getLatestBlockhash();
const tx = buildAndSignTx(ixs, payer, blockhash, additionalSigners);
return sendAndConfirmTx(rpc, tx, confirmOptions);
}));
const { blockhash } = await rpc.getLatestBlockhash();
const tx = buildAndSignTx(transferIxs, payer, blockhash, additionalSigners);
return sendAndConfirmTx(rpc, tx, confirmOptions);Source validation (lines 50–61 and 112–123): const effectiveOwner = options?.owner ?? owner.publicKey;
const expectedSource = getAssociatedTokenAddressInterface(mint, effectiveOwner, false, programId);
if (!source.equals(expectedSource)) {
throw new Error(`Source mismatch. Expected ${expectedSource.toBase58()}, got ${source.toBase58()}`);
}Both could be extracted into private helpers, e.g. |
Update transferDelegatedInterface and createTransferDelegatedInterfaceInstructions to accept a recipient wallet address instead of an explicit destination token account, matching the transferInterface convention from PR #2354. ATA derivation and idempotent creation now happen internally for all programId variants (light-token, SPL, Token-2022).
Update transferDelegatedInterface and createTransferDelegatedInterfaceInstructions to accept a recipient wallet address instead of an explicit destination token account, matching the transferInterface convention from PR #2354. ATA derivation and idempotent creation now happen internally for all programId variants (light-token, SPL, Token-2022).
No description provided.