Skip to content

Commit

Permalink
fix: minor
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasRalee committed Jul 10, 2024
1 parent d4e0cfc commit 5c9e79c
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { InjectiveExchangeV1Beta1Query } from '@injectivelabs/core-proto-ts'
import { AtomicMarketOrderAccessLevel } from '@injectivelabs/core-proto-ts/cjs/injective/exchange/v1beta1/exchange'
import {
IsOptedOutOfRewards,
FeeDiscountSchedule,
Expand Down Expand Up @@ -65,6 +66,29 @@ export class ChainGrpcExchangeTransformer {
params.tradingRewardsVestingDuration,
10,
),
liquidatorRewardShareRate: params.liquidatorRewardShareRate,
binaryOptionsMarketInstantListingFee:
params.binaryOptionsMarketInstantListingFee
? {
amount: params.binaryOptionsMarketInstantListingFee.amount,
denom: params.binaryOptionsMarketInstantListingFee.denom,
}
: undefined,
atomicMarketOrderAccessLevel:
AtomicMarketOrderAccessLevel[params.atomicMarketOrderAccessLevel],
spotAtomicMarketOrderFeeMultiplier:
params.spotAtomicMarketOrderFeeMultiplier,
derivativeAtomicMarketOrderFeeMultiplier:
params.derivativeAtomicMarketOrderFeeMultiplier,
binaryOptionsAtomicMarketOrderFeeMultiplier:
params.binaryOptionsAtomicMarketOrderFeeMultiplier,
minimalProtocolFeeRate: params.minimalProtocolFeeRate,
isInstantDerivativeMarketLaunchEnabled:
params.isInstantDerivativeMarketLaunchEnabled,
postOnlyModeHeightThreshold: params.postOnlyModeHeightThreshold,
marginDecreasePriceTimestampThresholdSeconds:
params.marginDecreasePriceTimestampThresholdSeconds,
exchangeAdmins: params.exchangeAdmins,
}
}

Expand Down
11 changes: 11 additions & 0 deletions packages/sdk-ts/src/client/chain/types/exchange.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,17 @@ export interface ExchangeParams {
maxDerivativeOrderSideCount: number
injRewardStakedRequirementThreshold: string
tradingRewardsVestingDuration: number
liquidatorRewardShareRate: string
binaryOptionsMarketInstantListingFee?: Coin
atomicMarketOrderAccessLevel: string
spotAtomicMarketOrderFeeMultiplier: string
derivativeAtomicMarketOrderFeeMultiplier: string
binaryOptionsAtomicMarketOrderFeeMultiplier: string
minimalProtocolFeeRate: string
isInstantDerivativeMarketLaunchEnabled: boolean
postOnlyModeHeightThreshold: string
marginDecreasePriceTimestampThresholdSeconds: string
exchangeAdmins: string[]
}

export interface ExchangeModuleParams extends ExchangeParams {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const createSpotMarketLaunchContent = (
content.minPriceTickSize = params.market.minPriceTickSize
content.minQuantityTickSize = params.market.minQuantityTickSize
content.makerFeeRate = params.market.makerFeeRate
content.takerFeeRate = params.market.makerFeeRate
content.takerFeeRate = params.market.takerFeeRate
content.minNotional = params.market.minNotional

return InjectiveExchangeV1Beta1Proposal.SpotMarketLaunchProposal.fromPartial(
Expand Down Expand Up @@ -97,7 +97,7 @@ export default class MsgSubmitProposalSpotMarketLaunch extends MsgBase<
params.market.makerFeeRate,
).toFixed(),
takerFeeRate: amountToCosmosSdkDecAmount(
params.market.makerFeeRate,
params.market.takerFeeRate,
).toFixed(),
minNotional: amountToCosmosSdkDecAmount(
params.market.minNotional,
Expand Down

0 comments on commit 5c9e79c

Please sign in to comment.