@drift-labs/sdk 2.35.1-beta.4 → 2.35.1-beta.5
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/VERSION +1 -1
- package/lib/driftClient.js +3 -2
- package/package.json +1 -1
- package/src/driftClient.ts +3 -2
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.35.1-beta.
|
|
1
|
+
2.35.1-beta.5
|
package/lib/driftClient.js
CHANGED
|
@@ -3086,8 +3086,9 @@ class DriftClient {
|
|
|
3086
3086
|
* @param name
|
|
3087
3087
|
*/
|
|
3088
3088
|
getMarketIndexAndType(name) {
|
|
3089
|
+
name = name.toUpperCase();
|
|
3089
3090
|
for (const perpMarketAccount of this.getPerpMarketAccounts()) {
|
|
3090
|
-
if ((0, userName_1.decodeName)(perpMarketAccount.name) === name) {
|
|
3091
|
+
if ((0, userName_1.decodeName)(perpMarketAccount.name).toUpperCase() === name) {
|
|
3091
3092
|
return {
|
|
3092
3093
|
marketIndex: perpMarketAccount.marketIndex,
|
|
3093
3094
|
marketType: types_1.MarketType.PERP,
|
|
@@ -3095,7 +3096,7 @@ class DriftClient {
|
|
|
3095
3096
|
}
|
|
3096
3097
|
}
|
|
3097
3098
|
for (const spotMarketAccount of this.getSpotMarketAccounts()) {
|
|
3098
|
-
if ((0, userName_1.decodeName)(spotMarketAccount.name) === name) {
|
|
3099
|
+
if ((0, userName_1.decodeName)(spotMarketAccount.name).toUpperCase() === name) {
|
|
3099
3100
|
return {
|
|
3100
3101
|
marketIndex: spotMarketAccount.marketIndex,
|
|
3101
3102
|
marketType: types_1.MarketType.SPOT,
|
package/package.json
CHANGED
package/src/driftClient.ts
CHANGED
|
@@ -5566,8 +5566,9 @@ export class DriftClient {
|
|
|
5566
5566
|
getMarketIndexAndType(
|
|
5567
5567
|
name: string
|
|
5568
5568
|
): { marketIndex: number; marketType: MarketType } | undefined {
|
|
5569
|
+
name = name.toUpperCase();
|
|
5569
5570
|
for (const perpMarketAccount of this.getPerpMarketAccounts()) {
|
|
5570
|
-
if (decodeName(perpMarketAccount.name) === name) {
|
|
5571
|
+
if (decodeName(perpMarketAccount.name).toUpperCase() === name) {
|
|
5571
5572
|
return {
|
|
5572
5573
|
marketIndex: perpMarketAccount.marketIndex,
|
|
5573
5574
|
marketType: MarketType.PERP,
|
|
@@ -5576,7 +5577,7 @@ export class DriftClient {
|
|
|
5576
5577
|
}
|
|
5577
5578
|
|
|
5578
5579
|
for (const spotMarketAccount of this.getSpotMarketAccounts()) {
|
|
5579
|
-
if (decodeName(spotMarketAccount.name) === name) {
|
|
5580
|
+
if (decodeName(spotMarketAccount.name).toUpperCase() === name) {
|
|
5580
5581
|
return {
|
|
5581
5582
|
marketIndex: spotMarketAccount.marketIndex,
|
|
5582
5583
|
marketType: MarketType.SPOT,
|