diff --git a/packages/sdk-ts/package.json b/packages/sdk-ts/package.json index efc28e2e4..97d9a843d 100644 --- a/packages/sdk-ts/package.json +++ b/packages/sdk-ts/package.json @@ -38,7 +38,7 @@ "@ensdomains/ens-validation": "^0.1.0", "@ensdomains/eth-ens-namehash": "^2.0.15", "@ethersproject/bytes": "^5.7.0", - "@injectivelabs/core-proto-ts": "^0.0.19", + "@injectivelabs/core-proto-ts": "^0.0.18", "@injectivelabs/dmm-proto-ts": "1.0.16", "@injectivelabs/exceptions": "^1.14.1-beta.7", "@injectivelabs/grpc-web": "^0.0.1", diff --git a/packages/sdk-ts/src/core/modules/exchange/msgs/MsgBatchCancelBinaryOptionsOrders.ts b/packages/sdk-ts/src/core/modules/exchange/msgs/MsgBatchCancelBinaryOptionsOrders.ts index 386e544fb..07936cbd6 100644 --- a/packages/sdk-ts/src/core/modules/exchange/msgs/MsgBatchCancelBinaryOptionsOrders.ts +++ b/packages/sdk-ts/src/core/modules/exchange/msgs/MsgBatchCancelBinaryOptionsOrders.ts @@ -13,7 +13,6 @@ export declare namespace MsgBatchCancelBinaryOptionsOrders { subaccountId: string orderHash: string orderMask?: InjectiveExchangeV1Beta1Exchange.OrderMask - cid?: string }[] } @@ -42,7 +41,6 @@ export default class MsgBatchCancelBinaryOptionsOrders extends MsgBase< orderData.marketId = order.marketId orderData.orderHash = order.orderHash orderData.subaccountId = order.subaccountId - orderData.cid = order.cid || '' // TODO: Send order.orderMask instead when chain handles order mask properly. orderData.orderMask = InjectiveExchangeV1Beta1Exchange.OrderMask.ANY diff --git a/packages/sdk-ts/src/core/modules/exchange/msgs/MsgBatchCancelDerivativeOrders.ts b/packages/sdk-ts/src/core/modules/exchange/msgs/MsgBatchCancelDerivativeOrders.ts index fe6309bb8..1aa1cc357 100644 --- a/packages/sdk-ts/src/core/modules/exchange/msgs/MsgBatchCancelDerivativeOrders.ts +++ b/packages/sdk-ts/src/core/modules/exchange/msgs/MsgBatchCancelDerivativeOrders.ts @@ -13,7 +13,6 @@ export declare namespace MsgBatchCancelDerivativeOrders { subaccountId: string orderHash: string orderMask?: InjectiveExchangeV1Beta1Exchange.OrderMask - cid?: string }[] } @@ -41,7 +40,6 @@ export default class MsgBatchCancelDerivativeOrders extends MsgBase< orderData.marketId = order.marketId orderData.orderHash = order.orderHash orderData.subaccountId = order.subaccountId - orderData.cid = order.cid || '' // TODO: Send order.orderMask instead when chain handles order mask properly. orderData.orderMask = InjectiveExchangeV1Beta1Exchange.OrderMask.ANY diff --git a/packages/sdk-ts/src/core/modules/exchange/msgs/MsgBatchCancelSpotOrders.ts b/packages/sdk-ts/src/core/modules/exchange/msgs/MsgBatchCancelSpotOrders.ts index 947fd45b4..5bec98fff 100644 --- a/packages/sdk-ts/src/core/modules/exchange/msgs/MsgBatchCancelSpotOrders.ts +++ b/packages/sdk-ts/src/core/modules/exchange/msgs/MsgBatchCancelSpotOrders.ts @@ -13,7 +13,6 @@ export declare namespace MsgBatchCancelSpotOrders { subaccountId: string orderHash: string orderMask?: InjectiveExchangeV1Beta1Exchange.OrderMask - cid?: string }[] } @@ -41,7 +40,6 @@ export default class MsgBatchCancelSpotOrders extends MsgBase< orderData.marketId = order.marketId orderData.orderHash = order.orderHash orderData.subaccountId = order.subaccountId - orderData.cid = order.cid || '' // TODO: Send order.orderMask instead when chain handles order mask properly. orderData.orderMask = InjectiveExchangeV1Beta1Exchange.OrderMask.ANY diff --git a/packages/sdk-ts/src/core/modules/exchange/msgs/MsgBatchUpdateOrders.ts b/packages/sdk-ts/src/core/modules/exchange/msgs/MsgBatchUpdateOrders.ts index 1965b1216..67152f663 100644 --- a/packages/sdk-ts/src/core/modules/exchange/msgs/MsgBatchUpdateOrders.ts +++ b/packages/sdk-ts/src/core/modules/exchange/msgs/MsgBatchUpdateOrders.ts @@ -16,19 +16,16 @@ export declare namespace MsgBatchUpdateOrders { marketId: string subaccountId: string orderHash: string - cid?: string }[] derivativeOrdersToCancel?: { marketId: string subaccountId: string orderHash: string - cid?: string }[] binaryOptionsOrdersToCancel?: { marketId: string subaccountId: string orderHash: string - cid?: string }[] spotOrdersToCreate?: { orderType: InjectiveExchangeV1Beta1Exchange.OrderType @@ -37,7 +34,6 @@ export declare namespace MsgBatchUpdateOrders { feeRecipient: string price: string quantity: string - cid?: string }[] derivativeOrdersToCreate?: { orderType: InjectiveExchangeV1Beta1Exchange.OrderType @@ -47,7 +43,6 @@ export declare namespace MsgBatchUpdateOrders { price: string margin: string quantity: string - cid?: string }[] binaryOptionsOrdersToCreate?: { orderType: InjectiveExchangeV1Beta1Exchange.OrderType @@ -57,7 +52,6 @@ export declare namespace MsgBatchUpdateOrders { price: string margin: string quantity: string - cid?: string }[] injectiveAddress: string } @@ -110,12 +104,11 @@ export default class MsgBatchUpdateOrders extends MsgBase< if (params.spotOrdersToCancel && params.spotOrdersToCancel.length > 0) { const orderData = params.spotOrdersToCancel.map( - ({ marketId, subaccountId, orderHash, cid }) => { + ({ marketId, subaccountId, orderHash }) => { const orderData = InjectiveExchangeV1Beta1Tx.OrderData.create() orderData.marketId = marketId orderData.subaccountId = subaccountId orderData.orderHash = orderHash - orderData.cid = cid || '' return orderData }, @@ -129,12 +122,11 @@ export default class MsgBatchUpdateOrders extends MsgBase< params.derivativeOrdersToCancel.length > 0 ) { const orderData = params.derivativeOrdersToCancel.map( - ({ marketId, subaccountId, orderHash, cid }) => { + ({ marketId, subaccountId, orderHash }) => { const orderData = InjectiveExchangeV1Beta1Tx.OrderData.create() orderData.marketId = marketId orderData.subaccountId = subaccountId orderData.orderHash = orderHash - orderData.cid = cid || '' return orderData }, @@ -147,12 +139,11 @@ export default class MsgBatchUpdateOrders extends MsgBase< params.binaryOptionsOrdersToCancel.length > 0 ) { const orderData = params.binaryOptionsOrdersToCancel.map( - ({ marketId, subaccountId, orderHash, cid }) => { + ({ marketId, subaccountId, orderHash }) => { const orderData = InjectiveExchangeV1Beta1Tx.OrderData.create() orderData.marketId = marketId orderData.subaccountId = subaccountId orderData.orderHash = orderHash - orderData.cid = cid || '' return orderData }, @@ -177,7 +168,6 @@ export default class MsgBatchUpdateOrders extends MsgBase< orderInfo.feeRecipient = paramsFromArgs.feeRecipient orderInfo.price = paramsFromArgs.price orderInfo.quantity = paramsFromArgs.quantity - orderInfo.cid = paramsFromArgs.cid || '' const order = InjectiveExchangeV1Beta1Exchange.SpotOrder.create() order.marketId = paramsFromArgs.marketId @@ -214,7 +204,6 @@ export default class MsgBatchUpdateOrders extends MsgBase< orderInfo.feeRecipient = paramsFromArgs.feeRecipient orderInfo.price = paramsFromArgs.price orderInfo.quantity = paramsFromArgs.quantity - orderInfo.cid = paramsFromArgs.cid || '' const order = InjectiveExchangeV1Beta1Exchange.DerivativeOrder.create() order.marketId = paramsFromArgs.marketId @@ -250,7 +239,6 @@ export default class MsgBatchUpdateOrders extends MsgBase< orderInfo.feeRecipient = paramsFromArgs.feeRecipient orderInfo.price = paramsFromArgs.price orderInfo.quantity = paramsFromArgs.quantity - orderInfo.cid = paramsFromArgs.cid || '' const order = InjectiveExchangeV1Beta1Exchange.DerivativeOrder.create() order.marketId = paramsFromArgs.marketId diff --git a/packages/sdk-ts/src/core/modules/exchange/msgs/MsgCancelBinaryOptionsOrder.ts b/packages/sdk-ts/src/core/modules/exchange/msgs/MsgCancelBinaryOptionsOrder.ts index 7182dffdd..61762663f 100644 --- a/packages/sdk-ts/src/core/modules/exchange/msgs/MsgCancelBinaryOptionsOrder.ts +++ b/packages/sdk-ts/src/core/modules/exchange/msgs/MsgCancelBinaryOptionsOrder.ts @@ -12,7 +12,6 @@ export declare namespace MsgCancelBinaryOptionsOrder { injectiveAddress: string orderHash: string orderMask?: InjectiveExchangeV1Beta1Exchange.OrderMask - cid?: string } export type Proto = InjectiveExchangeV1Beta1Tx.MsgCancelBinaryOptionsOrder @@ -40,7 +39,6 @@ export default class MsgCancelBinaryOptionsOrder extends MsgBase< message.marketId = params.marketId message.orderHash = params.orderHash message.subaccountId = params.subaccountId - message.cid = params.cid || '' // TODO: Send order.orderMask instead when chain handles order mask properly. message.orderMask = InjectiveExchangeV1Beta1Exchange.OrderMask.ANY diff --git a/packages/sdk-ts/src/core/modules/exchange/msgs/MsgCancelDerivativeOrder.ts b/packages/sdk-ts/src/core/modules/exchange/msgs/MsgCancelDerivativeOrder.ts index 3092ba310..d860699c3 100644 --- a/packages/sdk-ts/src/core/modules/exchange/msgs/MsgCancelDerivativeOrder.ts +++ b/packages/sdk-ts/src/core/modules/exchange/msgs/MsgCancelDerivativeOrder.ts @@ -12,7 +12,6 @@ export declare namespace MsgCancelDerivativeOrder { injectiveAddress: string orderHash: string orderMask?: InjectiveExchangeV1Beta1Exchange.OrderMask - cid?: string } export type Proto = InjectiveExchangeV1Beta1Tx.MsgCancelDerivativeOrder @@ -36,7 +35,6 @@ export default class MsgCancelDerivativeOrder extends MsgBase< message.marketId = params.marketId message.orderHash = params.orderHash message.subaccountId = params.subaccountId - message.cid = params.cid || '' // TODO: Send order.orderMask instead when chain handles order mask properly. message.orderMask = InjectiveExchangeV1Beta1Exchange.OrderMask.ANY diff --git a/packages/sdk-ts/src/core/modules/exchange/msgs/MsgCancelSpotOrder.ts b/packages/sdk-ts/src/core/modules/exchange/msgs/MsgCancelSpotOrder.ts index 28aac2f58..5d72761a2 100644 --- a/packages/sdk-ts/src/core/modules/exchange/msgs/MsgCancelSpotOrder.ts +++ b/packages/sdk-ts/src/core/modules/exchange/msgs/MsgCancelSpotOrder.ts @@ -8,7 +8,6 @@ export declare namespace MsgCancelSpotOrder { subaccountId: string injectiveAddress: string orderHash: string - cid?: string } export type Proto = InjectiveExchangeV1Beta1Tx.MsgCancelSpotOrder @@ -33,7 +32,6 @@ export default class MsgCancelSpotOrder extends MsgBase< message.marketId = params.marketId message.orderHash = params.orderHash message.subaccountId = params.subaccountId - message.cid = params.cid || '' // TODO: message.setOrderMask does not exist yet, enable this once it does. diff --git a/packages/sdk-ts/src/core/modules/exchange/msgs/MsgCreateBinaryOptionsLimitOrder.ts b/packages/sdk-ts/src/core/modules/exchange/msgs/MsgCreateBinaryOptionsLimitOrder.ts index 775182e32..8a01b64e1 100644 --- a/packages/sdk-ts/src/core/modules/exchange/msgs/MsgCreateBinaryOptionsLimitOrder.ts +++ b/packages/sdk-ts/src/core/modules/exchange/msgs/MsgCreateBinaryOptionsLimitOrder.ts @@ -17,7 +17,6 @@ export declare namespace MsgCreateBinaryOptionsLimitOrder { price: string margin: string quantity: string - cid?: string } export type Proto = @@ -30,7 +29,6 @@ const createLimitOrder = (params: MsgCreateBinaryOptionsLimitOrder.Params) => { orderInfo.feeRecipient = params.feeRecipient orderInfo.price = params.price orderInfo.quantity = params.quantity - orderInfo.cid = params.cid || '' const derivativeOrder = InjectiveExchangeV1Beta1Exchange.DerivativeOrder.create() diff --git a/packages/sdk-ts/src/core/modules/exchange/msgs/MsgCreateBinaryOptionsMarketOrder.ts b/packages/sdk-ts/src/core/modules/exchange/msgs/MsgCreateBinaryOptionsMarketOrder.ts index befd8fc1e..f07c5365e 100644 --- a/packages/sdk-ts/src/core/modules/exchange/msgs/MsgCreateBinaryOptionsMarketOrder.ts +++ b/packages/sdk-ts/src/core/modules/exchange/msgs/MsgCreateBinaryOptionsMarketOrder.ts @@ -17,7 +17,6 @@ export declare namespace MsgCreateBinaryOptionsMarketOrder { price: string margin: string quantity: string - cid?: string } export type Proto = @@ -32,7 +31,6 @@ const createMarketOrder = ( orderInfo.feeRecipient = params.feeRecipient orderInfo.price = params.price orderInfo.quantity = params.quantity - orderInfo.cid = params.cid || '' const derivativeOrder = InjectiveExchangeV1Beta1Exchange.DerivativeOrder.create() diff --git a/packages/sdk-ts/src/core/modules/exchange/msgs/MsgCreateDerivativeLimitOrder.ts b/packages/sdk-ts/src/core/modules/exchange/msgs/MsgCreateDerivativeLimitOrder.ts index dafc3acd0..7ffc9cfa9 100644 --- a/packages/sdk-ts/src/core/modules/exchange/msgs/MsgCreateDerivativeLimitOrder.ts +++ b/packages/sdk-ts/src/core/modules/exchange/msgs/MsgCreateDerivativeLimitOrder.ts @@ -17,7 +17,6 @@ export declare namespace MsgCreateDerivativeLimitOrder { price: string margin: string quantity: string - cid?: string } export type Proto = InjectiveExchangeV1Beta1Tx.MsgCreateDerivativeLimitOrder @@ -29,7 +28,6 @@ const createLimitOrder = (params: MsgCreateDerivativeLimitOrder.Params) => { orderInfo.feeRecipient = params.feeRecipient orderInfo.price = params.price orderInfo.quantity = params.quantity - orderInfo.cid = params.cid || '' const derivativeOrder = InjectiveExchangeV1Beta1Exchange.DerivativeOrder.create() diff --git a/packages/sdk-ts/src/core/modules/exchange/msgs/MsgCreateDerivativeMarketOrder.ts b/packages/sdk-ts/src/core/modules/exchange/msgs/MsgCreateDerivativeMarketOrder.ts index abb101c3a..419bbff7c 100644 --- a/packages/sdk-ts/src/core/modules/exchange/msgs/MsgCreateDerivativeMarketOrder.ts +++ b/packages/sdk-ts/src/core/modules/exchange/msgs/MsgCreateDerivativeMarketOrder.ts @@ -17,7 +17,6 @@ export declare namespace MsgCreateDerivativeMarketOrder { price: string margin: string quantity: string - cid?: string } export type Proto = InjectiveExchangeV1Beta1Tx.MsgCreateDerivativeMarketOrder @@ -29,7 +28,6 @@ const createMarketOrder = (params: MsgCreateDerivativeMarketOrder.Params) => { orderInfo.feeRecipient = params.feeRecipient orderInfo.price = params.price orderInfo.quantity = params.quantity - orderInfo.cid = params.cid || '' const derivativeOrder = InjectiveExchangeV1Beta1Exchange.DerivativeOrder.create() diff --git a/packages/sdk-ts/src/core/modules/exchange/msgs/MsgCreateSpotLimitOrder.ts b/packages/sdk-ts/src/core/modules/exchange/msgs/MsgCreateSpotLimitOrder.ts index 3c3bdfa3e..efc9dd2b9 100644 --- a/packages/sdk-ts/src/core/modules/exchange/msgs/MsgCreateSpotLimitOrder.ts +++ b/packages/sdk-ts/src/core/modules/exchange/msgs/MsgCreateSpotLimitOrder.ts @@ -16,7 +16,6 @@ export declare namespace MsgCreateSpotLimitOrder { feeRecipient: string price: string quantity: string - cid?: string } export type Proto = InjectiveExchangeV1Beta1Tx.MsgCreateSpotLimitOrder @@ -28,7 +27,6 @@ const createLimitOrder = (params: MsgCreateSpotLimitOrder.Params) => { orderInfo.feeRecipient = params.feeRecipient orderInfo.price = params.price orderInfo.quantity = params.quantity - orderInfo.cid = params.cid || '' const spotOrder = InjectiveExchangeV1Beta1Exchange.SpotOrder.create() spotOrder.marketId = params.marketId diff --git a/packages/sdk-ts/src/core/modules/exchange/msgs/MsgCreateSpotMarketOrder.ts b/packages/sdk-ts/src/core/modules/exchange/msgs/MsgCreateSpotMarketOrder.ts index 3069923c6..7b4afd516 100644 --- a/packages/sdk-ts/src/core/modules/exchange/msgs/MsgCreateSpotMarketOrder.ts +++ b/packages/sdk-ts/src/core/modules/exchange/msgs/MsgCreateSpotMarketOrder.ts @@ -16,7 +16,6 @@ export declare namespace MsgCreateSpotMarketOrder { feeRecipient: string price: string quantity: string - cid?: string } export type Proto = InjectiveExchangeV1Beta1Tx.MsgCreateSpotMarketOrder @@ -28,7 +27,6 @@ const createMarketOrder = (params: MsgCreateSpotMarketOrder.Params) => { orderInfo.feeRecipient = params.feeRecipient orderInfo.price = params.price orderInfo.quantity = params.quantity - orderInfo.cid = params.cid || '' const spotOrder = InjectiveExchangeV1Beta1Exchange.SpotOrder.create() spotOrder.marketId = params.marketId diff --git a/yarn.lock b/yarn.lock index 2cb416822..31fedaa98 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2129,10 +2129,10 @@ dependencies: browser-headers "^0.4.1" -"@injectivelabs/core-proto-ts@^0.0.19": - version "0.0.19" - resolved "https://registry.npmjs.org/@injectivelabs/core-proto-ts/-/core-proto-ts-0.0.19.tgz#566ea05761e328502647ad9bd32258fa404a430b" - integrity sha512-WV5fBPiGC8Fdx/ga5B+wagqf5B++eGdGCt9HbHnhQkoqRamel01INChJIKwsJrMGsJd5TyHSq0NRnp+N+IIjZA== +"@injectivelabs/core-proto-ts@^0.0.18": + version "0.0.18" + resolved "https://registry.yarnpkg.com/@injectivelabs/core-proto-ts/-/core-proto-ts-0.0.18.tgz#aa60ffde2b52cbbf80a18ba77833ecad605d8fd6" + integrity sha512-WSZS7SQ+I/m8jdc7fhzkMTUhA7i5nVTeKbN6QGqKmOwQ/F+PqM75vDHD9Y9NbLPx9P+m7hyUzSHz4zmajth5jw== dependencies: "@injectivelabs/grpc-web" "^0.0.1" google-protobuf "^3.14.0"