@epicentral/sos-sdk 0.12.1-beta → 0.13.0-beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -252,9 +252,10 @@ export async function preflightUnwindWriterUnsold(
252
252
  const collateralPoolData = resolved.collateralPoolData;
253
253
 
254
254
  const underlyingMint = params.underlyingMint ?? resolved.underlyingMint;
255
- const [vaultPda] = await deriveVaultPda(underlyingMint, params.programId);
255
+ const collateralMint = collateralPoolData.collateralMint ?? underlyingMint;
256
+ const [vaultPda] = await deriveVaultPda(collateralMint, params.programId);
256
257
  const vaultPdaAddress = toAddress(vaultPda);
257
- const writerDefaultRepaymentAta = await deriveAssociatedTokenAddress(params.writer, underlyingMint);
258
+ const writerDefaultRepaymentAta = await deriveAssociatedTokenAddress(params.writer, collateralMint);
258
259
  // `writerRepaymentAccount` stays in the result for ABI compatibility with
259
260
  // existing callers (e.g. wallet-fallback UX from pre-convergence), but it
260
261
  // is not used on-chain anymore.