@lavarage/sdk 8.0.9 → 8.0.10
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/index.ts +1 -25
- package/package.json +1 -1
package/index.ts
CHANGED
|
@@ -45,7 +45,7 @@ import {
|
|
|
45
45
|
import { queuePubkey, USDC_MINT } from "./constants";
|
|
46
46
|
import { getOracleQuoteForCollateralType, getOracleQuoteForFeedId } from "./switchboard";
|
|
47
47
|
import { u8ArrayToString } from "./utils";
|
|
48
|
-
import { ApiKeys
|
|
48
|
+
import { ApiKeys } from "./crossbar";
|
|
49
49
|
|
|
50
50
|
export * from "./evm";
|
|
51
51
|
export * as lending from "./lending";
|
|
@@ -613,7 +613,6 @@ export const borrowV2 = async (
|
|
|
613
613
|
randomSeed: Keypair,
|
|
614
614
|
quoteToken: PublicKey,
|
|
615
615
|
tokenProgram: PublicKey,
|
|
616
|
-
apiKeys: ApiKeys,
|
|
617
616
|
partnerFeeRecipient?: PublicKey,
|
|
618
617
|
partnerFeeMarkup?: number,
|
|
619
618
|
computeBudgetMicroLamports?: number,
|
|
@@ -711,13 +710,6 @@ export const borrowV2 = async (
|
|
|
711
710
|
}
|
|
712
711
|
}
|
|
713
712
|
|
|
714
|
-
const updateOracleInstructions = await getUpdateOracleIxs(
|
|
715
|
-
// @ts-expect-error IDL mismatch
|
|
716
|
-
lavarageProgram,
|
|
717
|
-
u8ArrayToString(offer.account.feedId), lavarageProgram.provider.publicKey!,
|
|
718
|
-
apiKeys
|
|
719
|
-
);
|
|
720
|
-
|
|
721
713
|
const tradingOpenBorrowInstruction = useReferral
|
|
722
714
|
? await lavarageProgram.methods
|
|
723
715
|
.tradingOpenBorrow(
|
|
@@ -872,8 +864,6 @@ export const borrowV2 = async (
|
|
|
872
864
|
});
|
|
873
865
|
|
|
874
866
|
const allInstructions = [
|
|
875
|
-
// must be the first instruction in the transaction
|
|
876
|
-
...updateOracleInstructions,
|
|
877
867
|
fromTokenAccount.instruction!,
|
|
878
868
|
partnerFeeRecipientVaultCreateIx,
|
|
879
869
|
partnerFeeRecipientTokenAccountCreateIx,
|
|
@@ -1347,7 +1337,6 @@ export const openTradeV2 = async (
|
|
|
1347
1337
|
randomSeed: Keypair,
|
|
1348
1338
|
quoteToken: PublicKey,
|
|
1349
1339
|
tokenProgram: PublicKey,
|
|
1350
|
-
apiKeys: ApiKeys,
|
|
1351
1340
|
partnerFeeRecipient?: PublicKey,
|
|
1352
1341
|
partnerFeeMarkup?: number,
|
|
1353
1342
|
computeBudgetMicroLamports?: number,
|
|
@@ -1550,15 +1539,6 @@ export const openTradeV2 = async (
|
|
|
1550
1539
|
}
|
|
1551
1540
|
}
|
|
1552
1541
|
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
const updateOracleInstructions = await getUpdateOracleIxs(
|
|
1556
|
-
// @ts-expect-error IDL mismatch
|
|
1557
|
-
program,
|
|
1558
|
-
u8ArrayToString(offer.account.feedId), program.provider.publicKey!,
|
|
1559
|
-
apiKeys
|
|
1560
|
-
);
|
|
1561
|
-
|
|
1562
1542
|
const tradingOpenBorrowInstruction = useReferral
|
|
1563
1543
|
? await program.methods
|
|
1564
1544
|
.tradingOpenBorrow(
|
|
@@ -1716,8 +1696,6 @@ export const openTradeV2 = async (
|
|
|
1716
1696
|
const setUpInstructions = [
|
|
1717
1697
|
// fromTokenAccount.instruction!,
|
|
1718
1698
|
// toTokenAccount.instruction!,
|
|
1719
|
-
// must be the first instruction in the transaction
|
|
1720
|
-
...updateOracleInstructions,
|
|
1721
1699
|
partnerFeeRecipientVaultCreateIx,
|
|
1722
1700
|
partnerFeeRecipientTokenAccountCreateIx,
|
|
1723
1701
|
...setupInstructions.map(deserializeInstruction),
|
|
@@ -1752,8 +1730,6 @@ export const openTradeV2 = async (
|
|
|
1752
1730
|
const allInstructions = [
|
|
1753
1731
|
// fromTokenAccount.instruction!,
|
|
1754
1732
|
// toTokenAccount.instruction!,
|
|
1755
|
-
// must be the first instruction in the transaction
|
|
1756
|
-
...updateOracleInstructions,
|
|
1757
1733
|
partnerFeeRecipientVaultCreateIx,
|
|
1758
1734
|
partnerFeeRecipientTokenAccountCreateIx,
|
|
1759
1735
|
tradingOpenBorrowInstruction!,
|