@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.
- package/dist/earn/index.mjs +10 -2
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/earn/index.mjs
CHANGED
|
@@ -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
|
|
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