@drift-labs/sdk 2.0.0 → 2.0.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.
|
@@ -43,8 +43,8 @@ exports.MainnetSpotMarkets = [
|
|
|
43
43
|
oracle: web3_js_1.PublicKey.default,
|
|
44
44
|
oracleSource: __1.OracleSource.QUOTE_ASSET,
|
|
45
45
|
mint: new web3_js_1.PublicKey('EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v'),
|
|
46
|
-
precision: numericConstants_1.
|
|
47
|
-
precisionExp: numericConstants_1.
|
|
46
|
+
precision: numericConstants_1.QUOTE_PRECISION,
|
|
47
|
+
precisionExp: numericConstants_1.QUOTE_PRECISION_EXP,
|
|
48
48
|
},
|
|
49
49
|
{
|
|
50
50
|
symbol: 'SOL',
|
package/lib/driftClient.js
CHANGED
|
@@ -563,7 +563,7 @@ class DriftClient {
|
|
|
563
563
|
}
|
|
564
564
|
if (!spotPosition.openAsks.eq(numericConstants_1.ZERO) ||
|
|
565
565
|
!spotPosition.openBids.eq(numericConstants_1.ZERO)) {
|
|
566
|
-
spotMarketAccountMap.set(
|
|
566
|
+
spotMarketAccountMap.set(numericConstants_1.QUOTE_SPOT_MARKET_INDEX, {
|
|
567
567
|
pubkey: this.getQuoteSpotMarketAccount().pubkey,
|
|
568
568
|
isSigner: false,
|
|
569
569
|
isWritable: false,
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { PublicKey } from '@solana/web3.js';
|
|
2
2
|
import { BN, DriftEnv, OracleSource } from '../';
|
|
3
3
|
import {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
QUOTE_PRECISION,
|
|
5
|
+
QUOTE_PRECISION_EXP,
|
|
6
6
|
LAMPORTS_EXP,
|
|
7
7
|
LAMPORTS_PRECISION,
|
|
8
8
|
SIX,
|
|
@@ -62,8 +62,8 @@ export const MainnetSpotMarkets: SpotMarketConfig[] = [
|
|
|
62
62
|
oracle: PublicKey.default,
|
|
63
63
|
oracleSource: OracleSource.QUOTE_ASSET,
|
|
64
64
|
mint: new PublicKey('EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v'),
|
|
65
|
-
precision:
|
|
66
|
-
precisionExp:
|
|
65
|
+
precision: QUOTE_PRECISION,
|
|
66
|
+
precisionExp: QUOTE_PRECISION_EXP,
|
|
67
67
|
},
|
|
68
68
|
{
|
|
69
69
|
symbol: 'SOL',
|
package/src/driftClient.ts
CHANGED
|
@@ -867,7 +867,7 @@ export class DriftClient {
|
|
|
867
867
|
!spotPosition.openAsks.eq(ZERO) ||
|
|
868
868
|
!spotPosition.openBids.eq(ZERO)
|
|
869
869
|
) {
|
|
870
|
-
spotMarketAccountMap.set(
|
|
870
|
+
spotMarketAccountMap.set(QUOTE_SPOT_MARKET_INDEX, {
|
|
871
871
|
pubkey: this.getQuoteSpotMarketAccount().pubkey,
|
|
872
872
|
isSigner: false,
|
|
873
873
|
isWritable: false,
|