Skip to content

Commit

Permalink
fix: drift is now compatible with webpack
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelessiet committed Feb 6, 2025
1 parent ee2c29f commit 3d05391
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 33 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
"@bonfida/spl-name-service": "^3.0.7",
"@cks-systems/manifest-sdk": "0.1.59",
"@coral-xyz/anchor": "0.29",
"@drift-labs/sdk-browser": "2.109.0-beta.2",
"@drift-labs/vaults-sdk": "^0.3.2",
"@drift-labs/sdk": "2.109.0-beta.11",
"@drift-labs/vaults-sdk": "^0.3.29",
"@langchain/core": "^0.3.26",
"@langchain/groq": "^0.1.2",
"@langchain/langgraph": "^0.2.36",
Expand Down
41 changes: 19 additions & 22 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/actions/drift/availableMarkets.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { MainnetSpotMarkets } from "@drift-labs/sdk-browser";
import { MainnetSpotMarkets } from "@drift-labs/sdk";
import type { Action } from "../../types";
import { z } from "zod";
import {
Expand Down
3 changes: 1 addition & 2 deletions src/tools/drift/drift.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import {
QUOTE_PRECISION,
User,
type IWallet,
} from "@drift-labs/sdk-browser";
} from "@drift-labs/sdk";
import type { SolanaAgentKit } from "../../agent";
import * as anchor from "@coral-xyz/anchor";
import { IDL, VAULT_PROGRAM_ID, VaultClient } from "@drift-labs/vaults-sdk";
Expand Down Expand Up @@ -96,7 +96,6 @@ export async function initClients(
driftClient.provider,
);
const vaultClient = new VaultClient({
// @ts-expect-error - type mismatch due to different dep versions and types
driftClient,
// @ts-expect-error - type mismatch due to different dep versions
program: vaultProgram,
Expand Down
2 changes: 1 addition & 1 deletion src/tools/drift/drift_vault.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
PRICE_PRECISION,
QUOTE_PRECISION,
TEN,
} from "@drift-labs/sdk-browser";
} from "@drift-labs/sdk";
import {
WithdrawUnit,
decodeName,
Expand Down
6 changes: 1 addition & 5 deletions src/tools/drift/types.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
import type {
L2OrderBook,
MarketType,
OraclePriceData,
} from "@drift-labs/sdk-browser";
import type { L2OrderBook, MarketType, OraclePriceData } from "@drift-labs/sdk";

export type L2WithOracle = L2OrderBook & { oracleData: OraclePriceData };

Expand Down

0 comments on commit 3d05391

Please sign in to comment.