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.
- package/dist/utils/utils.js +4 -4
- package/package.json +1 -1
package/dist/utils/utils.js
CHANGED
|
@@ -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
|
|
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
|
|
576
|
-
collateralTokenProgram: collateralInfo
|
|
575
|
+
currencyTokenProgram: currencyInfo.owner,
|
|
576
|
+
collateralTokenProgram: collateralInfo.owner
|
|
577
577
|
};
|
|
578
578
|
}
|
|
579
579
|
function validateArgs(args) {
|