Skip to content

Commit

Permalink
fix: export
Browse files Browse the repository at this point in the history
  • Loading branch information
bangjelkoski committed Jun 8, 2022
1 parent 51430c7 commit bc5a0da
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 7 deletions.
2 changes: 1 addition & 1 deletion deprecated/ui-common/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@injectivelabs/ui-common",
"description": "Reusable Vue Components, Vuex Store Modules, Composables, and more",
"version": "0.5.66",
"version": "0.5.67",
"license": "MIT",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
2 changes: 2 additions & 0 deletions deprecated/ui-common/src/services/derivative/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ export enum DerivativeMarketMap {
STOP_SELL = 4,
TAKE_BUY = 5,
TAKE_SELL = 6,
BUY_PO = 7,
SELL_PO = 8,
}

export {
Expand Down
11 changes: 6 additions & 5 deletions deprecated/ui-common/src/services/derivative/utils.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import {
UiDerivativeMarketSummary,
DerivativeMarketMap,
DerivativeOrderSide,
} from './types'
import { UiDerivativeMarketSummary, DerivativeMarketMap } from './types'
import { Change } from '../../types'
import { DerivativeOrderSide } from './../../types'

export const derivativeOrderTypeToGrpcOrderType = (
orderType: DerivativeOrderSide,
Expand All @@ -23,6 +20,10 @@ export const derivativeOrderTypeToGrpcOrderType = (
return DerivativeMarketMap.TAKE_BUY
case DerivativeOrderSide.TakeSell:
return DerivativeMarketMap.TAKE_SELL
case DerivativeOrderSide.BuyPO:
return DerivativeMarketMap.BUY_PO
case DerivativeOrderSide.SellPO:
return DerivativeMarketMap.SELL_PO
default:
return DerivativeMarketMap.BUY
}
Expand Down
2 changes: 2 additions & 0 deletions deprecated/ui-common/src/services/spot/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ export enum SpotMarketMap {
STOP_SELL = 4,
TAKE_BUY = 5,
TAKE_SELL = 6,
BUY_PO = 7,
SELL_PO = 8,
}

export {
Expand Down
7 changes: 6 additions & 1 deletion deprecated/ui-common/src/services/spot/utils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Change } from '../../types'
import { SpotMarketMap, SpotOrderSide, UiSpotMarketSummary } from './types'
import { SpotMarketMap, UiSpotMarketSummary } from './types'
import { SpotOrderSide } from './../../types'

export const zeroSpotMarketSummary = (
marketId: string,
Expand Down Expand Up @@ -31,6 +32,10 @@ export const spotOrderTypeToGrpcOrderType = (
return SpotMarketMap.TAKE_BUY
case SpotOrderSide.TakeSell:
return SpotMarketMap.TAKE_SELL
case SpotOrderSide.BuyPO:
return SpotMarketMap.BUY_PO
case SpotOrderSide.SellPO:
return SpotMarketMap.SELL_PO
default:
return SpotMarketMap.BUY
}
Expand Down
24 changes: 24 additions & 0 deletions deprecated/ui-common/src/types/services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,27 @@ export interface ServiceWeb3ActionOptions {
options: ServiceOptions
web3Strategy: Web3Strategy
}

export enum SpotOrderSide {
Unspecified = 'unspecified',
Buy = 'buy',
Sell = 'sell',
StopBuy = 'stop_buy',
StopSell = 'stop_sell',
TakeBuy = 'take_buy',
TakeSell = 'take_sell',
BuyPO = 'buy_po',
SellPO = 'sell_po',
}

export enum DerivativeOrderSide {
Unspecified = 'unspecified',
Buy = 'buy',
Sell = 'sell',
StopBuy = 'stop_buy',
StopSell = 'stop_sell',
TakeBuy = 'take_buy',
TakeSell = 'take_sell',
BuyPO = 'buy_po',
SellPO = 'sell_po',
}

0 comments on commit bc5a0da

Please sign in to comment.