@haven-fi/solauto-sdk 1.0.43 → 1.0.44

Sign up to get free protection for your applications and to get access to all the features.
@@ -210,7 +210,7 @@ exports.getAllPositionsByAuthority = getAllPositionsByAuthority;
210
210
  async function positionStateWithLatestPrices(umi, state, protocolAccount, lendingPlatform) {
211
211
  if ((0, generalUtils_1.currentUnixSeconds)() - Number(state.lastUpdated) > 60 * 60 * 24 * 7) {
212
212
  if (lendingPlatform === generated_1.LendingPlatform.Marginfi) {
213
- return await (0, marginfiUtils_1.getMarginfiAccountPositionState)(umi, (0, umi_web3js_adapters_1.toWeb3JsPublicKey)(state.supply.mint), (0, umi_web3js_adapters_1.toWeb3JsPublicKey)(state.debt.mint), protocolAccount);
213
+ return await (0, marginfiUtils_1.getMarginfiAccountPositionState)(umi, protocolAccount, (0, umi_web3js_adapters_1.toWeb3JsPublicKey)(state.supply.mint), (0, umi_web3js_adapters_1.toWeb3JsPublicKey)(state.debt.mint));
214
214
  }
215
215
  else {
216
216
  throw new Error("Lending platorm not yet supported");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haven-fi/solauto-sdk",
3
- "version": "1.0.43",
3
+ "version": "1.0.44",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "description": "Typescript SDK for the Solauto program on the Solana blockchain",
@@ -326,9 +326,9 @@ export async function positionStateWithLatestPrices(
326
326
  if (lendingPlatform === LendingPlatform.Marginfi) {
327
327
  return await getMarginfiAccountPositionState(
328
328
  umi,
329
+ protocolAccount,
329
330
  toWeb3JsPublicKey(state.supply.mint),
330
331
  toWeb3JsPublicKey(state.debt.mint),
331
- protocolAccount
332
332
  );
333
333
  } else {
334
334
  throw new Error("Lending platorm not yet supported");