@lavarage/sdk 7.4.0 → 7.4.2

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/index.d.mts CHANGED
@@ -3116,6 +3116,7 @@ interface BuyEvent {
3116
3116
  initialMargin: bigint;
3117
3117
  transactionHash: string;
3118
3118
  timestamp: number;
3119
+ interestRate: number;
3119
3120
  }
3120
3121
  interface SellEvent {
3121
3122
  trader: string;
package/dist/index.d.ts CHANGED
@@ -3116,6 +3116,7 @@ interface BuyEvent {
3116
3116
  initialMargin: bigint;
3117
3117
  transactionHash: string;
3118
3118
  timestamp: number;
3119
+ interestRate: number;
3119
3120
  }
3120
3121
  interface SellEvent {
3121
3122
  trader: string;
package/dist/index.js CHANGED
@@ -867,7 +867,8 @@ function getPositionsEvm(provider, tokenHolderContractAddress) {
867
867
  initialMargin: loan.userPaid,
868
868
  transactionHash: "",
869
869
  // Not available from loan data
870
- timestamp: Number(loan.timestamp)
870
+ timestamp: Number(loan.timestamp),
871
+ interestRate: loan.collateral.interestRate
871
872
  });
872
873
  }
873
874
  }
@@ -5467,8 +5468,8 @@ var closeTradeV1 = (lavarageProgram, position, offer, jupInstruction, partnerFee
5467
5468
  jupiterIxs = [
5468
5469
  ...setupInstructions.map(deserializeInstruction),
5469
5470
  deserializeInstruction(swapInstructionPayload),
5470
- deserializeInstruction(cleanupInstruction)
5471
- ];
5471
+ cleanupInstruction ? deserializeInstruction(cleanupInstruction) : null
5472
+ ].filter((i) => !!i);
5472
5473
  addressLookupTableAccounts.push(
5473
5474
  ...yield getAddressLookupTableAccounts([
5474
5475
  "5LEAB3owNUSKvECm7vkr58tDtQpzbngQ2NYpc7qmRFdi",