@raydium-io/raydium-sdk-v2 0.0.48-alpha → 0.0.49-alpha

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raydium-io/raydium-sdk-v2",
3
- "version": "0.0.48-alpha",
3
+ "version": "0.0.49-alpha",
4
4
  "description": "An SDK for building applications on top of Raydium.",
5
5
  "license": "GPL-3.0",
6
6
  "main": "./lib/index.js",
@@ -172,10 +172,21 @@ export default class Farm extends ModuleBase {
172
172
  });
173
173
  }
174
174
 
175
- const lockUserAccount = await this.scope.account.getCreatedTokenAccount({
176
- mint: poolInfo.lockInfo.lockMint,
177
- });
175
+ // const lockUserAccount = await this.scope.account.getCreatedTokenAccount({
176
+ // mint: poolInfo.lockInfo.lockMint,
177
+ // });
178
178
 
179
+ const { account: lockUserAccount, instructionParams } = await this.scope.account.getOrCreateTokenAccount({
180
+ mint: new PublicKey(poolInfo.lockInfo.lockMint),
181
+ owner: this.scope.ownerPubKey,
182
+ skipCloseAccount: false,
183
+ createInfo: {
184
+ payer: this.scope.ownerPubKey,
185
+ amount: 0,
186
+ },
187
+ associatedOnly: false,
188
+ });
189
+ instructionParams && txBuilder.addInstruction(instructionParams);
179
190
  if (!lockUserAccount)
180
191
  this.logAndCreateError("cannot found lock vault", "tokenAccounts", this.scope.account.tokenAccounts);
181
192