@jup-ag/lend 0.1.3-beta.0 → 0.1.4-beta.0

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.
@@ -20,7 +20,14 @@ const getAccountOwner = async (account, connection) => {
20
20
  return info.owner;
21
21
  };
22
22
  const getOrCreateATAInstruction = async (owner, mint, connection) => {
23
- const associatedTokenAccount = await getAssociatedTokenAddress(mint, owner);
23
+ const tokenProgram = await getAccountOwner(mint, connection);
24
+ const associatedTokenAccount = await getAssociatedTokenAddress(
25
+ mint,
26
+ owner,
27
+ true,
28
+ // allowOwnerOffCurve - supports PDA owners
29
+ tokenProgram
30
+ );
24
31
  const account = await getAccount(connection, associatedTokenAccount).catch(
25
32
  () => null
26
33
  );
@@ -31,7 +38,8 @@ const getOrCreateATAInstruction = async (owner, mint, connection) => {
31
38
  owner,
32
39
  associatedTokenAccount,
33
40
  owner,
34
- mint
41
+ mint,
42
+ tokenProgram
35
43
  )
36
44
  );
37
45
  }
package/dist/index.mjs CHANGED
@@ -8,6 +8,6 @@ import './shared/lend.CioR9-te.mjs';
8
8
  import '@solana/spl-token';
9
9
  import 'bn.js';
10
10
 
11
- const version = "0.1.3-beta.0";
11
+ const version = "0.1.4-beta.0";
12
12
 
13
13
  export { version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jup-ag/lend",
3
- "version": "0.1.3-beta.0",
3
+ "version": "0.1.4-beta.0",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "type": "module",