@haven-fi/solauto-sdk 1.0.28 → 1.0.29
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +1 -0
- package/dist/utils/marginfiUtils.d.ts.map +1 -1
- package/dist/utils/marginfiUtils.js +1 -1
- package/package.json +1 -1
- package/src/types/index.ts +1 -0
- package/src/utils/marginfiUtils.ts +1 -3
package/dist/types/index.d.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC"}
|
package/dist/types/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"marginfiUtils.d.ts","sourceRoot":"","sources":["../../src/utils/marginfiUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAa,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAE1D,OAAO,EACL,IAAI,
|
1
|
+
{"version":3,"file":"marginfiUtils.d.ts","sourceRoot":"","sources":["../../src/utils/marginfiUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAa,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAE1D,OAAO,EACL,IAAI,EAKL,MAAM,iBAAiB,CAAC;AAUzB,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAsB,MAAM,cAAc,CAAC;AAEjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAG7D,wBAAgB,wBAAwB,CAAC,EACvC,IAAI,EACJ,IAAI,GACL,EAAE;IACD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,GAAG,qBAAqB,CAWxB;AAED,wBAAsB,wBAAwB,CAC5C,UAAU,EAAE,IAAI,EAChB,QAAQ,EAAE,IAAI,EACd,WAAW,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAkC3B;AAED,wBAAsB,iCAAiC,CACrD,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,SAAS,EACpB,qBAAqB,CAAC,EAAE,OAAO,GAC9B,OAAO,CACR;IAAE,eAAe,EAAE,SAAS,CAAC;IAAC,UAAU,CAAC,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,EAAE,SAAS,CAAA;CAAE,EAAE,CAC/E,CA6CA;AAoDD,wBAAsB,+BAA+B,CACnD,GAAG,EAAE,GAAG,EACR,iBAAiB,EAAE,SAAS,EAC5B,UAAU,CAAC,EAAE,SAAS,EACtB,QAAQ,CAAC,EAAE,SAAS,EACpB,mBAAmB,CAAC,EAAE,mBAAmB,GACxC,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC,CA4IpC;AA+DD,wBAAsB,sBAAsB,CAC1C,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,IAAI,GACT,OAAO,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CA0B3B"}
|
@@ -25,7 +25,7 @@ function findMarginfiBankAccounts({ mint, bank, }) {
|
|
25
25
|
}
|
26
26
|
exports.findMarginfiBankAccounts = findMarginfiBankAccounts;
|
27
27
|
async function getMaxLtvAndLiqThreshold(supplyBank, debtBank, supplyPrice) {
|
28
|
-
if (!
|
28
|
+
if (!supplyPrice) {
|
29
29
|
const [price] = await (0, generalUtils_1.getTokenPrices)([(0, umi_web3js_adapters_1.toWeb3JsPublicKey)(supplyBank.mint)]);
|
30
30
|
supplyPrice = price;
|
31
31
|
}
|
package/package.json
CHANGED
package/src/types/index.ts
CHANGED
@@ -5,8 +5,6 @@ import {
|
|
5
5
|
Bank,
|
6
6
|
getMarginfiAccountSize,
|
7
7
|
MARGINFI_PROGRAM_ID,
|
8
|
-
MarginfiAccount,
|
9
|
-
safeFetchAllMarginfiAccount,
|
10
8
|
safeFetchBank,
|
11
9
|
safeFetchMarginfiAccount,
|
12
10
|
} from "../marginfi-sdk";
|
@@ -49,7 +47,7 @@ export async function getMaxLtvAndLiqThreshold(
|
|
49
47
|
debtBank: Bank,
|
50
48
|
supplyPrice?: number
|
51
49
|
): Promise<[number, number]> {
|
52
|
-
if (!
|
50
|
+
if (!supplyPrice) {
|
53
51
|
const [price] = await getTokenPrices([toWeb3JsPublicKey(supplyBank.mint)]);
|
54
52
|
supplyPrice = price;
|
55
53
|
}
|