@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.
- package/generated/accounts/marketDataAccount.ts +13 -1
- package/generated/instructions/buyFromPool.ts +43 -15
- package/generated/instructions/closeLongToPool.ts +40 -12
- package/generated/instructions/index.ts +1 -0
- package/generated/instructions/initializeMarketData.ts +13 -0
- package/generated/instructions/liquidateWriterPosition.ts +39 -11
- package/generated/instructions/migrateMarketDataVolOracle.ts +248 -0
- package/generated/instructions/optionMint.ts +50 -22
- package/generated/instructions/updateImpliedVolatility.ts +19 -2
- package/generated/programs/optionProgram.ts +16 -0
- package/index.ts +6 -0
- package/long/builders.ts +78 -17
- package/oracle/volatility-quote.ts +65 -0
- package/package.json +7 -1
- package/shared/option-program-parser.ts +6 -0
- package/short/builders.ts +93 -0
- package/short/preflight.ts +3 -2
package/short/preflight.ts
CHANGED
|
@@ -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
|
|
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,
|
|
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.
|