wasabi-solana-ts 1.2.2 → 1.2.3

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.
@@ -552,9 +552,9 @@ async function handleCloseTokenAccounts(config, poolAccount) {
552
552
  ]);
553
553
  const currencyInfo = minInfos.get(poolAccount.currency);
554
554
  const collateralInfo = minInfos.get(poolAccount.collateral);
555
+ const payoutMint = poolAccount.isLongPool ? poolAccount.currency : poolAccount.collateral;
555
556
  const payoutMintInfo = poolAccount.isLongPool ? currencyInfo : collateralInfo;
556
- const payoutMint = payoutMintInfo[0];
557
- const payoutTokenProgram = payoutMintInfo[1].owner;
557
+ const payoutTokenProgram = payoutMintInfo.owner;
558
558
  const payoutIsSol = payoutMint.equals(spl_token_1.NATIVE_MINT);
559
559
  const ownerPayoutAta = (0, spl_token_1.getAssociatedTokenAddressSync)(payoutMint, config.owner, false, payoutTokenProgram);
560
560
  const ownerPayoutAtaInfo = await config.program.provider.connection.getAccountInfo(ownerPayoutAta);
@@ -572,8 +572,8 @@ async function handleCloseTokenAccounts(config, poolAccount) {
572
572
  ownerPayoutAta,
573
573
  setupIx,
574
574
  cleanupIx,
575
- currencyTokenProgram: currencyInfo[1].owner,
576
- collateralTokenProgram: collateralInfo[1].owner
575
+ currencyTokenProgram: currencyInfo.owner,
576
+ collateralTokenProgram: collateralInfo.owner
577
577
  };
578
578
  }
579
579
  function validateArgs(args) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wasabi-solana-ts",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
4
4
  "description": "Typescript library for the Wasabi program",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",